Skip to content

Commit d801031

Browse files
chore: prepare for the next lean version bump (#24449)
1 parent 7c8e0d5 commit d801031

File tree

55 files changed

+127
-112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+127
-112
lines changed

Archive/Imo/Imo1998Q2.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ theorem judge_pairs_card_lower_bound {z : ℕ} (hJ : Fintype.card J = 2 * z + 1)
174174
let y := (Finset.univ.filter fun j => ¬r c j).card
175175
have h : (Finset.univ.filter fun p : JudgePair J => p.Agree r c).card = x * x + y * y := by
176176
simp [x, y, ← Finset.filter_product_card]
177-
rw [h]; apply Int.le_of_ofNat_le_ofNat; simp only [Int.ofNat_add, Int.ofNat_mul]
177+
rw [h]; apply Int.le_of_ofNat_le_ofNat; simp only [Int.natCast_add, Int.natCast_mul]
178178
apply norm_bound_of_odd_sum
179-
suffices x + y = 2 * z + 1 by simp [← Int.ofNat_add, this]
179+
suffices x + y = 2 * z + 1 by simp [← Int.natCast_add, this]
180180
rw [Finset.filter_card_add_filter_neg_card_eq_card, ← hJ, Finset.card_univ]
181181

182182
open scoped Classical in

Archive/Imo/Imo2008Q3.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ theorem p_lemma (p : ℕ) (hpp : Nat.Prime p) (hp_mod_4_eq_1 : p ≡ 1 [MOD 4])
4040
let n := Int.natAbs m
4141
have hnat₁ : p ∣ n ^ 2 + 1 := by
4242
refine Int.natCast_dvd_natCast.mp ?_
43-
simp only [n, Int.natAbs_sq, Int.natCast_pow, Int.ofNat_succ, Int.natCast_dvd_natCast.mp]
43+
simp only [n, Int.natAbs_sq, Int.natCast_pow, Int.natCast_succ, Int.natCast_dvd_natCast.mp]
4444
refine (ZMod.intCast_zmod_eq_zero_iff_dvd (m ^ 2 + 1) p).mp ?_
4545
simp only [m, Int.cast_pow, Int.cast_add, Int.cast_one, ZMod.coe_valMinAbs]
4646
rw [pow_two, ← hy]; exact neg_add_cancel 1

Mathlib/Algebra/ContinuedFractions/Computation/TerminatesIffRat.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ theorem stream_nth_fr_num_le_fr_num_sub_n_rat :
276276
| succ n IH =>
277277
intro ifp_succ_n stream_succ_nth_eq
278278
suffices ifp_succ_n.fr.num + 1 ≤ (IntFractPair.of q).fr.num - n by
279-
rw [Int.ofNat_succ, sub_add_eq_sub_sub]
279+
rw [Int.natCast_succ, sub_add_eq_sub_sub]
280280
solve_by_elim [le_sub_right_of_add_le]
281281
rcases succ_nth_stream_eq_some_iff.mp stream_succ_nth_eq with ⟨ifp_n, stream_nth_eq, -⟩
282282
have : ifp_succ_n.fr.num < ifp_n.fr.num :=

Mathlib/Algebra/GCDMonoid/Nat.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ instance : GCDMonoid ℤ where
104104
gcd_dvd_right _ _ := Int.gcd_dvd_right
105105
dvd_gcd := dvd_coe_gcd
106106
gcd_mul_lcm a b := by
107-
rw [← Int.ofNat_mul, gcd_mul_lcm, natCast_natAbs, abs_eq_normalize]
107+
rw [← Int.natCast_mul, gcd_mul_lcm, natCast_natAbs, abs_eq_normalize]
108108
exact normalize_associated (a * b)
109109
lcm_zero_left _ := natCast_eq_zero.2 <| Nat.lcm_zero_left _
110110
lcm_zero_right _ := natCast_eq_zero.2 <| Nat.lcm_zero_right _

Mathlib/Algebra/Group/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ theorem inv_pow_sub (a : G) {m n : ℕ} (h : n ≤ m) : a⁻¹ ^ (m - n) = (a ^
818818

819819
@[to_additive add_one_zsmul]
820820
lemma zpow_add_one (a : G) : ∀ n : ℤ, a ^ (n + 1) = a ^ n * a
821-
| (n : ℕ) => by simp only [← Int.ofNat_succ, zpow_natCast, pow_succ]
821+
| (n : ℕ) => by simp only [← Int.natCast_succ, zpow_natCast, pow_succ]
822822
| -1 => by simp [Int.add_left_neg]
823823
| .negSucc (n + 1) => by
824824
rw [zpow_negSucc, pow_succ', mul_inv_rev, inv_mul_cancel_right]

Mathlib/Algebra/Group/Int/Defs.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ instance instAddCommGroup : AddCommGroup ℤ where
4444
zsmul := (·*·)
4545
zsmul_zero' := Int.zero_mul
4646
zsmul_succ' m n := by
47-
simp only [ofNat_succ, Int.add_mul, Int.add_comm, Int.one_mul]
48-
zsmul_neg' m n := by simp only [negSucc_eq, ofNat_succ, Int.neg_mul]
47+
simp only [Int.natCast_succ, Int.add_mul, Int.add_comm, Int.one_mul]
48+
zsmul_neg' m n := by simp only [negSucc_eq, Int.natCast_succ, Int.neg_mul]
4949
sub_eq_add_neg _ _ := Int.sub_eq_add_neg
5050

5151
/-!

Mathlib/Algebra/Group/WithOne/Defs.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ instance instOne : One (WithOne α) :=
6363

6464
@[to_additive]
6565
instance instMul [Mul α] : Mul (WithOne α) :=
66-
⟨Option.liftOrGet (· * ·)⟩
66+
⟨Option.merge (· * ·)⟩
6767

6868
@[to_additive]
6969
instance instInv [Inv α] : Inv (WithOne α) :=
@@ -155,8 +155,8 @@ protected theorem cases_on {P : WithOne α → Prop} : ∀ x : WithOne α, P 1
155155
instance instMulOneClass [Mul α] : MulOneClass (WithOne α) where
156156
mul := (· * ·)
157157
one := 1
158-
one_mul := (Option.liftOrGet_isId _).left_id
159-
mul_one := (Option.liftOrGet_isId _).right_id
158+
one_mul := (Option.lawfulIdentity_merge _).left_id
159+
mul_one := (Option.lawfulIdentity_merge _).right_id
160160

161161
@[to_additive (attr := simp, norm_cast)]
162162
lemma coe_mul [Mul α] (a b : α) : (↑(a * b) : WithOne α) = a * b := rfl

Mathlib/Algebra/GroupWithZero/Basic.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -406,12 +406,12 @@ lemma zero_zpow_eq_one₀ {n : ℤ} : (0 : G₀) ^ n = 1 ↔ n = 0 := by
406406
rw [zero_zpow_eq, one_ne_zero.ite_eq_left_iff]
407407

408408
lemma zpow_add_one₀ (ha : a ≠ 0) : ∀ n : ℤ, a ^ (n + 1) = a ^ n * a
409-
| (n : ℕ) => by simp only [← Int.ofNat_succ, zpow_natCast, pow_succ]
409+
| (n : ℕ) => by simp only [← Int.natCast_succ, zpow_natCast, pow_succ]
410410
| -1 => by simp [ha]
411411
| .negSucc (n + 1) => by
412-
rw [Int.negSucc_eq, zpow_neg, Int.neg_add, Int.neg_add_cancel_right, zpow_neg, ← Int.ofNat_succ,
413-
zpow_natCast, zpow_natCast, pow_succ' _ (n + 1), mul_inv_rev, mul_assoc, inv_mul_cancel₀ ha,
414-
mul_one]
412+
rw [Int.negSucc_eq, zpow_neg, Int.neg_add, Int.neg_add_cancel_right, zpow_neg,
413+
← Int.natCast_succ, zpow_natCast, zpow_natCast, pow_succ' _ (n + 1), mul_inv_rev, mul_assoc,
414+
inv_mul_cancel₀ ha, mul_one]
415415

416416
lemma zpow_sub_one₀ (ha : a ≠ 0) (n : ℤ) : a ^ (n - 1) = a ^ n * a⁻¹ :=
417417
calc

Mathlib/Algebra/Homology/Embedding/Connect.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ lemma d_comp_d (n m p : ℤ) : h.d n m ≫ h.d m p = 0 := by
9090
obtain n | (_ | _ | n) := n
9191
· obtain rfl : m = .ofNat (n + 1) := by simp [← hnm]
9292
obtain rfl : p = .ofNat (n + 2) := by simp [← hmp]; omega
93-
simp
93+
simp only [Int.ofNat_eq_coe, X_ofNat, d_ofNat, HomologicalComplex.d_comp_d]
9494
· obtain rfl : m = 0 := by omega
9595
obtain rfl : p = 1 := by omega
9696
simp

Mathlib/Algebra/Polynomial/Laurent.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,11 +345,11 @@ theorem exists_T_pow (f : R[T;T⁻¹]) : ∃ (n : ℕ) (f' : R[X]), toLaurent f'
345345
· rintro f g ⟨m, fn, hf⟩ ⟨n, gn, hg⟩
346346
refine ⟨m + n, fn * X ^ n + gn * X ^ m, ?_⟩
347347
simp only [hf, hg, add_mul, add_comm (n : ℤ), map_add, map_mul, Polynomial.toLaurent_X_pow,
348-
mul_T_assoc, Int.ofNat_add]
348+
mul_T_assoc, Int.natCast_add]
349349
· rcases n with n | n
350350
· exact ⟨0, Polynomial.C a * X ^ n, by simp⟩
351351
· refine ⟨n + 1, Polynomial.C a, ?_⟩
352-
simp only [Int.negSucc_eq, Polynomial.toLaurent_C, Int.ofNat_succ, mul_T_assoc,
352+
simp only [Int.negSucc_eq, Polynomial.toLaurent_C, Int.natCast_succ, mul_T_assoc,
353353
neg_add_cancel, T_zero, mul_one]
354354

355355
/-- This is a version of `exists_T_pow` stated as an induction principle. -/

0 commit comments

Comments
 (0)