File: Mathlib/NumberTheory/Cyclotomic/Three.lean

full_name: IsCyclotomicExtension.Rat.Three._aux_Mathlib_NumberTheory_Cyclotomic_Three___macroRules_IsCyclotomicExtension_Rat_Three_termη_1
code: local notation3 "η" => (IsPrimitiveRoot.isUnit (hζ.toInteger_isPrimitiveRoot) (by decide)).unit
goal: Lean.Macro

full_name: IsCyclotomicExtension.Rat.Three.«_aux_Mathlib_NumberTheory_Cyclotomic_Three___macroRules_IsCyclotomicExtension_Rat_Three_termλ_1»
code: local notation3 "λ" => hζ.toInteger - 1
goal: Lean.Macro

full_name: IsCyclotomicExtension.Rat.Three.coe_eta
code: lemma coe_eta : (η : 𝓞 K) = hζ.toInteger 
goal: ↑⋯.unit = hζ.toInteger

full_name: IsPrimitiveRoot.toInteger_cube_eq_one
code: lemma _root_.IsPrimitiveRoot.toInteger_cube_eq_one : hζ.toInteger ^ 3 = 1 
goal: hζ.toInteger ^ 3 = 1

full_name: IsCyclotomicExtension.Rat.Three.Units.mem
code: /-- Let `u` be a unit in `(𝓞 K)ˣ`, then `u ∈ [1, -1, η, -η, η^2, -η^2]`. -/
-- Here `List` is more convenient than `Finset`, even if further from the informal statement.
-- For example, `fin_cases` below does not work with a `Finset`.
theorem Units.mem : u ∈ [1, -1, η, -η, η ^ 2, -η ^ 2] 
goal: u ∈ [1, -1, ⋯.unit, -⋯.unit, ⋯.unit ^ 2, -⋯.unit ^ 2]

full_name: _private.Mathlib.NumberTheory.Cyclotomic.Three.0.IsCyclotomicExtension.Rat.Three.lambda_sq
code: /-- We have that `λ ^ 2 = -3 * η`. -/
private lemma lambda_sq : λ ^ 2 = -3 * η 
goal: (hζ.toInteger - 1) ^ 2 = -3 * ↑⋯.unit

full_name: IsCyclotomicExtension.Rat.Three.eta_sq
code: /-- We have that `η ^ 2 = -η - 1`. -/
lemma eta_sq : (η ^ 2 : 𝓞 K) = - η - 1 
goal: ↑⋯.unit ^ 2 = -↑⋯.unit - 1

full_name: IsCyclotomicExtension.Rat.Three.eq_one_or_neg_one_of_unit_of_congruent
code: /-- If a unit `u` is congruent to an integer modulo `λ ^ 2`, then `u = 1` or `u = -1`.

This is a special case of the so-called *Kummer's lemma*. -/
theorem eq_one_or_neg_one_of_unit_of_congruent (hcong : ∃ n : ℤ, λ ^ 2 ∣ (u - n : 𝓞 K)) :
    u = 1 ∨ u = -1 
goal: u = 1 ∨ u = -1

full_name: IsCyclotomicExtension.Rat.Three.lambda_dvd_or_dvd_sub_one_or_dvd_add_one
code: /-- Let `(x : 𝓞 K)`. Then we have that `λ` divides one amongst `x`, `x - 1` and `x + 1`. -/
lemma lambda_dvd_or_dvd_sub_one_or_dvd_add_one : λ ∣ x ∨ λ ∣ x - 1 ∨ λ ∣ x + 1 
goal: hζ.toInteger - 1 ∣ x ∨ hζ.toInteger - 1 ∣ x - 1 ∨ hζ.toInteger - 1 ∣ x + 1

full_name: IsCyclotomicExtension.Rat.Three.eta_sq_add_eta_add_one
code: /-- We have that `η ^ 2 + η + 1 = 0`. -/
lemma eta_sq_add_eta_add_one : (η : 𝓞 K) ^ 2 + η + 1 = 0 
goal: ↑⋯.unit ^ 2 + ↑⋯.unit + 1 = 0

full_name: IsCyclotomicExtension.Rat.Three.cube_sub_one_eq_mul
code: /-- We have that `x ^ 3 - 1 = (x - 1) * (x - η) * (x - η ^ 2)`. -/
lemma cube_sub_one_eq_mul : x ^ 3 - 1 = (x - 1) * (x - η) * (x - η ^ 2) 
goal: x ^ 3 - 1 = (x - 1) * (x - ↑⋯.unit) * (x - ↑⋯.unit ^ 2)

full_name: IsCyclotomicExtension.Rat.Three.lambda_dvd_mul_sub_one_mul_sub_eta_add_one
code: /-- We have that `λ` divides `x * (x - 1) * (x - (η + 1))`. -/
lemma lambda_dvd_mul_sub_one_mul_sub_eta_add_one : λ ∣ x * (x - 1) * (x - (η + 1)) 
goal: hζ.toInteger - 1 ∣ x * (x - 1) * (x - (↑⋯.unit + 1))

full_name: IsCyclotomicExtension.Rat.Three.lambda_pow_four_dvd_cube_sub_one_of_dvd_sub_one
code: /-- If `λ` divides `x - 1`, then `λ ^ 4` divides `x ^ 3 - 1`. -/
lemma lambda_pow_four_dvd_cube_sub_one_of_dvd_sub_one {x : 𝓞 K} (h : λ ∣ x - 1) :
    λ ^ 4 ∣ x ^ 3 - 1 
goal: (hζ.toInteger - 1) ^ 4 ∣ x ^ 3 - 1

full_name: IsCyclotomicExtension.Rat.Three.lambda_pow_four_dvd_cube_add_one_of_dvd_add_one
code: /-- If `λ` divides `x + 1`, then `λ ^ 4` divides `x ^ 3 + 1`. -/
lemma lambda_pow_four_dvd_cube_add_one_of_dvd_add_one {x : 𝓞 K} (h : λ ∣ x + 1) :
    λ ^ 4 ∣ x ^ 3 + 1 
goal: (hζ.toInteger - 1) ^ 4 ∣ x ^ 3 + 1

full_name: IsCyclotomicExtension.Rat.Three.lambda_pow_four_dvd_cube_sub_one_or_add_one_of_lambda_not_dvd
code: /-- If `λ` does not divide `x`, then `λ ^ 4` divides `x ^ 3 - 1` or `x ^ 3 + 1`. -/
lemma lambda_pow_four_dvd_cube_sub_one_or_add_one_of_lambda_not_dvd {x : 𝓞 K} (h : ¬ λ ∣ x) :
    λ ^ 4 ∣ x ^ 3 - 1 ∨ λ ^ 4 ∣ x ^ 3 + 1 
goal: (hζ.toInteger - 1) ^ 4 ∣ x ^ 3 - 1 ∨ (hζ.toInteger - 1) ^ 4 ∣ x ^ 3 + 1