File: Mathlib/NumberTheory/NumberField/Units/DirichletTheorem.lean

full_name: NumberField.Units.dirichletUnitTheorem.w₀
code: /-- The distinguished infinite place. -/
def w₀ : InfinitePlace K 
goal: NumberField.InfinitePlace K

full_name: NumberField.Units.logEmbedding
code: /-- The logarithmic embedding of the units (seen as an `Additive` group). -/
def _root_.NumberField.Units.logEmbedding :
    Additive ((𝓞 K)ˣ) →+ ({w : InfinitePlace K // w ≠ w₀} → ℝ) 
goal: Additive (𝓞 K)ˣ →+ { w // w ≠ NumberField.Units.dirichletUnitTheorem.w₀ } → ℝ

full_name: NumberField.Units.dirichletUnitTheorem.logEmbedding_component
code: @[simp]
theorem logEmbedding_component (x : (𝓞 K)ˣ) (w : {w : InfinitePlace K // w ≠ w₀}) :
    (logEmbedding K x) w = mult w.val * Real.log (w.val x) 
goal: (NumberField.Units.logEmbedding K) x w = ↑(↑w).mult * Real.log (↑w ((algebraMap (𝓞 K) K) ↑x))

full_name: NumberField.Units.dirichletUnitTheorem.sum_logEmbedding_component
code: theorem sum_logEmbedding_component (x : (𝓞 K)ˣ) :
    ∑ w, logEmbedding K x w = - mult (w₀ : InfinitePlace K) * Real.log (w₀ (x : K)) 
goal: ∑ w : { w // w ≠ NumberField.Units.dirichletUnitTheorem.w₀ }, (NumberField.Units.logEmbedding K) x w =
  -↑NumberField.Units.dirichletUnitTheorem.w₀.mult *
    Real.log (NumberField.Units.dirichletUnitTheorem.w₀ ((algebraMap (𝓞 K) K) ↑x))

full_name: NumberField.Units.dirichletUnitTheorem.mult_log_place_eq_zero
code: theorem mult_log_place_eq_zero {x : (𝓞 K)ˣ} {w : InfinitePlace K} :
    mult w * Real.log (w x) = 0 ↔ w x = 1 
goal: ↑w.mult * Real.log (w ((algebraMap (𝓞 K) K) ↑x)) = 0 ↔ w ((algebraMap (𝓞 K) K) ↑x) = 1

full_name: NumberField.Units.dirichletUnitTheorem.logEmbedding_eq_zero_iff
code: theorem logEmbedding_eq_zero_iff {x : (𝓞 K)ˣ} :
    logEmbedding K x = 0 ↔ x ∈ torsion K 
goal: (NumberField.Units.logEmbedding K) x = 0 ↔ x ∈ NumberField.Units.torsion K

full_name: NumberField.Units.dirichletUnitTheorem.logEmbedding_component_le
code: theorem logEmbedding_component_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : {w : InfinitePlace K // w ≠ w₀}) : |logEmbedding K x w| ≤ r 
goal: |(NumberField.Units.logEmbedding K) x w| ≤ r

full_name: NumberField.Units.dirichletUnitTheorem.log_le_of_logEmbedding_le
code: theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) (h : ‖logEmbedding K x‖ ≤ r)
    (w : InfinitePlace K) : |Real.log (w x)| ≤ (Fintype.card (InfinitePlace K)) * r 
goal: |Real.log (w ((algebraMap (𝓞 K) K) ↑x))| ≤ ↑(Fintype.card (NumberField.InfinitePlace K)) * r

full_name: NumberField.Units.unitLattice
code: /-- The lattice formed by the image of the logarithmic embedding. -/
noncomputable def _root_.NumberField.Units.unitLattice :
    AddSubgroup ({w : InfinitePlace K // w ≠ w₀} → ℝ) 
goal: AddSubgroup ({ w // w ≠ NumberField.Units.dirichletUnitTheorem.w₀ } → ℝ)

full_name: NumberField.Units.dirichletUnitTheorem.unitLattice_inter_ball_finite
code: theorem unitLattice_inter_ball_finite (r : ℝ) :
    ((unitLattice K : Set ({ w : InfinitePlace K // w ≠ w₀} → ℝ)) ∩
      Metric.closedBall 0 r).Finite 
goal: (↑(NumberField.Units.unitLattice K) ∩ Metric.closedBall 0 r).Finite

full_name: NumberField.Units.dirichletUnitTheorem.seq_next
code: /-- This result shows that there always exists a next term in the sequence. -/
theorem seq_next {x : 𝓞 K} (hx : x ≠ 0) :
    ∃ y : 𝓞 K, y ≠ 0 ∧
      (∀ w, w ≠ w₁ → w y < w x) ∧
      |Algebra.norm ℚ (y : K)| ≤ B 
goal: ∃ y, y ≠ 0 ∧ (∀ (w : NumberField.InfinitePlace K), w ≠ w₁ → w ↑y < w ↑x) ∧ |(Algebra.norm ℚ) ↑y| ≤ ↑B

full_name: NumberField.Units.dirichletUnitTheorem.seq
code: /-- An infinite sequence of nonzero algebraic integers of `K` satisfying the following properties:
• `seq n` is nonzero;
• for `w : InfinitePlace K`, `w ≠ w₁ → w (seq n+1) < w (seq n)`;
• `∣norm (seq n)∣ ≤ B`. -/
def seq : ℕ → { x : 𝓞 K // x ≠ 0 }
  
goal: ℕ → { x // x ≠ 0 }

full_name: NumberField.Units.dirichletUnitTheorem.seq_ne_zero
code: /-- The terms of the sequence are nonzero. -/
theorem seq_ne_zero (n : ℕ) : algebraMap (𝓞 K) K (seq K w₁ hB n) ≠ 0 
goal: (algebraMap (𝓞 K) K) ↑(NumberField.Units.dirichletUnitTheorem.seq K w₁ hB n) ≠ 0

full_name: NumberField.Units.dirichletUnitTheorem.seq_norm_ne_zero
code: /-- The terms of the sequence have nonzero norm. -/
theorem seq_norm_ne_zero (n : ℕ) : Algebra.norm ℤ (seq K w₁ hB n : 𝓞 K) ≠ 0 
goal: (Algebra.norm ℤ) ↑(NumberField.Units.dirichletUnitTheorem.seq K w₁ hB n) ≠ 0

full_name: NumberField.Units.dirichletUnitTheorem.seq_decreasing
code: /-- The sequence is strictly decreasing at infinite places distinct from `w₁`. -/
theorem seq_decreasing {n m : ℕ} (h : n < m) (w : InfinitePlace K) (hw : w ≠ w₁) :
    w (algebraMap (𝓞 K) K (seq K w₁ hB m)) < w (algebraMap (𝓞 K) K (seq K w₁ hB n)) 
goal: w ((algebraMap (𝓞 K) K) ↑(NumberField.Units.dirichletUnitTheorem.seq K w₁ hB m)) <
  w ((algebraMap (𝓞 K) K) ↑(NumberField.Units.dirichletUnitTheorem.seq K w₁ hB n))

full_name: NumberField.Units.dirichletUnitTheorem.seq_norm_le
code: /-- The terms of the sequence have norm bounded by `B`. -/
theorem seq_norm_le (n : ℕ) :
    Int.natAbs (Algebra.norm ℤ (seq K w₁ hB n : 𝓞 K)) ≤ B 
goal: ((Algebra.norm ℤ) ↑(NumberField.Units.dirichletUnitTheorem.seq K w₁ hB n)).natAbs ≤ B

full_name: NumberField.Units.dirichletUnitTheorem.exists_unit
code: /-- Construct a unit associated to the place `w₁`. The family, for `w₁ ≠ w₀`, formed by the
image by the `logEmbedding` of these units is `ℝ`-linearly independent, see
`unitLattice_span_eq_top`. -/
theorem exists_unit (w₁ : InfinitePlace K) :
    ∃ u : (𝓞 K)ˣ, ∀ w : InfinitePlace K, w ≠ w₁ → Real.log (w u) < 0 
goal: ∃ u, ∀ (w : NumberField.InfinitePlace K), w ≠ w₁ → Real.log (w ((algebraMap (𝓞 K) K) ↑u)) < 0

full_name: NumberField.Units.dirichletUnitTheorem.unitLattice_span_eq_top
code: theorem unitLattice_span_eq_top :
    Submodule.span ℝ (unitLattice K : Set ({w : InfinitePlace K // w ≠ w₀} → ℝ)) = ⊤ 
goal: Submodule.span ℝ ↑(NumberField.Units.unitLattice K) = ⊤

full_name: NumberField.Units.rank
code: /-- The unit rank of the number field `K`, it is equal to `card (InfinitePlace K) - 1`. -/
def rank : ℕ 
goal: ℕ

full_name: NumberField.Units.instDiscrete_unitLattice
code: instance instDiscrete_unitLattice : DiscreteTopology (unitLattice K) 
goal: DiscreteTopology ↥(NumberField.Units.unitLattice K)

full_name: NumberField.Units.instZlattice_unitLattice
code: instance instZlattice_unitLattice : IsZlattice ℝ (unitLattice K) 
goal: IsZlattice ℝ (NumberField.Units.unitLattice K)

full_name: NumberField.Units.finrank_eq_rank
code: protected theorem finrank_eq_rank :
    finrank ℝ ({w : InfinitePlace K // w ≠ w₀} → ℝ) = Units.rank K 
goal: FiniteDimensional.finrank ℝ ({ w // w ≠ NumberField.Units.dirichletUnitTheorem.w₀ } → ℝ) = NumberField.Units.rank K

full_name: NumberField.Units.unitLattice_rank
code: @[simp]
theorem unitLattice_rank :
    finrank ℤ (unitLattice K) = Units.rank K 
goal: FiniteDimensional.finrank ℤ ↥(NumberField.Units.unitLattice K) = NumberField.Units.rank K

full_name: NumberField.Units.logEmbeddingQuot
code: /-- The map obtained by quotienting by the kernel of `logEmbedding`. -/
def logEmbeddingQuot :
    Additive ((𝓞 K)ˣ ⧸ (torsion K)) →+ ({w : InfinitePlace K // w ≠ w₀} → ℝ) 
goal: Additive ((𝓞 K)ˣ ⧸ NumberField.Units.torsion K) →+ { w // w ≠ NumberField.Units.dirichletUnitTheorem.w₀ } → ℝ

full_name: NumberField.Units.logEmbeddingQuot_apply
code: @[simp]
theorem logEmbeddingQuot_apply (x : (𝓞 K)ˣ) :
    logEmbeddingQuot K ⟦x⟧ = logEmbedding K x 
goal: (NumberField.Units.logEmbeddingQuot K) ⟦x⟧ = (NumberField.Units.logEmbedding K) x

full_name: NumberField.Units.logEmbeddingQuot_injective
code: theorem logEmbeddingQuot_injective :
    Function.Injective (logEmbeddingQuot K) 
goal: Function.Injective ⇑(NumberField.Units.logEmbeddingQuot K)

full_name: NumberField.Units.logEmbeddingEquiv
code: /-- The linear equivalence between `(𝓞 K)ˣ ⧸ (torsion K)` as an additive `ℤ`-module and
`unitLattice` . -/
def logEmbeddingEquiv :
    Additive ((𝓞 K)ˣ ⧸ (torsion K)) ≃ₗ[ℤ] (unitLattice K) 
goal: Additive ((𝓞 K)ˣ ⧸ NumberField.Units.torsion K) ≃ₗ[ℤ] ↥(NumberField.Units.unitLattice K)

full_name: NumberField.Units.logEmbeddingEquiv_apply
code: @[simp]
theorem logEmbeddingEquiv_apply (x : (𝓞 K)ˣ) :
    logEmbeddingEquiv K ⟦x⟧ = logEmbedding K x 
goal: ↑((NumberField.Units.logEmbeddingEquiv K) ⟦x⟧) = (NumberField.Units.logEmbedding K) x

full_name: NumberField.Units.instFreeIntAdditiveQuotientUnitsRingOfIntegersSubgroupTorsion
code: instance : Module.Free ℤ (Additive ((𝓞 K)ˣ ⧸ (torsion K))) 
goal: Module.Free ℤ (Additive ((𝓞 K)ˣ ⧸ NumberField.Units.torsion K))

full_name: NumberField.Units.instFiniteIntAdditiveQuotientUnitsRingOfIntegersSubgroupTorsion
code: instance : Module.Finite ℤ (Additive ((𝓞 K)ˣ ⧸ (torsion K))) 
goal: Module.Finite ℤ (Additive ((𝓞 K)ˣ ⧸ NumberField.Units.torsion K))

full_name: NumberField.Units.instFiniteIntAdditiveUnitsRingOfIntegers
code: instance : Module.Finite ℤ (Additive (𝓞 K)ˣ) 
goal: Module.Finite ℤ (Additive (𝓞 K)ˣ)

full_name: NumberField.Units.instFGUnitsRingOfIntegers
code: instance : Monoid.FG (𝓞 K)ˣ 
goal: Monoid.FG (𝓞 K)ˣ

full_name: NumberField.Units.rank_modTorsion
code: theorem rank_modTorsion :
    FiniteDimensional.finrank ℤ (Additive ((𝓞 K)ˣ ⧸ (torsion K))) = rank K 
goal: FiniteDimensional.finrank ℤ (Additive ((𝓞 K)ˣ ⧸ NumberField.Units.torsion K)) = NumberField.Units.rank K

full_name: NumberField.Units.basisModTorsion
code: /-- A basis of the quotient `(𝓞 K)ˣ ⧸ (torsion K)` seen as an additive ℤ-module. -/
def basisModTorsion : Basis (Fin (rank K)) ℤ (Additive ((𝓞 K)ˣ ⧸ (torsion K))) 
goal: Basis (Fin (NumberField.Units.rank K)) ℤ (Additive ((𝓞 K)ˣ ⧸ NumberField.Units.torsion K))

full_name: NumberField.Units.fundSystem
code: /-- A fundamental system of units of `K`. The units of `fundSystem` are arbitrary lifts of the
units in `basisModTorsion`. -/
def fundSystem : Fin (rank K) → (𝓞 K)ˣ 
goal: Fin (NumberField.Units.rank K) → (𝓞 K)ˣ

full_name: NumberField.Units.fundSystem_mk
code: theorem fundSystem_mk (i : Fin (rank K)) :
    Additive.ofMul ⟦fundSystem K i⟧ = (basisModTorsion K i) 
goal: Additive.ofMul ⟦NumberField.Units.fundSystem K i⟧ = (NumberField.Units.basisModTorsion K) i

full_name: NumberField.Units.fun_eq_repr
code: /-- The exponents that appear in the unique decomposition of a unit as the product of
a root of unity and powers of the units of the fundamental system `fundSystem` (see
`exist_unique_eq_mul_prod`) are given by the representation of the unit on `basisModTorsion`. -/
theorem fun_eq_repr {x ζ : (𝓞 K)ˣ} {f : Fin (rank K) → ℤ} (hζ : ζ ∈ torsion K)
    (h : x = ζ * ∏ i, (fundSystem K i) ^ (f i)) :
    f = (basisModTorsion K).repr (Additive.ofMul ↑x) 
goal: f = ⇑((NumberField.Units.basisModTorsion K).repr (Additive.ofMul ↑x))

full_name: NumberField.Units.exist_unique_eq_mul_prod
code: /-- **Dirichlet Unit Theorem**. Any unit `x` of `𝓞 K` can be written uniquely as the product of
a root of unity and powers of the units of the fundamental system `fundSystem`. -/
theorem exist_unique_eq_mul_prod (x : (𝓞 K)ˣ) : ∃! ζe : torsion K × (Fin (rank K) → ℤ),
    x = ζe.1 * ∏ i, (fundSystem K i) ^ (ζe.2 i) 
goal: ∃! ζe, x = ↑ζe.1 * ∏ i : Fin (NumberField.Units.rank K), NumberField.Units.fundSystem K i ^ ζe.2 i