Skip to content

Commit de3819e

Browse files
progress
1 parent 0400baa commit de3819e

File tree

3 files changed

+17
-24
lines changed

3 files changed

+17
-24
lines changed

FltRegular/NumberTheory/Cyclotomic/UnitLemmas.lean

+4
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,10 @@ theorem unit_inv_conj_not_neg_zeta_runity (h : p ≠ 2) (u : Rˣ) (n : ℕ) (hp
379379
lemma NumberField.RingOfIntegers.eq_iff {K : Type*} [Field K] {x y : 𝓞 K} :
380380
(x : K) = (y : K) ↔ x = y :=
381381
NumberField.RingOfIntegers.ext_iff.symm
382+
instance {K L : Type*} [Field K] [Ring L] [Algebra K L] : Algebra (𝓞 K) L :=
383+
inferInstanceAs (Algebra (integralClosure _ _) L)
384+
instance {K L : Type*} [Field K] [Ring L] [Algebra K L] : IsScalarTower (𝓞 K) K L :=
385+
inferInstanceAs (IsScalarTower (integralClosure _ _) K L)
382386

383387
-- this proof has mild coe annoyances rn
384388
theorem unit_inv_conj_is_root_of_unity (h : p ≠ 2) (hp : (p : ℕ).Prime) (u : Rˣ) :

FltRegular/NumberTheory/Hilbert92.lean

+13-18
Original file line numberDiff line numberDiff line change
@@ -234,16 +234,16 @@ variable
234234
(hKL : finrank k K = p) (σ : K ≃ₐ[k] K) (hσ : ∀ x, x ∈ Subgroup.zpowers σ)
235235

236236
def RelativeUnits (k K : Type*) [Field k] [Field K] [Algebra k K] :=
237-
((𝓞 K)ˣ ⧸ (MonoidHom.range <| Units.map (algebraMap (𝓞 k) (𝓞 K) : (𝓞 k) →* (𝓞 K))))
237+
((𝓞 K)ˣ ⧸ (MonoidHom.range <| Units.map (algebraMap (𝓞 k) (𝓞 K) : (𝓞 k) →* (𝓞 K))))
238238

239239
instance : CommGroup (RelativeUnits k K) := by delta RelativeUnits; infer_instance
240240

241241
attribute [local instance] IsCyclic.commGroup
242242

243243
attribute [local instance 2000] inst_ringOfIntegersAlgebra Algebra.toSMul Algebra.toModule
244244

245-
instance : IsScalarTower (𝓞 k) (𝓞 K) K := IsScalarTower.of_algebraMap_eq (fun _ ↦ rfl)
246-
instance : IsIntegralClosure (𝓞 K) (𝓞 k) K := IsIntegralClosure.of_isIntegrallyClosed _ _ _
245+
instance : IsScalarTower (𝓞 k) (𝓞 K) K := IsScalarTower.of_algebraMap_eq (fun _ ↦ rfl)
246+
instance : IsIntegralClosure (𝓞 K) (𝓞 k) K := IsIntegralClosure.of_isIntegrallyClosed _ _ _
247247
(fun x ↦ IsIntegral.tower_top (IsIntegralClosure.isIntegral ℤ K x))
248248

249249
lemma coe_galRestrictHom_apply (σ : K →ₐ[k] K) (x) :
@@ -328,7 +328,7 @@ lemma isTors' : Module.IsTorsionBySet ℤ[X]
328328
Subalgebra.coe_toSubsemiring, Algebra.norm_eq_prod_automorphisms]
329329
rw [← hKL, ← IsGalois.card_aut_eq_finrank, ← orderOf_eq_card_of_forall_mem_zpowers hσ,
330330
← Fin.prod_univ_eq_prod_range, ← (finEquivZPowers σ <| isOfFinOrder_of_finite _).symm.prod_comp]
331-
simp only [pow_finEquivZPowers_symm_apply, coe_galRestrictHom_apply, AlgHom.coe_coe]
331+
simp only [pow_finEquivZPowers_symm_apply, coe_galRestrictHom_apply, AlgHom.coe_coe, map_prod]
332332
rw [Finset.prod_set_coe (α := K ≃ₐ[k] K) (β := K) (f := fun i ↦ i ↑x) (Subgroup.zpowers σ)]
333333
congr
334334
ext x
@@ -406,7 +406,7 @@ lemma NumberField.Units.finrank_eq : finrank ℤ (Additive (𝓞 k)ˣ) = NumberF
406406
local instance : Module.Finite ℤ (Additive <| RelativeUnits k K) := by
407407
delta RelativeUnits
408408
show Module.Finite ℤ (Additive (𝓞 K)ˣ ⧸ AddSubgroup.toIntSubmodule (Subgroup.toAddSubgroup
409-
(MonoidHom.range <| Units.map (algebraMap (𝓞 k) (𝓞 K) : (𝓞 k) →* (𝓞 K)))))
409+
(MonoidHom.range <| Units.map (algebraMap (𝓞 k) (𝓞 K) : (𝓞 k) →* (𝓞 K)))))
410410
infer_instance
411411

412412
local instance : Module.Finite ℤ (Additive <| relativeUnitsWithGenerator p hp hKL σ hσ) := by
@@ -432,10 +432,10 @@ lemma finrank_G : finrank ℤ G = (Units.rank k + 1) * (↑p - 1) := by
432432
rw [← Submodule.torsion_int]
433433
refine (FiniteDimensional.finrank_quotient_of_le_torsion _ le_rfl).trans ?_
434434
show finrank ℤ (Additive (𝓞 K)ˣ ⧸ AddSubgroup.toIntSubmodule (Subgroup.toAddSubgroup
435-
(MonoidHom.range <| Units.map (algebraMap (𝓞 k) (𝓞 K) : (𝓞 k) →* (𝓞 K))))) = _
435+
(MonoidHom.range <| Units.map (algebraMap (𝓞 k) (𝓞 K) : (𝓞 k) →* (𝓞 K))))) = _
436436
rw [FiniteDimensional.finrank_quotient]
437437
show _ - finrank ℤ (LinearMap.range <| AddMonoidHom.toIntLinearMap <|
438-
MonoidHom.toAdditive <| Units.map (algebraMap (𝓞 k) (𝓞 K) : (𝓞 k) →* (𝓞 K))) = _
438+
MonoidHom.toAdditive <| Units.map (algebraMap (𝓞 k) (𝓞 K) : (𝓞 k) →* (𝓞 K))) = _
439439
rw [LinearMap.finrank_range_of_inj, NumberField.Units.finrank_eq, NumberField.Units.finrank_eq,
440440
NumberField.Units.rank_of_isUnramified (k := k), add_mul, one_mul, mul_tsub, mul_one, mul_comm,
441441
add_tsub_assoc_of_le, tsub_add_eq_add_tsub, hKL]
@@ -470,16 +470,13 @@ lemma unitlifts_spec (S : systemOfUnits p G (NumberField.Units.rank k + 1)) (i)
470470
simp only [toMul_ofMul, Quotient.out_eq', ofMul_toMul]
471471
exact Quotient.out_eq' _
472472

473-
set_option synthInstance.maxHeartbeats 80000 in
474473
lemma u_lemma2 (u v : (𝓞 K)ˣ) (hu : u = v / (σ v : K)) : (mkG u) = (1 - zeta p : A) • (mkG v) := by
475474
rw [sub_smul, one_smul, relativeUnitsModule_zeta_smul, ← unit_to_U_div]
476475
congr
477476
rw [eq_div_iff_mul_eq']
478477
ext
479-
simp only [Units.val_mul, Units.coe_map, MonoidHom.coe_coe, Submonoid.coe_mul,
480-
Subsemiring.coe_toSubmonoid, Subalgebra.coe_toSubsemiring, coe_galRestrictHom_apply, hu]
481-
refine div_mul_cancel₀ _ ?_
482-
simp only [ne_eq, map_eq_zero, ZeroMemClass.coe_eq_zero, Units.ne_zero, not_false_eq_true]
478+
simp only [Units.val_mul, Units.coe_map, MonoidHom.coe_coe, map_mul, coe_galRestrictHom_apply, hu]
479+
exact div_mul_cancel₀ _ (by simp)
483480

484481
open multiplicity in
485482
theorem padicValNat_dvd_iff_le' {p : ℕ} (hp : p ≠ 1) {a n : ℕ} (ha : a ≠ 0) :
@@ -701,11 +698,9 @@ lemma Hilbert92ish_aux1 (n : ℕ) (H : Fin n → Additive (𝓞 K)ˣ) (ζ : (
701698
letI J : (𝓞 K)ˣ := (Additive.toMul (∑ i : Fin n, ι i • H i)) *
702699
(Units.map (algebraMap (𝓞 k) (𝓞 K)).toMonoidHom ζ) ^ (-a)
703700
Algebra.norm k (S := K) ((J : (𝓞 K)ˣ) : K) = 1 := by
704-
simp only [toMul_sum, toMul_zsmul, RingHom.toMonoidHom_eq_coe, zpow_neg, Units.val_mul,
705-
Units.coe_prod, Submonoid.coe_mul, Subsemiring.coe_toSubmonoid, Subalgebra.coe_toSubsemiring,
706-
Submonoid.coe_finset_prod, Units.coe_zpow, map_mul, map_prod, ← Units.coe_val_inv,
707-
norm_map_inv, norm_map_zpow, hKL, Units.coe_map, MonoidHom.coe_coe,
708-
RingOfInteger.coe_algebraMap_apply, Algebra.norm_algebraMap]
701+
simp only [toMul_sum, toMul_zsmul, zpow_neg, Units.val_mul, Units.coe_prod, map_mul, map_prod,
702+
Units.coe_zpow, map_mul, map_prod, ← Units.coe_val_inv, norm_map_inv, norm_map_zpow, hKL,
703+
Units.coe_map, RingOfInteger.coe_algebraMap_apply, Algebra.norm_algebraMap]
709704
apply_fun Additive.toMul at ha
710705
apply_fun ((↑) : (𝓞 k)ˣ → k) at ha
711706
simp only [toMul_sum, toMul_zsmul, Units.coe_prod, Submonoid.coe_finset_prod, hη,
@@ -768,7 +763,7 @@ lemma unit_to_U_neg (x) : mkG (-x) = mkG x := by
768763
simp only [Units.val_neg, Units.val_one, OneMemClass.coe_one,
769764
Units.coe_map, MonoidHom.coe_coe, map_neg, map_one]
770765

771-
instance : CommGroup ((𝓞 k))ˣ := inferInstance
766+
instance : CommGroup ((𝓞 k))ˣ := inferInstance
772767

773768
lemma IsPrimitiveRoot.one_left_iff {M} [CommMonoid M] {n : ℕ} :
774769
IsPrimitiveRoot (1 : M) n ↔ n = 1 :=

FltRegular/NumberTheory/KummersLemma/Field.lean

-6
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,6 @@ lemma irreducible_map_poly :
108108
rw [mul_pow, (hpri.out.odd_of_ne_two (PNat.coe_injective.ne hp)).neg_pow, hb, neg_neg,
109109
div_mul_cancel₀ _ (pow_ne_zero _ (hζ.sub_one_ne_zero hpri.out.one_lt))]
110110

111-
--Add to mathlib
112-
instance {K L : Type*} [Field K] [Ring L] [Algebra K L] : Algebra (𝓞 K) L :=
113-
inferInstanceAs (Algebra (integralClosure _ _) L)
114-
instance {K L : Type*} [Field K] [Ring L] [Algebra K L] : IsScalarTower (𝓞 K) K L :=
115-
inferInstanceAs (IsScalarTower (integralClosure _ _) K L)
116-
117111
theorem aeval_poly {L : Type*} [Field L] [Algebra K L] (α : L)
118112
(e : α ^ (p : ℕ) = algebraMap K L u) (m : ℕ) :
119113
aeval (((1 : L) - ζ ^ m • α) / (algebraMap K L (ζ - 1))) (poly hp hζ u hcong) = 0 := by

0 commit comments

Comments
 (0)