@@ -336,9 +336,9 @@ theorem dvd_last_coeff_cycl_integer [hp : Fact (p : ℕ).Prime] {ζ : 𝓞 L}
336
336
m ∣ f ⟨(p : ℕ).pred, pred_lt hp.out.ne_zero⟩ := by
337
337
obtain ⟨i, Hi⟩ := hf
338
338
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) =
340
340
⟨(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) =
342
342
⟨x, lt_trans x.2 (pred_lt hp.out.ne_zero)⟩ := fun x => Fin.ext rfl
343
343
let ζ' := (ζ : L)
344
344
have hζ' : IsPrimitiveRoot ζ' p := IsPrimitiveRoot.coe_submonoidClass_iff.2 hζ
@@ -352,10 +352,10 @@ theorem dvd_last_coeff_cycl_integer [hp : Fact (p : ℕ).Prime] {ζ : 𝓞 L}
352
352
by_contra! habs
353
353
simp [le_antisymm habs (le_pred_of_lt (Fin.is_lt i))] at H
354
354
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
356
356
simp only [hlast, h, RelIso.coe_fn_toEquiv, Fin.val_mk] at hy
357
357
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
359
359
simp only [RelIso.coe_fn_toEquiv, Fin.coe_cast, mul_neg, ← Subtype.coe_inj, Fin.coe_castSucc,
360
360
Fin.coe_orderIso_apply] at hy
361
361
push_cast at hy
@@ -371,13 +371,13 @@ theorem dvd_last_coeff_cycl_integer [hp : Fact (p : ℕ).Prime] {ζ : 𝓞 L}
371
371
rw [← show ∀ y, _ = _ from fun y => congr_fun b.coe_basis y, ← sub_eq_add_neg]
372
372
norm_cast at hy
373
373
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
375
375
rw [← b.basis.equivFun_symm_apply, ← b.basis.equivFun_symm_apply, LinearMap.map_sub,
376
376
b.basis.coord_equivFun_symm, b.basis.coord_equivFun_symm, ← smul_eq_mul,
377
377
← 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
379
379
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,
381
381
neg_eq_iff_eq_neg] at hy
382
382
erw [hy] -- pred vs - 1
383
383
simp [dvd_neg]
@@ -389,9 +389,9 @@ theorem dvd_coeff_cycl_integer (hp : (p : ℕ).Prime) {ζ : 𝓞 L} (hζ : IsPri
389
389
have : Fact (p : ℕ).Prime := ⟨hp⟩
390
390
have hζ' : IsPrimitiveRoot ζ' p := IsPrimitiveRoot.coe_submonoidClass_iff.2 hζ
391
391
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) =
393
393
⟨(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) =
395
395
⟨x, lt_trans x.2 (pred_lt hp.ne_zero)⟩ := fun x => Fin.ext rfl
396
396
set b := hζ'.integralPowerBasis' with hb
397
397
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
404
404
by_contra! habs
405
405
simp [le_antisymm habs (le_pred_of_lt (Fin.is_lt j))] at H
406
406
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
408
408
simp only [hlast, h, RelIso.coe_fn_toEquiv, Fin.val_mk] at hy
409
409
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
411
411
simp only [RelIso.coe_fn_toEquiv, Fin.coe_cast, mul_neg, ← Subtype.coe_inj, Fin.coe_castSucc,
412
412
Fin.coe_orderIso_apply] at hy
413
413
push_cast at hy
@@ -423,10 +423,10 @@ theorem dvd_coeff_cycl_integer (hp : (p : ℕ).Prime) {ζ : 𝓞 L} (hζ : IsPri
423
423
rw [← show ∀ y, _ = _ from fun y => congr_fun b.coe_basis y, ← sub_eq_add_neg]
424
424
norm_cast at hy
425
425
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
427
427
rw [← b.basis.equivFun_symm_apply, ← b.basis.equivFun_symm_apply, LinearMap.map_sub,
428
428
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,
430
430
sub_eq_iff_eq_add] at hy
431
431
obtain ⟨n, hn⟩ := b.basis.dvd_coord_smul ((Fin.cast hdim.symm) ⟨j, hj⟩) y m
432
432
rw [hy, ← smul_eq_mul, ← zsmul_eq_smul_cast, ← b.basis.coord_apply, ← Fin.cast_mk, hn]
0 commit comments