Skip to content

Commit 360792a

Browse files
committed
1 parent eb32513 commit 360792a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Mathlib/Algebra/Order/Ring/Unbundled/Rat.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ theorem abs_def (q : ℚ) : |q| = q.num.natAbs /. q.den := by
138138
theorem abs_def' (q : ℚ) :
139139
|q| = ⟨|q.num|, q.den, q.den_ne_zero, q.num.abs_eq_natAbs ▸ q.reduced⟩ := by
140140
refine ext ?_ ?_ <;>
141-
simp [Int.abs_eq_natAbs, abs_def, ← Rat.mk_eq_divInt q.num.natAbs _ q.den_ne_zero q.reduced]
141+
simp [Int.abs_eq_natAbs, abs_def,
142+
← Rat.mk_eq_divInt (num := q.num.natAbs) (nz := q.den_ne_zero) (c := q.reduced)]
142143

143144
@[simp]
144145
theorem num_abs_eq_abs_num (q : ℚ) : |q|.num = |q.num| := by

Mathlib/Data/Rat/Lemmas.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,13 @@ theorem num_div_eq_of_coprime {a b : ℤ} (hb0 : 0 < b) (h : Nat.Coprime a.natAb
245245
(a / b : ℚ).num = a := by
246246
lift b to ℕ using hb0.le
247247
simp only [Int.natAbs_natCast, Int.natCast_pos] at h hb0
248-
rw [← Rat.divInt_eq_div, ← mk_eq_divInt _ _ hb0.ne' h]
248+
rw [← Rat.divInt_eq_div, ← mk_eq_divInt (nz := hb0.ne') (c := h)]
249249

250250
theorem den_div_eq_of_coprime {a b : ℤ} (hb0 : 0 < b) (h : Nat.Coprime a.natAbs b.natAbs) :
251251
((a / b : ℚ).den : ℤ) = b := by
252252
lift b to ℕ using hb0.le
253253
simp only [Int.natAbs_natCast, Int.natCast_pos] at h hb0
254-
rw [← Rat.divInt_eq_div, ← mk_eq_divInt _ _ hb0.ne' h]
254+
rw [← Rat.divInt_eq_div, ← mk_eq_divInt (nz := hb0.ne') (c := h)]
255255

256256
theorem div_int_inj {a b c d : ℤ} (hb0 : 0 < b) (hd0 : 0 < d) (h1 : Nat.Coprime a.natAbs b.natAbs)
257257
(h2 : Nat.Coprime c.natAbs d.natAbs) (h : (a : ℚ) / b = (c : ℚ) / d) : a = c ∧ b = d := by

Mathlib/Order/Fin/Basic.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,7 @@ lemma strictMono_addNat (m) : StrictMono ((addNat · m) : Fin n → Fin (n + m))
185185

186186
lemma strictMono_succAbove (p : Fin (n + 1)) : StrictMono (succAbove p) :=
187187
strictMono_castSucc.ite strictMono_succ
188-
(fun _ _ hij hj => (castSucc_lt_castSucc_iff.mpr hij).trans hj) fun i =>
189-
(castSucc_lt_succ i).le
188+
(fun _ _ hij hj => (castSucc_lt_castSucc_iff.mpr hij).trans hj) fun _ => castSucc_lt_succ.le
190189

191190
variable {p : Fin (n + 1)} {i j : Fin n}
192191

0 commit comments

Comments
 (0)