The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V12. Number theory

Mathlib.NumberTheory.MulChar.Basic

95 declarations and 5 deprecated aliases. Mathlib docs · Source

Multiplicative characters of finite rings and fields

Let R and R' be commutative rings. A multiplicative character of R with values in R' is a morphism of monoids from the multiplicative monoid of R into that of R' that sends non-units to zero.

We use the namespace MulChar for the definitions and results.

Main results

We show that the multiplicative characters form a group (if R' is commutative); see MulChar.commGroup. We also provide an equivalence with the homomorphisms Rˣ →* R'ˣ; see MulChar.equivToUnitHom.

We define a multiplicative character to be quadratic if its values are among 0, 1 and -1, and we prove some properties of quadratic characters.

Finally, we show that the sum of all values of a nontrivial multiplicative character vanishes; see MulChar.IsNontrivial.sum_eq_zero.

Tags

multiplicative character

Definitions related to multiplicative characters

Even though the intended use is when domain and target of the characters are commutative rings, we define them in the more general setting when the domain is a commutative monoid and the target is a commutative monoid with zero. (We need a zero in the target, since non-units are supposed to map to zero.)

In this setting, there is an equivalence between multiplicative characters R → R' and group homomorphisms Rˣ → R'ˣ, and the multiplicative characters have a natural structure as a commutative group.

Equivalence of multiplicative characters with homomorphisms on units

We show that restriction / extension by zero gives an equivalence between MulChar R R' and Rˣ →* R'ˣ.

Commutative group structure on multiplicative characters

The multiplicative characters R → R' form a commutative group.

Properties of multiplicative characters

We introduce the properties of being nontrivial or quadratic and prove some basic facts about them.

We now (mostly) assume that the target is a commutative ring.

Multiplicative characters with finite domain

Multiplicative characters on rings

theorem MulChar.mk.congr_simp E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R']
  (toMonoidHom toMonoidHom_1 : R →* R') (e_toMonoidHom : toMonoidHom = toMonoidHom_1)
  (map_nonunit' : ∀ (a : R), ¬IsUnit a → (↑toMonoidHom).toFun a = 0),
  { toMonoidHom := toMonoidHom, map_nonunit' := map_nonunit' } = { toMonoidHom := toMonoidHom_1, map_nonunit' := ⋯ }

def MulChar.ctorIdx E1 #

{R : Type u_1} → {inst : CommMonoid R} → {R' : Type u_2} → {inst_1 : CommMonoidWithZero R'} → MulChar R R' → ℕ

theorem MulChar.mk.inj E1 #

∀ {R : Type u_1} {inst : CommMonoid R} {R' : Type u_2} {inst_1 : CommMonoidWithZero R'} {toMonoidHom : R →* R'}
  {map_nonunit' : ∀ (a : R), ¬IsUnit a → (↑toMonoidHom).toFun a = 0} {toMonoidHom_1 : R →* R'}
  {map_nonunit'_1 : ∀ (a : R), ¬IsUnit a → (↑toMonoidHom_1).toFun a = 0},
  { toMonoidHom := toMonoidHom, map_nonunit' := map_nonunit' } =
      { toMonoidHom := toMonoidHom_1, map_nonunit' := map_nonunit'_1 } →
    toMonoidHom = toMonoidHom_1

theorem MulChar.mk.injEq E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (toMonoidHom : R →* R')
  (map_nonunit' : ∀ (a : R), ¬IsUnit a → (↑toMonoidHom).toFun a = 0) (toMonoidHom_1 : R →* R')
  (map_nonunit'_1 : ∀ (a : R), ¬IsUnit a → (↑toMonoidHom_1).toFun a = 0),
  ({ toMonoidHom := toMonoidHom, map_nonunit' := map_nonunit' } =
      { toMonoidHom := toMonoidHom_1, map_nonunit' := map_nonunit'_1 }) =
    (toMonoidHom = toMonoidHom_1)

structure MulChar E1 #

(R : Type u_1) → [CommMonoid R] → (R' : Type u_2) → [CommMonoidWithZero R'] → Type (max u_1 u_2)

Define a structure for multiplicative characters. A multiplicative character from a commutative monoid R to a commutative monoid with zero R' is a homomorphism of (multiplicative) monoids that sends non-units to zero.

ctor MulChar.mk E0 #

{R : Type u_1} →
  [inst : CommMonoid R] →
    {R' : Type u_2} →
      [inst_1 : CommMonoidWithZero R'] →
        (toMonoidHom : R →* R') → (∀ (a : R), ¬IsUnit a → (↑toMonoidHom).toFun a = 0) → MulChar R R'

abbrev MulChar.toMonoidHom E1 #

{R : Type u_1} → [inst : CommMonoid R] → {R' : Type u_2} → [inst_1 : CommMonoidWithZero R'] → MulChar R R' → R →* R'

theorem MulChar.map_nonunit' E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (self : MulChar R R') (a : R),
  ¬IsUnit a → (↑self.toMonoidHom).toFun a = 0

instance MulChar.instFunLike E0 #

(R : Type u_1) →
  [inst : CommMonoid R] → (R' : Type u_2) → [inst_1 : CommMonoidWithZero R'] → FunLike (MulChar R R') R R'

class MulCharClass E1 #

(F : Type u_3) →
  (R : outParam (Type u_4)) →
    (R' : outParam (Type u_5)) → [CommMonoid R] → [CommMonoidWithZero R'] → [FunLike F R R'] → Prop

This is the corresponding extension of MonoidHomClass.

instance MulCharClass.toMonoidHomClass E0 #

∀ {F : Type u_3} {R : outParam (Type u_4)} {R' : outParam (Type u_5)} {inst : CommMonoid R}
  {inst_1 : CommMonoidWithZero R'} {inst_2 : FunLike F R R'} [self : MulCharClass F R R'], MonoidHomClass F R R'

ctor MulCharClass.mk E0 #

∀ {F : Type u_3} {R : outParam (Type u_4)} {R' : outParam (Type u_5)} [inst : CommMonoid R]
  [inst_1 : CommMonoidWithZero R'] [inst_2 : FunLike F R R'] [toMonoidHomClass : MonoidHomClass F R R'],
  (∀ (χ : F) {a : R}, ¬IsUnit a → χ a = 0) → MulCharClass F R R'

theorem MulCharClass.map_nonunit E0 #

∀ {F : Type u_3} {R : outParam (Type u_4)} {R' : outParam (Type u_5)} {inst : CommMonoid R}
  {inst_1 : CommMonoidWithZero R'} {inst_2 : FunLike F R R'} [self : MulCharClass F R R'] (χ : F) {a : R},
  ¬IsUnit a → χ a = 0

def MulChar.trivial E1 #

(R : Type u_1) → [inst : CommMonoid R] → (R' : Type u_2) → [inst_1 : CommMonoidWithZero R'] → MulChar R R'

The trivial multiplicative character. It takes the value 0 on non-units and the value 1 on units.

theorem MulChar.trivial_apply E0 #

∀ (R : Type u_1) [inst : CommMonoid R] (R' : Type u_2) [inst_1 : CommMonoidWithZero R'] (x : R),
  (MulChar.trivial R R') x = if IsUnit x then 1 else 0

theorem MulChar.coe_mk E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (f : R →* R')
  (hf : ∀ (a : R), ¬IsUnit a → (↑f).toFun a = 0), ⇑{ toMonoidHom := f, map_nonunit' := hf } = ⇑f

theorem MulChar.ext' E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] {χ χ' : MulChar R R'},
  (∀ (a : R), χ a = χ' a) → χ = χ'

Extensionality. See ext below for the version that will actually be used.

instance MulChar.instMulCharClass E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'],
  MulCharClass (MulChar R R') R R'

theorem MulChar.map_nonunit E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (χ : MulChar R R') {a : R},
  ¬IsUnit a → χ a = 0

theorem MulChar.ext E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] {χ χ' : MulChar R R'},
  (∀ (a : Rˣ), χ ↑a = χ' ↑a) → χ = χ'

Extensionality. Since MulChars always take the value zero on non-units, it is sufficient to compare the values on units.

theorem MulChar.ext_iff E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] {χ χ' : MulChar R R'},
  χ = χ' ↔ ∀ (a : Rˣ), χ ↑a = χ' ↑a

def MulChar.toUnitHom E1 #

{R : Type u_1} → [inst : CommMonoid R] → {R' : Type u_2} → [inst_1 : CommMonoidWithZero R'] → MulChar R R' → Rˣ →* R'ˣ

Turn a MulChar into a homomorphism between the unit groups.

theorem MulChar.coe_toUnitHom E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (χ : MulChar R R') (a : Rˣ),
  ↑(χ.toUnitHom a) = χ ↑a

def MulChar.ofUnitHom E1 #

{R : Type u_1} → [inst : CommMonoid R] → {R' : Type u_2} → [inst_1 : CommMonoidWithZero R'] → (Rˣ →* R'ˣ) → MulChar R R'

Turn a homomorphism between unit groups into a MulChar.

theorem MulChar.ofUnitHom_coe E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (f : Rˣ →* R'ˣ) (a : Rˣ),
  (MulChar.ofUnitHom f) ↑a = ↑(f a)

def MulChar.equivToUnitHom E3 #

{R : Type u_1} → [inst : CommMonoid R] → {R' : Type u_2} → [inst_1 : CommMonoidWithZero R'] → MulChar R R' ≃ (Rˣ →* R'ˣ)

The equivalence between multiplicative characters and homomorphisms of unit groups.

theorem MulChar.toUnitHom_eq E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (χ : MulChar R R'),
  χ.toUnitHom = MulChar.equivToUnitHom χ

theorem MulChar.ofUnitHom_eq E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (χ : Rˣ →* R'ˣ),
  MulChar.ofUnitHom χ = MulChar.equivToUnitHom.symm χ

theorem MulChar.coe_equivToUnitHom E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (χ : MulChar R R') (a : Rˣ),
  ↑((MulChar.equivToUnitHom χ) a) = χ ↑a

theorem MulChar.equivToUnitHom_symm_coe E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (f : Rˣ →* R'ˣ) (a : Rˣ),
  (MulChar.equivToUnitHom.symm f) ↑a = ↑(f a)

theorem MulChar.coe_toMonoidHom E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (χ : MulChar R R') (x : R),
  χ.toMonoidHom x = χ x

theorem MulChar.apply_ne_zero_iff E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] [Nontrivial R']
  {χ : MulChar R R'} {a : R}, χ a ≠ 0 ↔ IsUnit a

theorem MulChar.apply_eq_zero_iff E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] [Nontrivial R']
  {χ : MulChar R R'} {a : R}, χ a = 0 ↔ ¬IsUnit a

instance MulChar.instIsLocalHomOfNontrivial E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] [Nontrivial R']
  (χ : MulChar R R'), IsLocalHom χ

theorem MulChar.map_one E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (χ : MulChar R R'), χ 1 = 1

theorem MulChar.map_zero E0 #

∀ {R' : Type u_2} [inst : CommMonoidWithZero R'] {R : Type u_3} [inst_1 : CommMonoidWithZero R] [Nontrivial R]
  (χ : MulChar R R'), χ 0 = 0

If the domain has a zero (and is nontrivial), then χ 0 = 0.

def MulChar.toMonoidWithZeroHom E1 #

{R' : Type u_2} →
  [inst : CommMonoidWithZero R'] →
    {R : Type u_3} → [inst_1 : CommMonoidWithZero R] → [Nontrivial R] → MulChar R R' → R →*₀ R'

We can convert a multiplicative character into a homomorphism of monoids with zero when the source has a zero and another element.

theorem MulChar.toMonoidWithZeroHom_apply E0 #

∀ {R' : Type u_2} [inst : CommMonoidWithZero R'] {R : Type u_3} [inst_1 : CommMonoidWithZero R] [inst_2 : Nontrivial R]
  (χ : MulChar R R') (a : R), ↑χ a = (↑χ.toMonoidHom).toFun a

theorem MulChar.map_ringChar E0 #

∀ {R' : Type u_2} [inst : CommMonoidWithZero R'] {R : Type u_3} [inst_1 : CommSemiring R] [Nontrivial R]
  (χ : MulChar R R'), χ ↑(ringChar R) = 0

If the domain is a ring R, then χ (ringChar R) = 0.

instance MulChar.hasOne E0 #

{R : Type u_1} → [inst : CommMonoid R] → {R' : Type u_2} → [inst_1 : CommMonoidWithZero R'] → One (MulChar R R')

instance MulChar.inhabited E0 #

{R : Type u_1} → [inst : CommMonoid R] → {R' : Type u_2} → [inst_1 : CommMonoidWithZero R'] → Inhabited (MulChar R R')

theorem MulChar.one_apply_coe E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (a : Rˣ), 1 ↑a = 1

Evaluation of the trivial character

theorem MulChar.one_apply E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] {x : R}, IsUnit x → 1 x = 1

Evaluation of the trivial character

def MulChar.mul E1 #

{R : Type u_1} →
  [inst : CommMonoid R] →
    {R' : Type u_2} → [inst_1 : CommMonoidWithZero R'] → MulChar R R' → MulChar R R' → MulChar R R'

Multiplication of multiplicative characters. (This needs the target to be commutative.)

instance MulChar.hasMul E0 #

{R : Type u_1} → [inst : CommMonoid R] → {R' : Type u_2} → [inst_1 : CommMonoidWithZero R'] → Mul (MulChar R R')

theorem MulChar.mul_apply E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (χ χ' : MulChar R R') (a : R),
  (χ * χ') a = χ a * χ' a

theorem MulChar.coeToFun_mul E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (χ χ' : MulChar R R'),
  ⇑(χ * χ') = ⇑χ * ⇑χ'

theorem MulChar.one_mul E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (χ : MulChar R R'), 1 * χ = χ

theorem MulChar.mul_one E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (χ : MulChar R R'), χ * 1 = χ

def MulChar.inv E1 #

{R : Type u_1} →
  [inst : CommMonoid R] → {R' : Type u_2} → [inst_1 : CommMonoidWithZero R'] → MulChar R R' → MulChar R R'

The inverse of a multiplicative character. We define it as inverse ∘ χ.

instance MulChar.hasInv E0 #

{R : Type u_1} → [inst : CommMonoid R] → {R' : Type u_2} → [inst_1 : CommMonoidWithZero R'] → Inv (MulChar R R')

theorem MulChar.inv_apply_eq_inv E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (χ : MulChar R R') (a : R),
  χ⁻¹ a = Ring.inverse (χ a)

The inverse of a multiplicative character χ, applied to a, is the inverse of χ a.

theorem MulChar.inv_apply_eq_inv' E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_3} [inst_1 : CommGroupWithZero R'] (χ : MulChar R R') (a : R),
  χ⁻¹ a = (χ a)⁻¹

The inverse of a multiplicative character χ, applied to a, is the inverse of χ a. Variant when the target is a field

theorem MulChar.inv_apply E0 #

∀ {R' : Type u_2} [inst : CommMonoidWithZero R'] {R : Type u_3} [inst_1 : CommMonoidWithZero R] (χ : MulChar R R')
  (a : R), χ⁻¹ a = χ (Ring.inverse a)

When the domain has a zero, then the inverse of a multiplicative character χ, applied to a, is χ applied to the inverse of a.

theorem MulChar.inv_apply' E1 #

∀ {R' : Type u_2} [inst : CommMonoidWithZero R'] {R : Type u_3} [inst_1 : CommGroupWithZero R] (χ : MulChar R R')
  (a : R), χ⁻¹ a = χ a⁻¹

When the domain has a zero, then the inverse of a multiplicative character χ, applied to a, is χ applied to the inverse of a.

theorem MulChar.inv_mul E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (χ : MulChar R R'), χ⁻¹ * χ = 1

The product of a character with its inverse is the trivial character.

instance MulChar.commGroup E3 #

{R : Type u_1} → [inst : CommMonoid R] → {R' : Type u_2} → [inst_1 : CommMonoidWithZero R'] → CommGroup (MulChar R R')

The commutative group structure on MulChar R R'.

theorem MulChar.pow_apply_coe E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (χ : MulChar R R') (n : ℕ)
  (a : Rˣ), (χ ^ n) ↑a = χ ↑a ^ n

If a is a unit and n : ℕ, then (χ ^ n) a = (χ a) ^ n.

theorem MulChar.pow_apply' E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (χ : MulChar R R') {n : ℕ},
  n ≠ 0 → ∀ (a : R), (χ ^ n) a = χ a ^ n

If n is positive, then (χ ^ n) a = (χ a) ^ n.

theorem MulChar.equivToUnitHom_mul_apply E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (χ₁ χ₂ : MulChar R R') (a : Rˣ),
  (MulChar.equivToUnitHom (χ₁ * χ₂)) a = (MulChar.equivToUnitHom χ₁) a * (MulChar.equivToUnitHom χ₂) a

def MulChar.mulEquivToUnitHom E1 #

{R : Type u_1} →
  [inst : CommMonoid R] → {R' : Type u_2} → [inst_1 : CommMonoidWithZero R'] → MulChar R R' ≃* (Rˣ →* R'ˣ)

The equivalence between multiplicative characters and homomorphisms of unit groups as a multiplicative equivalence.

theorem MulChar.mulEquivToUnitHom_apply E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (χ : MulChar R R'),
  MulChar.mulEquivToUnitHom χ = MulChar.equivToUnitHom χ

theorem MulChar.mulEquivToUnitHom_symm_apply E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] (f : Rˣ →* R'ˣ),
  MulChar.mulEquivToUnitHom.symm f = MulChar.equivToUnitHom.symm f

def MulChar.domRestrict E1 #

{R : Type u_1} →
  [inst : CommMonoid R] →
    {R' : Type u_2} →
      [inst_1 : CommMonoidWithZero R'] →
        {S : Type u_3} →
          [inst_2 : SetLike S R] → [inst_3 : SubmonoidClass S R] → (T : S) → MulChar R R' → MulChar (↥T) R'

The restriction of a MulChar to a submonoid.

theorem MulChar.domRestrict_apply E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] {S : Type u_3}
  [inst_2 : SetLike S R] [inst_3 : SubmonoidClass S R] (T : S) (χ : MulChar R R') (x : ↥T),
  (MulChar.domRestrict T χ) x = if IsUnit x then χ ↑x else 0

def MulChar.domRestrictHom E1 #

{R : Type u_1} →
  [inst : CommMonoid R] →
    {S : Type u_3} →
      [inst_1 : SetLike S R] →
        [inst_2 : SubmonoidClass S R] →
          (T : S) → (R'' : Type u_4) → [inst_3 : CommMonoidWithZero R''] → MulChar R R'' →* MulChar (↥T) R''

The restriction of a MulChar to a submonoid as an homomorphism.

theorem MulChar.domRestrictHom_apply E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {S : Type u_3} [inst_1 : SetLike S R] [inst_2 : SubmonoidClass S R] (T : S)
  (R'' : Type u_4) [inst_3 : CommMonoidWithZero R''] (χ : MulChar R R''),
  (MulChar.domRestrictHom T R'') χ = MulChar.domRestrict T χ

theorem MulChar.ne_one_iff E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] {χ : MulChar R R'},
  χ ≠ 1 ↔ ∃ a, χ ↑a ≠ 1

theorem MulChar.domRestrict_eq_one_iff E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommMonoidWithZero R'] {S : Type u_3}
  [inst_2 : SetLike S R] [inst_3 : SubmonoidClass S R] {T : S} {χ : MulChar R R'},
  MulChar.domRestrict T χ = 1 ↔ ∀ (x : (↥T)ˣ), χ ↑↑x = 1

def MulChar.IsQuadratic E1 #

{R : Type u_1} → [inst : CommMonoid R] → {R' : Type u_2} → [inst_1 : CommRing R'] → MulChar R R' → Prop

A multiplicative character is quadratic if it takes only the values 0, 1, -1.

def MulChar.ringHomComp E1 #

{R : Type u_1} →
  [inst : CommMonoid R] →
    {R' : Type u_2} →
      [inst_1 : CommRing R'] → {R'' : Type u_3} → [inst_2 : CommRing R''] → MulChar R R' → (R' →+* R'') → MulChar R R''

We can post-compose a multiplicative character with a ring homomorphism.

theorem MulChar.ringHomComp_apply E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommRing R'] {R'' : Type u_3} [inst_2 : CommRing R'']
  (χ : MulChar R R') (f : R' →+* R'') (a : R), (χ.ringHomComp f) a = f (χ a)

theorem MulChar.ringHomComp_one E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommRing R'] {R'' : Type u_3} [inst_2 : CommRing R'']
  (f : R' →+* R''), MulChar.ringHomComp 1 f = 1

theorem MulChar.ringHomComp_inv E1 #

∀ {R' : Type u_2} [inst : CommRing R'] {R'' : Type u_3} [inst_1 : CommRing R''] {R : Type u_4}
  [inst_2 : CommMonoidWithZero R] (χ : MulChar R R') (f : R' →+* R''), (χ.ringHomComp f)⁻¹ = χ⁻¹.ringHomComp f

theorem MulChar.ringHomComp_mul E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommRing R'] {R'' : Type u_3} [inst_2 : CommRing R'']
  (χ φ : MulChar R R') (f : R' →+* R''), (χ * φ).ringHomComp f = χ.ringHomComp f * φ.ringHomComp f

theorem MulChar.ringHomComp_pow E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommRing R'] {R'' : Type u_3} [inst_2 : CommRing R'']
  (χ : MulChar R R') (f : R' →+* R'') (n : ℕ), χ.ringHomComp f ^ n = (χ ^ n).ringHomComp f

def MulChar.ringHomCompHom E1 #

{R : Type u_1} →
  [inst : CommMonoid R] →
    {R' : Type u_2} →
      [inst_1 : CommRing R'] → {R'' : Type u_3} → [inst_2 : CommRing R''] → (R' →+* R'') → MulChar R R' →* MulChar R R''

Bundled version of MulChar.ringHomComp as a MonoidHom.

theorem MulChar.ringHomCompHom_apply E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommRing R'] {R'' : Type u_3} [inst_2 : CommRing R'']
  (f : R' →+* R'') (χ : MulChar R R'), (MulChar.ringHomCompHom f) χ = χ.ringHomComp f

theorem MulChar.ringHomComp_zpow E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommRing R'] {R'' : Type u_3} [inst_2 : CommRing R'']
  (χ : MulChar R R') (f : R' →+* R'') (n : ℤ), χ.ringHomComp f ^ n = (χ ^ n).ringHomComp f

theorem MulChar.zpow_apply_coe E0 #

∀ {R : Type u_4} [inst : CommGroupWithZero R] {R' : Type u_5} [inst_1 : CommRing R'] (χ : MulChar R R') (n : ℤ)
  (a : Rˣ), (χ ^ n) ↑a = χ ↑(a ^ n)

If a is a unit and n : ℤ, then (χ ^ n) a = χ (a ^ n).

theorem MulChar.injective_ringHomComp E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommRing R'] {R'' : Type u_3} [inst_2 : CommRing R'']
  {f : R' →+* R''}, Function.Injective ⇑f → Function.Injective fun x ↦ x.ringHomComp f

theorem MulChar.ringHomComp_eq_one_iff E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommRing R'] {R'' : Type u_3} [inst_2 : CommRing R'']
  {f : R' →+* R''}, Function.Injective ⇑f → ∀ {χ : MulChar R R'}, χ.ringHomComp f = 1 ↔ χ = 1

theorem MulChar.ringHomComp_ne_one_iff E0 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommRing R'] {R'' : Type u_3} [inst_2 : CommRing R'']
  {f : R' →+* R''}, Function.Injective ⇑f → ∀ {χ : MulChar R R'}, χ.ringHomComp f ≠ 1 ↔ χ ≠ 1

theorem MulChar.IsQuadratic.comp E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommRing R'] {R'' : Type u_3} [inst_2 : CommRing R'']
  {χ : MulChar R R'}, χ.IsQuadratic → ∀ (f : R' →+* R''), (χ.ringHomComp f).IsQuadratic

Composition with a ring homomorphism preserves the property of being a quadratic character.

theorem MulChar.IsQuadratic.inv E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommRing R'] {χ : MulChar R R'},
  χ.IsQuadratic → χ⁻¹ = χ

The inverse of a quadratic character is itself. →

theorem MulChar.IsQuadratic.sq_eq_one E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommRing R'] {χ : MulChar R R'},
  χ.IsQuadratic → χ ^ 2 = 1

The square of a quadratic character is the trivial character.

theorem MulChar.IsQuadratic.pow_char E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommRing R'] {χ : MulChar R R'},
  χ.IsQuadratic → ∀ (p : ℕ) [hp : Fact (Nat.Prime p)] [CharP R' p], χ ^ p = χ

The pth power of a quadratic character is itself, when p is the (prime) characteristic of the target ring.

theorem MulChar.IsQuadratic.pow_even E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommRing R'] {χ : MulChar R R'},
  χ.IsQuadratic → ∀ {n : ℕ}, Even n → χ ^ n = 1

The nth power of a quadratic character is the trivial character, when n is even.

theorem MulChar.IsQuadratic.pow_odd E1 #

∀ {R : Type u_1} [inst : CommMonoid R] {R' : Type u_2} [inst_1 : CommRing R'] {χ : MulChar R R'},
  χ.IsQuadratic → ∀ {n : ℕ}, Odd n → χ ^ n = χ

The nth power of a quadratic character is itself, when n is odd.

theorem MulChar.isQuadratic_iff_sq_eq_one E1 #

∀ {M : Type u_4} {R : Type u_5} [inst : CommMonoid M] [inst_1 : CommRing R] [NoZeroDivisors R] [Nontrivial R]
  {χ : MulChar M R}, χ.IsQuadratic ↔ χ ^ 2 = 1

A multiplicative character χ into an integral domain is quadratic if and only if χ^2 = 1.

theorem MulChar.pow_card_eq_one E1 #

∀ {M : Type u_1} [inst : CommMonoid M] {R : Type u_2} [inst_1 : CommMonoidWithZero R] [inst_2 : Fintype Mˣ]
  (χ : MulChar M R), χ ^ Fintype.card Mˣ = 1

If χ is a multiplicative character on a commutative monoid M with finitely many units, then χ ^ #Mˣ = 1.

theorem MulChar.orderOf_pos E1 #

∀ {M : Type u_1} [inst : CommMonoid M] {R : Type u_2} [inst_1 : CommMonoidWithZero R] [Finite Mˣ] (χ : MulChar M R),
  0 < orderOf χ

A multiplicative character on a commutative monoid with finitely many units has finite (= positive) order.

theorem MulChar.sum_eq_zero_of_ne_one E1 #

∀ {R : Type u_1} [inst : CommMonoid R] [inst_1 : Fintype R] {R' : Type u_2} [inst_2 : CommRing R'] [IsDomain R']
  {χ : MulChar R R'}, χ ≠ 1 → ∑ a, χ a = 0

The sum over all values of a nontrivial multiplicative character on a finite ring is zero (when the target is a domain).

theorem MulChar.sum_one_eq_card_units E1 #

∀ {R : Type u_1} [inst : CommMonoid R] [inst_1 : Fintype R] {R' : Type u_2} [inst_2 : CommRing R']
  [inst_3 : DecidableEq R], ∑ a, 1 a = ↑(Fintype.card Rˣ)

The sum over all values of the trivial multiplicative character on a finite ring is the cardinality of its unit group.

theorem MulChar.val_neg_one_eq_one_of_odd_order E0 #

∀ {R : Type u_1} {R' : Type u_2} [inst : CommRing R] [inst_1 : CommMonoidWithZero R'] {χ : MulChar R R'} {n : ℕ},
  Odd n → χ ^ n = 1 → χ (-1) = 1

If χ is of odd order, then χ(-1) = 1

Deprecated aliases

NameNew nameSince
MulChar.restrictMulChar.domRestrict2026-07-19
MulChar.restrictHomMulChar.domRestrictHom2026-07-19
MulChar.restrictHom_applyMulChar.domRestrictHom_apply2026-07-19
MulChar.restrict_applyMulChar.domRestrict_apply2026-07-19
MulChar.restrict_eq_one_iffMulChar.domRestrict_eq_one_iff2026-07-19