Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG_UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

### Changed

- in `pi_irrational`:
+ definition `rational`

### Renamed

- in `kernel.v`:
Expand Down
6 changes: 5 additions & 1 deletion theories/pi_irrational.v
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exact/continuous_horner.
Qed.

(* TODO: move somewhere to classical *)
Definition rational {R : realType} (x : R) := exists m n, x = (m%:R / n%:R)%R.
Definition rational {R : realType} (x : R) := exists m n, x = (m%:~R / n%:R)%R.

Module pi_irrational.
Local Open Scope ring_scope.
Expand Down Expand Up @@ -411,6 +411,10 @@ Lemma pi_irrationnal {R : realType} : ~ rational (pi : R).
Proof.
move=> [a [b]]; have [->|b0 piratE] := eqVneq b O.
by rewrite invr0 mulr0; apply/eqP; rewrite gt_eqF// pi_gt0.
have [na ana] : exists na, (a%:~R = na %:R :> R)%R.
exists `|a|; rewrite natr_absz gtr0_norm//.
by have := @pi_gt0 R; rewrite piratE pmulr_lgt0 ?invr_gt0 ?ltr0n ?lt0n// ltr0z.
rewrite {}ana in piratE.
have [N _] := pi_irrational.intfsin_small b0 (esym piratE) (@ltr01 R).
near \oo%classic => n.
have Nn : (N <= n)%N by near: n; exists N.
Expand Down
Loading