fix(library/data/real): fix num -> rat -> real coercion chain
This commit is contained in:
parent
4dd4d7b3b8
commit
78942a0689
2 changed files with 4 additions and 2 deletions
|
@ -1096,6 +1096,8 @@ protected definition comm_ring [reducible] : algebra.comm_ring ℝ :=
|
||||||
apply mul_comm
|
apply mul_comm
|
||||||
end
|
end
|
||||||
|
|
||||||
|
open rat -- no coercions before
|
||||||
|
|
||||||
definition of_rat [coercion] (a : ℚ) : ℝ := quot.mk (s.r_const a)
|
definition of_rat [coercion] (a : ℚ) : ℝ := quot.mk (s.r_const a)
|
||||||
|
|
||||||
theorem of_rat_add (a b : ℚ) : of_rat a + of_rat b = of_rat (a + b) :=
|
theorem of_rat_add (a b : ℚ) : of_rat a + of_rat b = of_rat (a + b) :=
|
||||||
|
|
|
@ -452,7 +452,7 @@ theorem ex_smallest_of_bdd {P : ℤ → Prop} (Hbdd : ∃ b : ℤ, ∀ z : ℤ,
|
||||||
have Heltb : elt > b, begin
|
have Heltb : elt > b, begin
|
||||||
apply int.lt_of_not_ge,
|
apply int.lt_of_not_ge,
|
||||||
intro Hge,
|
intro Hge,
|
||||||
apply false.elim ((Hb _ Hge) Helt)
|
apply (Hb _ Hge) Helt
|
||||||
end,
|
end,
|
||||||
have H' : P (b + of_nat (nat_abs (elt - b))), begin
|
have H' : P (b + of_nat (nat_abs (elt - b))), begin
|
||||||
rewrite [of_nat_nat_abs_of_nonneg (int.le_of_lt (iff.mpr !int.sub_pos_iff_lt Heltb)),
|
rewrite [of_nat_nat_abs_of_nonneg (int.le_of_lt (iff.mpr !int.sub_pos_iff_lt Heltb)),
|
||||||
|
@ -489,7 +489,7 @@ theorem ex_largest_of_bdd {P : ℤ → Prop} (Hbdd : ∃ b : ℤ, ∀ z : ℤ, z
|
||||||
have Heltb : elt < b, begin
|
have Heltb : elt < b, begin
|
||||||
apply int.lt_of_not_ge,
|
apply int.lt_of_not_ge,
|
||||||
intro Hge,
|
intro Hge,
|
||||||
apply false.elim ((Hb _ Hge) Helt)
|
apply (Hb _ Hge) Helt
|
||||||
end,
|
end,
|
||||||
have H' : P (b - of_nat (nat_abs (b - elt))), begin
|
have H' : P (b - of_nat (nat_abs (b - elt))), begin
|
||||||
rewrite [of_nat_nat_abs_of_nonneg (int.le_of_lt (iff.mpr !int.sub_pos_iff_lt Heltb)),
|
rewrite [of_nat_nat_abs_of_nonneg (int.le_of_lt (iff.mpr !int.sub_pos_iff_lt Heltb)),
|
||||||
|
|
Loading…
Reference in a new issue