Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 14d99a3

Browse files
committed
hotfix(data/real/irrational): cast problem
1 parent a12d5a1 commit 14d99a3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

data/real/irrational.lean

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ theorem irr_sqrt_of_prime (p : ℕ) (hp : nat.prime p) : irrational (sqrt p) :=
5858
irr_sqrt_of_padic_val_odd p (int.coe_nat_nonneg p) p $
5959
by rw padic_val.padic_val_self hp.gt_one; refl
6060

61-
theorem irr_sqrt_two : irrational (sqrt 2) := irr_sqrt_of_prime 2 nat.prime_two
61+
theorem irr_sqrt_two : irrational (sqrt 2) :=
62+
begin
63+
rw show (2 : ℝ) = (2:ℕ), by simp,
64+
exact irr_sqrt_of_prime 2 nat.prime_two
65+
end
6266

6367
theorem irr_sqrt_rat_iff (q : ℚ) : irrational (sqrt q) ↔
6468
rat.sqrt q * rat.sqrt q ≠ q ∧ 0 ≤ q :=

0 commit comments

Comments
 (0)