File: Mathlib/NumberTheory/Cyclotomic/CyclotomicCharacter.lean

full_name: rootsOfUnity.integer_power_of_ringEquiv
code: theorem rootsOfUnity.integer_power_of_ringEquiv (g : L ≃+* L) :
    ∃ m : ℤ, ∀ t : rootsOfUnity n L, g (t : Lˣ) = (t ^ m : Lˣ) 
goal: ∃ m, ∀ (t : ↥(rootsOfUnity n L)), g ↑↑t = ↑(↑t ^ m)

full_name: rootsOfUnity.integer_power_of_ringEquiv'
code: theorem rootsOfUnity.integer_power_of_ringEquiv' (g : L ≃+* L) :
    ∃ m : ℤ, ∀ t ∈ rootsOfUnity n L, g (t : Lˣ) = (t ^ m : Lˣ) 
goal: ∃ m, ∀ t ∈ rootsOfUnity n L, g ↑t = ↑(t ^ m)

full_name: ModularCyclotomicCharacter_aux
code: /-- `ModularCyclotomicCharacter_aux g n` is a non-canonical auxiliary integer `j`,
   only well-defined modulo the number of `n`'th roots of unity in `L`, such that `g(ζ)=ζ^j`
   for all `n`'th roots of unity `ζ` in `L`. -/
noncomputable def ModularCyclotomicCharacter_aux (g : L ≃+* L) (n : ℕ+) : ℤ 
goal: ℤ

full_name: ModularCyclotomicCharacter_aux_spec
code: theorem ModularCyclotomicCharacter_aux_spec (g : L ≃+* L) (n : ℕ+) :
    ∀ t : rootsOfUnity n L, g (t : Lˣ) = (t ^ (ModularCyclotomicCharacter_aux g n) : Lˣ) 
goal: g ↑↑t = ↑(↑t ^ ModularCyclotomicCharacter_aux g n)

full_name: ModularCyclotomicCharacter.toFun
code: /-- If `g` is a ring automorphism of `L`, and `n : ℕ+`, then
  `ModularCyclotomicCharacter.toFun n g` is the `j : ZMod d` such that `g(ζ)=ζ^j` for all
  `n`'th roots of unity. Here `d` is the number of `n`th roots of unity in `L`. -/
noncomputable def ModularCyclotomicCharacter.toFun (n : ℕ+) (g : L ≃+* L) :
    ZMod (Fintype.card (rootsOfUnity n L)) 
goal: ZMod (Fintype.card ↥(rootsOfUnity n L))

full_name: ModularCyclotomicCharacter._aux_Mathlib_NumberTheory_Cyclotomic_CyclotomicCharacter___unexpand_ModularCyclotomicCharacter_toFun_1
code: local notation "χ₀" => ModularCyclotomicCharacter.toFun
goal: Lean.PrettyPrinter.Unexpander

full_name: ModularCyclotomicCharacter._aux_Mathlib_NumberTheory_Cyclotomic_CyclotomicCharacter___macroRules_ModularCyclotomicCharacter_termχ₀_1
code: local notation "χ₀" => ModularCyclotomicCharacter.toFun
goal: Lean.Macro

full_name: ModularCyclotomicCharacter.toFun_spec
code: /-- The formula which characterises the output of `ModularCyclotomicCharacter g n`. -/
theorem toFun_spec (g : L ≃+* L) {n : ℕ+} (t : rootsOfUnity n L) :
    g (t : Lˣ) = (t ^ (χ₀ n g).val : Lˣ) 
goal: g ↑↑t = ↑(↑t ^ (ModularCyclotomicCharacter.toFun n g).val)

full_name: ModularCyclotomicCharacter.toFun_spec'
code: theorem toFun_spec' (g : L ≃+* L) {n : ℕ+} {t : Lˣ} (ht : t ∈ rootsOfUnity n L) :
    g t = t ^ (χ₀ n g).val 
goal: g ↑t = ↑t ^ (ModularCyclotomicCharacter.toFun n g).val

full_name: ModularCyclotomicCharacter.toFun_spec''
code: theorem toFun_spec'' (g : L ≃+* L) {n : ℕ+} {t : L} (ht : IsPrimitiveRoot t n) :
    g t = t ^ (χ₀ n g).val 
goal: g t = t ^ (ModularCyclotomicCharacter.toFun n g).val

full_name: ModularCyclotomicCharacter.toFun_unique
code: /-- If g(t)=t^c for all roots of unity, then c=χ(g). -/
theorem toFun_unique (g : L ≃+* L) (c : ZMod (Fintype.card (rootsOfUnity n L)))
    (hc : ∀ t : rootsOfUnity n L, g (t : Lˣ) = (t ^ c.val : Lˣ)) : c = χ₀ n g 
goal: c = ModularCyclotomicCharacter.toFun n g

full_name: ModularCyclotomicCharacter.toFun_unique'
code: theorem toFun_unique' (g : L ≃+* L) (c : ZMod (Fintype.card (rootsOfUnity n L)))
    (hc : ∀ t ∈ rootsOfUnity n L, g t = t ^ c.val) : c = χ₀ n g 
goal: c = ModularCyclotomicCharacter.toFun n g

full_name: ModularCyclotomicCharacter.id
code: lemma id : χ₀ n (RingEquiv.refl L) = 1 
goal: ModularCyclotomicCharacter.toFun n (RingEquiv.refl L) = 1

full_name: ModularCyclotomicCharacter.comp
code: lemma comp (g h : L ≃+* L) : χ₀ n (g * h) =
    χ₀ n g * χ₀ n h 
goal: ModularCyclotomicCharacter.toFun n (g * h) = ModularCyclotomicCharacter.toFun n g * ModularCyclotomicCharacter.toFun n h

full_name: ModularCyclotomicCharacter'
code: /-- Given a positive integer `n`, `ModularCyclotomicCharacter' n` is a
multiplicative homomorphism from the automorphisms of a field `L` to `(ℤ/dℤ)ˣ`,
where `d` is the number of `n`'th roots of unity in `L`. It is uniquely
characterised by the property that `g(ζ)=ζ^(ModularCyclotomicCharacter n g)`
for `g` an automorphism of `L` and `ζ` an `n`th root of unity. -/
noncomputable
def ModularCyclotomicCharacter' (n : ℕ+) :
    (L ≃+* L) →* (ZMod (Fintype.card { x // x ∈ rootsOfUnity n L }))ˣ 
goal: (L ≃+* L) →* (ZMod (Fintype.card ↥(rootsOfUnity n L)))ˣ

full_name: spec'
code: lemma spec' (g : L ≃+* L) {t : Lˣ} (ht : t ∈ rootsOfUnity n L) :
    g t = t ^ ((ModularCyclotomicCharacter' L n g) : ZMod
      (Fintype.card { x // x ∈ rootsOfUnity n L })).val 
goal: g ↑t = ↑t ^ (↑((ModularCyclotomicCharacter' L n) g)).val

full_name: unique'
code: lemma unique' (g : L ≃+* L) {c : ZMod (Fintype.card { x // x ∈ rootsOfUnity n L })}
    (hc : ∀ t ∈ rootsOfUnity n L, g t = t ^ c.val) :
    c = ModularCyclotomicCharacter' L n g 
goal: c = ↑((ModularCyclotomicCharacter' L n) g)

full_name: ModularCyclotomicCharacter
code: /-- Given a positive integer `n` and a field `L` containing `n` `n`th roots
of unity, `ModularCyclotomicCharacter n` is a multiplicative homomorphism from the
automorphisms of `L` to `(ℤ/nℤ)ˣ`. It is uniquely characterised by the property that
`g(ζ)=ζ^(ModularCyclotomicCharacter n g)` for `g` an automorphism of `L` and `ζ` any `n`th root
of unity. -/
noncomputable def ModularCyclotomicCharacter {n : ℕ+}
    (hn : Fintype.card { x // x ∈ rootsOfUnity n L } = n) :
    (L ≃+* L) →* (ZMod n)ˣ 
goal: (L ≃+* L) →* (ZMod ↑n)ˣ

full_name: ModularCyclotomicCharacter.spec
code: lemma spec (g : L ≃+* L) {t : Lˣ} (ht : t ∈ rootsOfUnity n L) :
    g t = t ^ ((ModularCyclotomicCharacter L hn g) : ZMod n).val 
goal: g ↑t = ↑t ^ (↑((ModularCyclotomicCharacter L hn) g)).val

full_name: ModularCyclotomicCharacter.unique
code: lemma unique (g : L ≃+* L) {c : ZMod n}  (hc : ∀ t ∈ rootsOfUnity n L, g t = t ^ c.val) :
    c = ModularCyclotomicCharacter L hn g 
goal: c = ↑((ModularCyclotomicCharacter L hn) g)

full_name: IsPrimitiveRoot.autToPow_eq_ModularCyclotomicCharacter
code: /-- The relationship between `IsPrimitiveRoot.autToPow` and
`ModularCyclotomicCharacter`. Note that `IsPrimitiveRoot.autToPow`
needs an explicit root of unity, and also an auxiliary "base ring" `R`. -/
lemma IsPrimitiveRoot.autToPow_eq_ModularCyclotomicCharacter (n : ℕ+)
    (R : Type*) [CommRing R] [Algebra R L] {μ : L} (hμ : IsPrimitiveRoot μ n) (g : L ≃ₐ[R] L) :
    hμ.autToPow R g = ModularCyclotomicCharacter L hμ.card_rootsOfUnity g 
goal: (IsPrimitiveRoot.autToPow R hμ) g = (ModularCyclotomicCharacter L ⋯) ↑g