Skip to content

Commit 5752beb

Browse files
bump
1 parent 151dc54 commit 5752beb

File tree

6 files changed

+23
-23
lines changed

6 files changed

+23
-23
lines changed

FltRegular/FltThree/FltThree.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ theorem gcd1or3 (p q : ℤ) (hp : p ≠ 0) (hcoprime : IsCoprime p q) (hparity :
237237
exact dvd_mul_right _ _
238238
· have h000 : d ∣ 3 * q.natAbs ^ 2 :=
239239
by
240-
rw [← Int.natCast_dvd_natCast, Int.ofNat_mul, Int.coe_nat_pow, Int.natAbs_sq, Nat.cast_three]
240+
rw [← Int.natCast_dvd_natCast, Int.ofNat_mul, Int.natCast_pow, Int.natAbs_sq, Nat.cast_three]
241241
use Q - d * H ^ 2
242242
rw [mul_sub, ← hQ, hp]
243243
ring

FltRegular/FltThree/Spts.lean

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ theorem Spts.mul_of_dvd' {a p : ℤ√(-3)} (hdvd : p.norm ∣ a.norm) (hpprime
6767
· set X : ℤ√(-3) := ⟨p.re * a.re - A * 3 * p.im * a.im, p.re * a.im + A * a.re * p.im⟩ with HX
6868
obtain ⟨U, HU⟩ : (p.norm : ℤ√(-3)) ∣ X :=
6969
by
70-
rw [Zsqrtd.coe_int_dvd_iff]
70+
rw [Zsqrtd.intCast_dvd]
7171
refine' ⟨_, HA⟩
7272
apply @Prime.dvd_of_dvd_pow _ _ _ hpprime _ 2
7373
have : X.re ^ 2 = X.norm - 3 * X.im ^ 2 :=
@@ -282,8 +282,8 @@ theorem factors (a : ℤ√(-3)) (x : ℤ) (hcoprime : IsCoprime a.re a.im) (hod
282282
exact
283283
dvd_add
284284
(dvd_mul_of_dvd_left
285-
((Zsqrtd.coe_int_dvd_coe_int _ _).mpr (hpprime.dvd_of_dvd_pow hpdvdleft)) _)
286-
(dvd_mul_of_dvd_right ((Zsqrtd.coe_int_dvd_coe_int _ _).mpr hpdvdright) _)
285+
((Zsqrtd.intCast_dvd_intCast _ _).mpr (hpprime.dvd_of_dvd_pow hpdvdleft)) _)
286+
(dvd_mul_of_dvd_right ((Zsqrtd.intCast_dvd_intCast _ _).mpr hpdvdright) _)
287287
have := Zsqrtd.coprime_of_dvd_coprime hcoprime this
288288
simp only [Zsqrtd.intCast_re, isCoprime_zero_right, Zsqrtd.intCast_im, hpprime.not_unit] at this
289289
have h6 : x * z = C'.norm := by

FltRegular/MayAssume/Lemmas.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ theorem p_dvd_c_of_ab_of_anegc {p : ℕ} {a b c : ℤ} (hpri : p.Prime) (hp : p
5151
(h : a ^ p + b ^ p = c ^ p) (hab : a ≡ b [ZMOD p]) (hbc : b ≡ -c [ZMOD p]) : ↑p ∣ c := by
5252
letI : Fact p.Prime := ⟨hpri⟩
5353
replace h := congr_arg (fun n : ℤ => (n : ZMod p)) h
54-
simp only [Int.coe_nat_pow, Int.cast_add, Int.cast_pow, ZMod.pow_card] at h
54+
simp only [Int.natCast_pow, Int.cast_add, Int.cast_pow, ZMod.pow_card] at h
5555
simp only [← ZMod.intCast_eq_intCast_iff, Int.cast_neg] at hbc hab
5656
rw [hab, hbc, ← sub_eq_zero, ← sub_eq_add_neg, ← Int.cast_neg, ← Int.cast_sub,
5757
← Int.cast_sub] at h

FltRegular/NumberTheory/Cyclotomic/CyclRat.lean

+13-13
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,9 @@ theorem dvd_last_coeff_cycl_integer [hp : Fact (p : ℕ).Prime] {ζ : 𝓞 L}
336336
m ∣ f ⟨(p : ℕ).pred, pred_lt hp.out.ne_zero⟩ := by
337337
obtain ⟨i, Hi⟩ := hf
338338
have hlast :
339-
(Fin.castIso (succ_pred_prime hp.out)) (Fin.last (p : ℕ).pred) =
339+
(Fin.castOrderIso (succ_pred_prime hp.out)) (Fin.last (p : ℕ).pred) =
340340
⟨(p : ℕ).pred, pred_lt hp.out.ne_zero⟩ := Fin.ext rfl
341-
have h : ∀ x, (Fin.castIso (succ_pred_prime hp.out)) (Fin.castSuccEmb x) =
341+
have h : ∀ x, (Fin.castOrderIso (succ_pred_prime hp.out)) (Fin.castSuccEmb x) =
342342
⟨x, lt_trans x.2 (pred_lt hp.out.ne_zero)⟩ := fun x => Fin.ext rfl
343343
let ζ' := (ζ : L)
344344
have hζ' : IsPrimitiveRoot ζ' p := IsPrimitiveRoot.coe_submonoidClass_iff.2
@@ -352,10 +352,10 @@ theorem dvd_last_coeff_cycl_integer [hp : Fact (p : ℕ).Prime] {ζ : 𝓞 L}
352352
by_contra! habs
353353
simp [le_antisymm habs (le_pred_of_lt (Fin.is_lt i))] at H
354354
obtain ⟨y, hy⟩ := hdiv
355-
rw [← Equiv.sum_comp (Fin.castIso (succ_pred_prime hp.out)).toEquiv, Fin.sum_univ_castSucc] at hy
355+
rw [← Equiv.sum_comp (Fin.castOrderIso (succ_pred_prime hp.out)).toEquiv, Fin.sum_univ_castSucc] at hy
356356
simp only [hlast, h, RelIso.coe_fn_toEquiv, Fin.val_mk] at hy
357357
rw [hζ.pow_sub_one_eq hp.out.one_lt, ← sum_neg_distrib, smul_sum, sum_range, ← sum_add_distrib,
358-
← (Fin.castIso hdim).toEquiv.sum_comp] at hy
358+
← (Fin.castOrderIso hdim).toEquiv.sum_comp] at hy
359359
simp only [RelIso.coe_fn_toEquiv, Fin.coe_cast, mul_neg, ← Subtype.coe_inj, Fin.coe_castSucc,
360360
Fin.coe_orderIso_apply] at hy
361361
push_cast at hy
@@ -371,13 +371,13 @@ theorem dvd_last_coeff_cycl_integer [hp : Fact (p : ℕ).Prime] {ζ : 𝓞 L}
371371
rw [← show ∀ y, _ = _ from fun y => congr_fun b.coe_basis y, ← sub_eq_add_neg]
372372
norm_cast at hy
373373
rw [sum_sub_distrib] at hy
374-
replace hy := congr_arg (b.basis.coord ((Fin.castIso hdim.symm) ⟨i, hi⟩)) hy
374+
replace hy := congr_arg (b.basis.coord ((Fin.castOrderIso hdim.symm) ⟨i, hi⟩)) hy
375375
rw [← b.basis.equivFun_symm_apply, ← b.basis.equivFun_symm_apply, LinearMap.map_sub,
376376
b.basis.coord_equivFun_symm, b.basis.coord_equivFun_symm, ← smul_eq_mul,
377377
← zsmul_eq_smul_cast] at hy
378-
obtain ⟨n, hn⟩ := b.basis.dvd_coord_smul ((Fin.castIso hdim.symm) ⟨i, hi⟩) y m
378+
obtain ⟨n, hn⟩ := b.basis.dvd_coord_smul ((Fin.castOrderIso hdim.symm) ⟨i, hi⟩) y m
379379
rw [hn] at hy
380-
simp only [Fin.castIso_apply, Fin.cast_mk, Fin.castSucc_mk, Fin.eta, Hi, zero_sub,
380+
simp only [Fin.castOrderIso_apply, Fin.cast_mk, Fin.castSucc_mk, Fin.eta, Hi, zero_sub,
381381
neg_eq_iff_eq_neg] at hy
382382
erw [hy] -- pred vs - 1
383383
simp [dvd_neg]
@@ -389,9 +389,9 @@ theorem dvd_coeff_cycl_integer (hp : (p : ℕ).Prime) {ζ : 𝓞 L} (hζ : IsPri
389389
have : Fact (p : ℕ).Prime := ⟨hp⟩
390390
have hζ' : IsPrimitiveRoot ζ' p := IsPrimitiveRoot.coe_submonoidClass_iff.2
391391
have hcoe : ζ = ⟨ζ', hζ'.isIntegral p.pos⟩ := by rfl
392-
have hlast : (Fin.castIso (succ_pred_prime hp)) (Fin.last (p : ℕ).pred) =
392+
have hlast : (Fin.castOrderIso (succ_pred_prime hp)) (Fin.last (p : ℕ).pred) =
393393
⟨(p : ℕ).pred, pred_lt hp.ne_zero⟩ := Fin.ext rfl
394-
have h : ∀ x, (Fin.castIso (succ_pred_prime hp)) (Fin.castSuccEmb x) =
394+
have h : ∀ x, (Fin.castOrderIso (succ_pred_prime hp)) (Fin.castSuccEmb x) =
395395
⟨x, lt_trans x.2 (pred_lt hp.ne_zero)⟩ := fun x => Fin.ext rfl
396396
set b := hζ'.integralPowerBasis' with hb
397397
have hdim : b.dim = (p : ℕ).pred := by rw [hζ'.power_basis_int'_dim, totient_prime hp,
@@ -404,10 +404,10 @@ theorem dvd_coeff_cycl_integer (hp : (p : ℕ).Prime) {ζ : 𝓞 L} (hζ : IsPri
404404
by_contra! habs
405405
simp [le_antisymm habs (le_pred_of_lt (Fin.is_lt j))] at H
406406
obtain ⟨y, hy⟩ := hdiv
407-
rw [← Equiv.sum_comp (Fin.castIso (succ_pred_prime hp)).toEquiv, Fin.sum_univ_castSucc] at hy
407+
rw [← Equiv.sum_comp (Fin.castOrderIso (succ_pred_prime hp)).toEquiv, Fin.sum_univ_castSucc] at hy
408408
simp only [hlast, h, RelIso.coe_fn_toEquiv, Fin.val_mk] at hy
409409
rw [hζ.pow_sub_one_eq hp.one_lt, ← sum_neg_distrib, smul_sum, sum_range, ← sum_add_distrib,
410-
← (Fin.castIso hdim).toEquiv.sum_comp] at hy
410+
← (Fin.castOrderIso hdim).toEquiv.sum_comp] at hy
411411
simp only [RelIso.coe_fn_toEquiv, Fin.coe_cast, mul_neg, ← Subtype.coe_inj, Fin.coe_castSucc,
412412
Fin.coe_orderIso_apply] at hy
413413
push_cast at hy
@@ -423,10 +423,10 @@ theorem dvd_coeff_cycl_integer (hp : (p : ℕ).Prime) {ζ : 𝓞 L} (hζ : IsPri
423423
rw [← show ∀ y, _ = _ from fun y => congr_fun b.coe_basis y, ← sub_eq_add_neg]
424424
norm_cast at hy
425425
rw [sum_sub_distrib] at hy
426-
replace hy := congr_arg (b.basis.coord ((Fin.castIso hdim.symm) ⟨j, hj⟩)) hy
426+
replace hy := congr_arg (b.basis.coord ((Fin.castOrderIso hdim.symm) ⟨j, hj⟩)) hy
427427
rw [← b.basis.equivFun_symm_apply, ← b.basis.equivFun_symm_apply, LinearMap.map_sub,
428428
b.basis.coord_equivFun_symm, b.basis.coord_equivFun_symm] at hy
429-
simp only [Fin.castIso_apply, Fin.cast_mk, Fin.castSucc_mk, Fin.eta, Basis.coord_apply,
429+
simp only [Fin.castOrderIso_apply, Fin.cast_mk, Fin.castSucc_mk, Fin.eta, Basis.coord_apply,
430430
sub_eq_iff_eq_add] at hy
431431
obtain ⟨n, hn⟩ := b.basis.dvd_coord_smul ((Fin.cast hdim.symm) ⟨j, hj⟩) y m
432432
rw [hy, ← smul_eq_mul, ← zsmul_eq_smul_cast, ← b.basis.coord_apply, ← Fin.cast_mk, hn]

FltRegular/NumberTheory/Hilbert92.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ theorem padicValNat_dvd_iff' {p : ℕ} (hp : p ≠ 1) (n : ℕ) (a : ℕ) :
493493
theorem padicValInt_dvd_iff' {p : ℕ} (hp : p ≠ 1) (n : ℕ) (a : ℤ) :
494494
(p : ℤ) ^ n ∣ a ↔ a = 0 ∨ n ≤ padicValInt p a := by
495495
rw [padicValInt, ← Int.natAbs_eq_zero, ← padicValNat_dvd_iff' hp, ← Int.natCast_dvd,
496-
Int.coe_nat_pow]
496+
Int.natCast_pow]
497497

498498
theorem padicValInt_dvd' {p : ℕ} (a : ℤ) : (p : ℤ) ^ padicValInt p a ∣ a := by
499499
by_cases hp : p = 1

lake-manifest.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[{"url": "https://github.com/leanprover-community/batteries",
55
"type": "git",
66
"subDir": null,
7-
"rev": "7b3c48b58fa0ae1c8f27889bdb086ea5e4b27b06",
7+
"rev": "60d622c124cebcecc000853cdae93f4251f4beb5",
88
"name": "batteries",
99
"manifestFile": "lake-manifest.json",
1010
"inputRev": "main",
@@ -22,7 +22,7 @@
2222
{"url": "https://github.com/leanprover-community/aesop",
2323
"type": "git",
2424
"subDir": null,
25-
"rev": "e8c8a42642ceb5af33708b79ae8a3148b681c236",
25+
"rev": "70ec1d99be1e1b835d831f39c01b0d14921d2118",
2626
"name": "aesop",
2727
"manifestFile": "lake-manifest.json",
2828
"inputRev": "master",
@@ -49,7 +49,7 @@
4949
{"url": "https://github.com/leanprover-community/import-graph.git",
5050
"type": "git",
5151
"subDir": null,
52-
"rev": "35e38eb320982cfd2fcc864e0e0467ca223c8cdb",
52+
"rev": "b167323652ab59a5d1b91e906ca4172d1c0474b7",
5353
"name": "importGraph",
5454
"manifestFile": "lake-manifest.json",
5555
"inputRev": "main",
@@ -58,7 +58,7 @@
5858
{"url": "https://github.com/leanprover-community/mathlib4.git",
5959
"type": "git",
6060
"subDir": null,
61-
"rev": "5bf1683fbb7de26aee023022376acb23c740b3f5",
61+
"rev": "dbaf55811cc1dd45a83c26c367094da1fe666707",
6262
"name": "mathlib",
6363
"manifestFile": "lake-manifest.json",
6464
"inputRev": null,

0 commit comments

Comments
 (0)