@@ -72,7 +72,8 @@ def w₀ : InfinitePlace K := (inferInstance : Nonempty (InfinitePlace K)).some
72
72
variable (K)
73
73
74
74
/-- The logarithmic embedding of the units (seen as an `Additive` group). -/
75
- def logEmbedding : Additive ((𝓞 K)ˣ) →+ ({w : InfinitePlace K // w ≠ w₀} → ℝ) :=
75
+ def _root_.NumberField.Units.logEmbedding :
76
+ Additive ((𝓞 K)ˣ) →+ ({w : InfinitePlace K // w ≠ w₀} → ℝ) :=
76
77
{ toFun := fun x w => mult w.val * Real.log (w.val ↑(Additive.toMul x))
77
78
map_zero' := by simp; rfl
78
79
map_add' := fun _ _ => by simp [Real.log_mul, mul_add]; rfl }
@@ -86,8 +87,7 @@ theorem logEmbedding_component (x : (𝓞 K)ˣ) (w : {w : InfinitePlace K // w
86
87
theorem sum_logEmbedding_component (x : (𝓞 K)ˣ) :
87
88
∑ w, logEmbedding K x w = - mult (w₀ : InfinitePlace K) * Real.log (w₀ (x : K)) := by
88
89
have h := congr_arg Real.log (prod_eq_abs_norm (x : K))
89
- rw [show |(Algebra.norm ℚ) (x : K)| = 1 from isUnit_iff_norm.mp x.isUnit, Rat.cast_one,
90
- Real.log_one, Real.log_prod] at h
90
+ rw [Units.norm, Rat.cast_one, Real.log_one, Real.log_prod] at h
91
91
· simp_rw [Real.log_pow] at h
92
92
rw [← insert_erase (mem_univ w₀), sum_insert (not_mem_erase w₀ univ), add_comm,
93
93
add_eq_zero_iff_eq_neg] at h
@@ -374,6 +374,29 @@ theorem unitLattice_rank :
374
374
finrank ℤ (unitLattice K) = Units.rank K := by
375
375
rw [← Units.finrank_eq_rank, Zlattice.rank ℝ]
376
376
377
+ /-- The map obtained by quotienting by the kernel of `logEmbedding`. -/
378
+ def logEmbeddingQuot :
379
+ Additive ((𝓞 K)ˣ ⧸ (torsion K)) →+ ({w : InfinitePlace K // w ≠ w₀} → ℝ) :=
380
+ MonoidHom.toAdditive' <|
381
+ (QuotientGroup.kerLift (AddMonoidHom.toMultiplicative' (logEmbedding K))).comp
382
+ (QuotientGroup.quotientMulEquivOfEq (by
383
+ ext
384
+ rw [MonoidHom.mem_ker, AddMonoidHom.toMultiplicative'_apply_apply, ofAdd_eq_one,
385
+ ← logEmbedding_eq_zero_iff]
386
+ rfl)).toMonoidHom
387
+
388
+ @[simp]
389
+ theorem logEmbeddingQuot_apply (x : (𝓞 K)ˣ) :
390
+ logEmbeddingQuot K ⟦x⟧ = logEmbedding K x := rfl
391
+
392
+ theorem logEmbeddingQuot_injective :
393
+ Function.Injective (logEmbeddingQuot K) := by
394
+ unfold logEmbeddingQuot
395
+ intro _ _ h
396
+ simp_rw [MonoidHom.toAdditive'_apply_apply, MonoidHom.coe_comp, MulEquiv.coe_toMonoidHom,
397
+ Function.comp_apply, EmbeddingLike.apply_eq_iff_eq] at h
398
+ exact (EmbeddingLike.apply_eq_iff_eq _).mp <| (QuotientGroup.kerLift_injective _).eq_iff.mp h
399
+
377
400
#adaptation_note
378
401
/--
379
402
After https://github.com/leanprover/lean4/pull/4119
@@ -386,36 +409,25 @@ local instance : CommGroup (𝓞 K)ˣ := inferInstance
386
409
-/
387
410
set_option maxSynthPendingDepth 2 -- Note this is active for the remainder of the file.
388
411
389
- private theorem unitLatticeEquiv_aux1 :
390
- (logEmbedding K).ker = (MonoidHom.toAdditive (QuotientGroup.mk' (torsion K))).ker := by
391
- ext
392
- rw [MonoidHom.coe_toAdditive_ker, QuotientGroup.ker_mk', AddMonoidHom.mem_ker,
393
- logEmbedding_eq_zero_iff]
394
- rfl
412
+ /-- The linear equivalence between `(𝓞 K)ˣ ⧸ (torsion K)` as an additive `ℤ`-module and
413
+ `unitLattice` . -/
414
+ def logEmbeddingEquiv :
415
+ Additive ((𝓞 K)ˣ ⧸ (torsion K)) ≃ₗ[ℤ] (unitLattice K) :=
416
+ (AddEquiv.ofBijective (AddMonoidHom.codRestrict (logEmbeddingQuot K) _
417
+ (Quotient.ind fun x ↦ logEmbeddingQuot_apply K _ ▸ AddSubgroup.mem_map_of_mem _ trivial))
418
+ ⟨fun _ _ ↦ by
419
+ rw [AddMonoidHom.codRestrict_apply, AddMonoidHom.codRestrict_apply, Subtype.mk.injEq]
420
+ apply logEmbeddingQuot_injective K, fun ⟨a, ⟨b, _, ha⟩⟩ ↦ ⟨⟦b⟧, by simp [ha]⟩⟩).toIntLinearEquiv
395
421
396
- private theorem unitLatticeEquiv_aux2 :
397
- Function.Surjective (MonoidHom.toAdditive (QuotientGroup.mk' (torsion K))) := by
398
- intro x
399
- refine ⟨Additive.ofMul x.out', ?_⟩
400
- simp only [MonoidHom.toAdditive_apply_apply, toMul_ofMul, QuotientGroup.mk'_apply,
401
- QuotientGroup.out_eq']
402
- rfl
403
-
404
- /-- The linear equivalence between `unitLattice` and `(𝓞 K)ˣ ⧸ (torsion K)` as an additive
405
- `ℤ`-module. -/
406
- def unitLatticeEquiv : (unitLattice K) ≃ₗ[ℤ] Additive ((𝓞 K)ˣ ⧸ (torsion K)) :=
407
- AddEquiv.toIntLinearEquiv <|
408
- (AddEquiv.addSubgroupCongr (AddMonoidHom.range_eq_map (logEmbedding K)).symm).trans <|
409
- (QuotientAddGroup.quotientKerEquivRange (logEmbedding K)).symm.trans <|
410
- (QuotientAddGroup.quotientAddEquivOfEq (unitLatticeEquiv_aux1 K)).trans <|
411
- QuotientAddGroup.quotientKerEquivOfSurjective
412
- (MonoidHom.toAdditive (QuotientGroup.mk' (torsion K))) (unitLatticeEquiv_aux2 K)
422
+ @[simp]
423
+ theorem logEmbeddingEquiv_apply (x : (𝓞 K)ˣ) :
424
+ logEmbeddingEquiv K ⟦x⟧ = logEmbedding K x := rfl
413
425
414
426
instance : Module.Free ℤ (Additive ((𝓞 K)ˣ ⧸ (torsion K))) :=
415
- Module.Free.of_equiv (unitLatticeEquiv K)
427
+ Module.Free.of_equiv (logEmbeddingEquiv K).symm
416
428
417
429
instance : Module.Finite ℤ (Additive ((𝓞 K)ˣ ⧸ (torsion K))) :=
418
- Module.Finite.equiv (unitLatticeEquiv K)
430
+ Module.Finite.equiv (logEmbeddingEquiv K).symm
419
431
420
432
-- Note that we prove this instance first and then deduce from it the instance
421
433
-- `Monoid.FG (𝓞 K)ˣ`, and not the other way around, due to no `Subgroup` version
@@ -439,7 +451,7 @@ instance : Monoid.FG (𝓞 K)ˣ := by
439
451
440
452
theorem rank_modTorsion :
441
453
FiniteDimensional.finrank ℤ (Additive ((𝓞 K)ˣ ⧸ (torsion K))) = rank K := by
442
- rw [← LinearEquiv.finrank_eq (unitLatticeEquiv K), unitLattice_rank]
454
+ rw [← LinearEquiv.finrank_eq (logEmbeddingEquiv K).symm , unitLattice_rank]
443
455
444
456
/-- A basis of the quotient `(𝓞 K)ˣ ⧸ (torsion K)` seen as an additive ℤ-module. -/
445
457
def basisModTorsion : Basis (Fin (rank K)) ℤ (Additive ((𝓞 K)ˣ ⧸ (torsion K))) :=
@@ -452,6 +464,12 @@ def fundSystem : Fin (rank K) → (𝓞 K)ˣ :=
452
464
-- `:)` prevents the `⧸` decaying to a quotient by `leftRel` when we unfold this later
453
465
fun i => Quotient.out' (Additive.toMul (basisModTorsion K i) :)
454
466
467
+ theorem fundSystem_mk (i : Fin (rank K)) :
468
+ Additive.ofMul ⟦fundSystem K i⟧ = (basisModTorsion K i) := by
469
+ rw [fundSystem, Equiv.apply_eq_iff_eq_symm_apply, @Quotient.mk_eq_iff_out,
470
+ Quotient.out', Quotient.out_equiv_out]
471
+ rfl
472
+
455
473
/-- The exponents that appear in the unique decomposition of a unit as the product of
456
474
a root of unity and powers of the units of the fundamental system `fundSystem` (see
457
475
`exist_unique_eq_mul_prod`) are given by the representation of the unit on `basisModTorsion`. -/
@@ -488,4 +506,5 @@ theorem exist_unique_eq_mul_prod (x : (𝓞 K)ˣ) : ∃! ζe : torsion K × (Fin
488
506
489
507
end statements
490
508
509
+
491
510
end NumberField.Units
0 commit comments