Skip to content

Commit fc9d94c

Browse files
fix build
1 parent e7a79b5 commit fc9d94c

File tree

7 files changed

+29
-29
lines changed

7 files changed

+29
-29
lines changed

FltRegular/CaseI/AuxLemmas.lean

+10-10
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ theorem aux_cong0k₁ {k : Fin p} (hcong : k ≡ -1 [ZMOD p]) :
3030
refine' Fin.ext _
3131
rw [Fin.val_mk, ← ZMod.val_cast_of_lt (Fin.is_lt k)]
3232
suffices ((k : ℤ) : ZMod p).val = p.pred by simpa
33-
rw [← ZMod.int_cast_eq_int_cast_iff] at hcong
33+
rw [← ZMod.intCast_eq_intCast_iff] at hcong
3434
rw [hcong, cast_neg, Int.cast_one, pred_eq_sub_one]
3535
haveI : NeZero p := ⟨hpri.ne_zero⟩
3636
haveI : Fact p.Prime := ⟨hpri⟩
@@ -84,7 +84,7 @@ theorem aux_cong0k₂ {k : Fin p} (hcong : k ≡ 1 [ZMOD p]) : k = ⟨1, hpri.on
8484
refine' Fin.ext _
8585
rw [Fin.val_mk, ← ZMod.val_cast_of_lt (Fin.is_lt k)]
8686
suffices ((k : ℤ) : ZMod p).val = 1 by simpa
87-
rw [← ZMod.int_cast_eq_int_cast_iff] at hcong
87+
rw [← ZMod.intCast_eq_intCast_iff] at hcong
8888
rw [hcong, Int.cast_one]
8989
haveI : Fact p.Prime := ⟨hpri⟩
9090
simp [ZMod.val_one]
@@ -106,8 +106,8 @@ theorem aux0k₂ {a b : ℤ} {ζ : R} (hp5 : 5 ≤ p) (hζ : IsPrimitiveRoot ζ
106106
symm
107107
intro habs
108108
replace hcong := hcong.symm
109-
rw [show (k₂ : ℤ) = 0 by simpa using habs, ← ZMod.int_cast_eq_int_cast_iff, Int.cast_sub,
110-
Int.cast_zero, sub_eq_zero, ZMod.int_cast_eq_int_cast_iff] at hcong
109+
rw [show (k₂ : ℤ) = 0 by simpa using habs, ← ZMod.intCast_eq_intCast_iff, Int.cast_sub,
110+
Int.cast_zero, sub_eq_zero, ZMod.intCast_eq_intCast_iff] at hcong
111111
rw [habs, _root_.pow_zero, mul_one, aux_cong0k₂ hpri hcong, Fin.val_mk, pow_one, add_sub_assoc,
112112
← sub_mul, add_sub_right_comm, show ζ = ζ ^ ((⟨1, hpri.one_lt⟩ : Fin p) : ℕ) by simp] at hdiv
113113
have key : ↑(p : ℤ) ∣ ∑ j in range p, f0k₂ a b j • ζ ^ j := by
@@ -119,7 +119,7 @@ theorem aux0k₂ {a b : ℤ} {ζ : R} (hp5 : 5 ≤ p) (hζ : IsPrimitiveRoot ζ
119119
rw [sum_range] at key
120120
refine' hab _
121121
symm
122-
rw [← ZMod.int_cast_eq_int_cast_iff, ZMod.int_cast_eq_int_cast_iff_dvd_sub]
122+
rw [← ZMod.intCast_eq_intCast_iff, ZMod.intCast_eq_intCast_iff_dvd_sub]
123123
have hpri₁ : (P : ℕ).Prime := hpri
124124
simpa [f0k₂] using dvd_coeff_cycl_integer hpri₁ hζ (auxf0k₂ hpri hp5 a b) key ⟨0, hpri.pos⟩
125125

@@ -131,7 +131,7 @@ theorem aux_cong1k₁ {k : Fin p} (hcong : k ≡ 0 [ZMOD p]) : k = ⟨0, hpri.po
131131
refine' Fin.ext _
132132
rw [Fin.val_mk, ← ZMod.val_cast_of_lt (Fin.is_lt k)]
133133
suffices ((k : ℤ) : ZMod p).val = 0 by simpa
134-
rw [← ZMod.int_cast_eq_int_cast_iff] at hcong
134+
rw [← ZMod.intCast_eq_intCast_iff] at hcong
135135
rw [hcong, Int.cast_zero]
136136
haveI : Fact p.Prime := ⟨hpri⟩
137137
simp
@@ -158,7 +158,7 @@ theorem aux_cong1k₂ {k : Fin p} (hpri : p.Prime) (hp5 : 5 ≤ p) (hcong : k
158158
refine' Fin.ext _
159159
rw [Fin.val_mk, ← ZMod.val_cast_of_lt (Fin.is_lt k)]
160160
suffices ((k : ℤ) : ZMod p).val = 2 by simpa
161-
rw [← ZMod.int_cast_eq_int_cast_iff] at hcong
161+
rw [← ZMod.intCast_eq_intCast_iff] at hcong
162162
rw [hcong]
163163
simp only [Int.cast_add, algebraMap.coe_one]
164164
haveI : Fact p.Prime := ⟨hpri⟩
@@ -187,8 +187,8 @@ theorem aux1k₂ {a b c : ℤ} {ζ : R} (hp5 : 5 ≤ p) (hζ : IsPrimitiveRoot
187187
symm
188188
intro habs
189189
replace hcong := hcong.symm
190-
rw [show (k₂ : ℤ) = 1 by simpa using habs, ← ZMod.int_cast_eq_int_cast_iff, Int.cast_sub,
191-
sub_eq_iff_eq_add, ← Int.cast_add, ZMod.int_cast_eq_int_cast_iff] at hcong
190+
rw [show (k₂ : ℤ) = 1 by simpa using habs, ← ZMod.intCast_eq_intCast_iff, Int.cast_sub,
191+
sub_eq_iff_eq_add, ← Int.cast_add, ZMod.intCast_eq_intCast_iff] at hcong
192192
rw [habs, pow_one, aux_cong1k₂ hpri hp5 hcong] at hdiv
193193
ring_nf at hdiv
194194
have key : ↑(p : ℤ) ∣ ∑ j in range p, f1k₂ a j • ζ ^ j := by
@@ -212,7 +212,7 @@ theorem auxk₁k₂ {k₁ k₂ : Fin p} (hpri : p.Prime) (hcong : k₂ ≡ k₁
212212
(k₁ : ℕ) ≠ (k₂ : ℕ) := by
213213
haveI := (⟨hpri⟩ : Fact p.Prime)
214214
intro habs
215-
rw [habs, ← ZMod.int_cast_eq_int_cast_iff, Int.cast_sub, ← sub_eq_zero] at hcong
215+
rw [habs, ← ZMod.intCast_eq_intCast_iff, Int.cast_sub, ← sub_eq_zero] at hcong
216216
simp at hcong
217217

218218
end KoneKtwo

FltRegular/CaseI/Statement.lean

+6-6
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ theorem ex_fin_div {a b c : ℤ} {ζ : R} (hp5 : 5 ≤ p) (hreg : IsRegularPrime
164164
refine' natAbs_lt_natAbs_of_nonneg_of_lt (emod_nonneg _ hpcoe) _
165165
rw [natAbs_ofNat]
166166
exact emod_lt_of_pos _ (by simp [hpri.out.pos])
167-
· simp only [natAbs_of_nonneg (emod_nonneg _ hpcoe), ← ZMod.int_cast_eq_int_cast_iff,
168-
ZMod.int_cast_mod, Int.cast_sub, Int.cast_mul, Int.cast_natCast, Int.cast_one]
167+
· simp only [natAbs_of_nonneg (emod_nonneg _ hpcoe), ← ZMod.intCast_eq_intCast_iff,
168+
ZMod.intCast_mod, Int.cast_sub, Int.cast_mul, Int.cast_natCast, Int.cast_one]
169169
simp only [add_sub_assoc, sub_sub] at hk ⊢
170170
convert hk using 3
171171
rw [mul_add, mul_comm (↑a : R), ← mul_assoc _ (↑b : R), mul_comm _ (↑b : R), mul_assoc (↑b : R)]
@@ -175,16 +175,16 @@ theorem ex_fin_div {a b c : ℤ} {ζ : R} (hp5 : 5 ≤ p) (hreg : IsRegularPrime
175175
IsPrimitiveRoot.coe_unit'_coe]
176176
refine' eq_of_div_eq_one _
177177
rw [← zpow_natCast, ← zpow_sub₀ (hζ'.ne_zero hpri.out.ne_zero), hζ'.zpow_eq_one_iff_dvd]
178-
simp only [natAbs_of_nonneg (emod_nonneg _ hpcoe), ← ZMod.int_cast_zmod_eq_zero_iff_dvd,
179-
Int.cast_sub, ZMod.int_cast_mod, Int.cast_mul, Int.cast_natCast, sub_self]
178+
simp only [natAbs_of_nonneg (emod_nonneg _ hpcoe), ← ZMod.intCast_zmod_eq_zero_iff_dvd,
179+
Int.cast_sub, ZMod.intCast_mod, Int.cast_mul, Int.cast_natCast, sub_self]
180180
· rw [← Subtype.coe_inj]
181181
simp only [Fin.val_mk, SubsemiringClass.coe_pow, MulMemClass.coe_mul,
182182
NumberField.Units.coe_zpow, IsPrimitiveRoot.coe_unit'_coe, IsPrimitiveRoot.coe_inv_unit'_coe]
183183
refine' eq_of_div_eq_one _
184184
rw [← zpow_natCast, ← zpow_sub_one₀ (hζ'.ne_zero hpri.out.ne_zero), ←
185185
zpow_sub₀ (hζ'.ne_zero hpri.out.ne_zero), hζ'.zpow_eq_one_iff_dvd]
186-
simp only [natAbs_of_nonneg (emod_nonneg _ hpcoe), ← ZMod.int_cast_zmod_eq_zero_iff_dvd,
187-
Int.cast_sub, ZMod.int_cast_mod, Int.cast_mul, Int.cast_natCast, Int.cast_one, sub_self]
186+
simp only [natAbs_of_nonneg (emod_nonneg _ hpcoe), ← ZMod.intCast_zmod_eq_zero_iff_dvd,
187+
Int.cast_sub, ZMod.intCast_mod, Int.cast_mul, Int.cast_natCast, Int.cast_one, sub_self]
188188

189189
/-- Auxiliary function -/
190190
def f (a b : ℤ) (k₁ k₂ : ℕ) : ℕ → ℤ := fun x =>

FltRegular/FltThree/Edwards.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ theorem step1'' {a p : ℤ√(-3)} (hcoprime : IsCoprime a.re a.im) (hp : p.norm
145145
simp [Zsqrtd.ext_iff, hp', h5]
146146
simp only [hp', one_mul, Zsqrtd.norm_neg, Int.cast_one, Int.cast_neg, neg_one_mul]
147147
cases h4 <;> cases h2 <;> simp [*]
148-
· rw [Zsqrtd.norm_mul, Zsqrtd.norm_int_cast, ← sq, ← sq_abs, hp', one_pow, one_mul]
148+
· rw [Zsqrtd.norm_mul, Zsqrtd.norm_intCast, ← sq, ← sq_abs, hp', one_pow, one_mul]
149149
cases' h2 with h2 h2 <;>
150150
· rw [h2, Zsqrtd.norm_mul]
151151
congr

FltRegular/FltThree/FltThree.lean

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ theorem exists_coprime {n : ℕ} (hn : 0 < n) {a b c : ℤ} (ha' : a ≠ 0) (hb'
2727
obtain ⟨B, HB⟩ : ↑d ∣ b := @Int.gcd_dvd_right a b
2828
obtain ⟨C, HC⟩ : ↑d ∣ c :=
2929
by
30-
rw [← Int.pow_dvd_pow_iff hn, ← h, HA, HB, mul_pow, mul_pow, ← mul_add]
30+
rw [← Int.pow_dvd_pow_iff hn.ne', ← h, HA, HB, mul_pow, mul_pow, ← mul_add]
3131
exact dvd_mul_right _ _
3232
have hdpos : 0 < d := Int.gcd_pos_of_ne_zero_left _ ha'
3333
have hd := Int.natCast_ne_zero_iff_pos.mpr hdpos
@@ -89,7 +89,7 @@ theorem flt_not_add_self {a b c : ℤ} (ha : a ≠ 0) (h : a ^ 3 + b ^ 3 = c ^ 3
8989
rw [← mul_two] at h
9090
obtain ⟨d, rfl⟩ : a ∣ c :=
9191
by
92-
rw [← Int.pow_dvd_pow_iff (by norm_num : 0 < 3), ← h]
92+
rw [← Int.pow_dvd_pow_iff (by norm_num : 30), ← h]
9393
apply dvd_mul_right
9494
apply Int.two_not_cube d
9595
rwa [mul_pow, mul_right_inj' (pow_ne_zero 3 ha), eq_comm] at h
@@ -276,7 +276,7 @@ theorem gcd1or3 (p q : ℤ) (hp : p ≠ 0) (hcoprime : IsCoprime p q) (hparity :
276276
apply dvd_mul_right
277277
exact dvd_trans this Int.gcd_dvd_left
278278
apply IsCoprime.isUnit_of_dvd' hcoprime hdvdp
279-
· rw [← Int.pow_dvd_pow_iff zero_lt_two] at hdvdp
279+
· rw [← Int.pow_dvd_pow_iff two_ne_zero] at hdvdp
280280
apply Prime.dvd_of_dvd_pow Int.prime_three
281281
rw [← mul_dvd_mul_iff_left (three_ne_zero' ℤ), ← pow_two, ← dvd_add_right hdvdp]
282282
refine' dvd_trans _ Int.gcd_dvd_right
@@ -610,7 +610,7 @@ theorem descent_gcd3 (a b c p q : ℤ) (hp : p ≠ 0) (hq : q ≠ 0) (hcoprime :
610610
obtain ⟨e, he⟩ := hcubeleft
611611
have : 3 ∣ e :=
612612
by
613-
rw [← Int.pow_dvd_pow_iff (by norm_num : 0 < 3), ← he, hs]
613+
rw [← Int.pow_dvd_pow_iff (by norm_num : 30), ← he, hs]
614614
convert dvd_mul_right _ (2 * v * (u - v) * (u + v)) using 1
615615
norm_num
616616
ring

FltRegular/FltThree/Spts.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ theorem factors (a : ℤ√(-3)) (x : ℤ) (hcoprime : IsCoprime a.re a.im) (hod
266266
have hgpos : 0 < g := by rwa [hg, Zsqrtd.gcd_pos_iff]
267267
obtain ⟨C', HC', HCDcoprime⟩ := Zsqrtd.exists_coprime_of_gcd_pos hgpos
268268
have h5 : x * y = (g : ℤ) ^ 2 * C'.norm := by
269-
rw [← hy, HC', Zsqrtd.norm_mul, Zsqrtd.norm_int_cast, ← pow_two]
269+
rw [← hy, HC', Zsqrtd.norm_mul, Zsqrtd.norm_intCast, ← pow_two]
270270
obtain ⟨z, hz⟩ : (g : ℤ) ^ 2 ∣ y :=
271271
by
272272
have : (g : ℤ) ^ 2 ∣ x * y := by

FltRegular/MayAssume/Lemmas.lean

+5-5
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ theorem p_dvd_c_of_ab_of_anegc {p : ℕ} {a b c : ℤ} (hpri : p.Prime) (hp : p
5353
letI : Fact p.Prime := ⟨hpri⟩
5454
replace h := congr_arg (fun n : ℤ => (n : ZMod p)) h
5555
simp only [Int.coe_nat_pow, Int.cast_add, Int.cast_pow, ZMod.pow_card] at h
56-
simp only [← ZMod.int_cast_eq_int_cast_iff, Int.cast_neg] at hbc hab
56+
simp only [← ZMod.intCast_eq_intCast_iff, Int.cast_neg] at hbc hab
5757
rw [hab, hbc, ← sub_eq_zero, ← sub_eq_add_neg, ← Int.cast_neg, ← Int.cast_sub,
5858
← Int.cast_sub] at h
5959
ring_nf at h
6060
simp only [Int.cast_neg, Int.cast_mul, Int.cast_one, Int.cast_ofNat, neg_eq_zero,
6161
mul_eq_zero] at h
62-
rw [← ZMod.int_cast_zmod_eq_zero_iff_dvd]
62+
rw [← ZMod.intCast_zmod_eq_zero_iff_dvd]
6363
refine' Or.resolve_right h fun h3 => _
64-
rw [show (3 : ZMod p) = ((3 : ℕ) : ZMod p) by simp, ZMod.nat_cast_zmod_eq_zero_iff_dvd,
64+
rw [show (3 : ZMod p) = ((3 : ℕ) : ZMod p) by simp, ZMod.natCast_zmod_eq_zero_iff_dvd,
6565
Nat.dvd_prime Nat.prime_three] at h3
6666
cases' h3 with H₁ H₂
6767
· exact hpri.ne_one H₁
@@ -100,9 +100,9 @@ theorem a_not_cong_b {p : ℕ} {a b c : ℤ} (hpri : p.Prime) (hp5 : 5 ≤ p) (h
100100
· simp [H₂, H₃]
101101
· simp [H₂, H₄]
102102
· have hp3 : p ≠ 3 := by linarith
103-
rw [← ZMod.int_cast_eq_int_cast_iff] at habs H
103+
rw [← ZMod.intCast_eq_intCast_iff] at habs H
104104
rw [H] at habs
105-
rw [ZMod.int_cast_eq_int_cast_iff] at habs H
105+
rw [ZMod.intCast_eq_intCast_iff] at habs H
106106
obtain ⟨n, hn⟩ := p_dvd_c_of_ab_of_anegc hpri hp3 h H habs
107107
refine' caseI ⟨a * b * n, _⟩
108108
rw [hn]

FltRegular/NumberTheory/Cyclotomic/CyclRat.lean

+2-2
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,10 @@ theorem aux_lem_flt [Fact (p : ℕ).Prime] {x y z : ℤ} (H : x ^ (p : ℕ) + y
310310
(caseI : ¬↑p ∣ x * y * z) : ¬(p : ℤ) ∣ (x + y : ℤ) := by
311311
intro habs
312312
replace habs : ↑(p : ℕ) ∣ (x + y : ℤ) := by simpa using habs
313-
rw [← ZMod.int_cast_zmod_eq_zero_iff_dvd, Int.cast_add] at habs
313+
rw [← ZMod.intCast_zmod_eq_zero_iff_dvd, Int.cast_add] at habs
314314
replace H := congr_arg (fun x : ℤ => (x : ZMod p)) H.symm
315315
simp only [Int.cast_add, Int.cast_pow, ZMod.pow_card, habs,
316-
ZMod.int_cast_zmod_eq_zero_iff_dvd] at H
316+
ZMod.intCast_zmod_eq_zero_iff_dvd] at H
317317
exact caseI (Dvd.dvd.mul_left H _)
318318

319319
theorem fltIdeals_coprime (hpri : (p : ℕ).Prime) (p5 : 5 ≤ p) {x y z : ℤ}

0 commit comments

Comments
 (0)