Skip to content

Commit d6e4d42

Browse files
authored
fixes #1586 (#1587)
1 parent 62759a0 commit d6e4d42

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG_UNRELEASED.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
### Changed
88

9+
- in `pi_irrational`:
10+
+ definition `rational`
11+
912
### Renamed
1013

1114
- in `kernel.v`:

theories/pi_irrational.v

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ exact/continuous_horner.
2929
Qed.
3030

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

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

0 commit comments

Comments
 (0)