Multiplicative characters of finite rings and fields #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
Let R
and R'
be a 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 mul_char
for the definitions and results.
Main results #
We show that the multiplicative characters form a group (if R'
is commutative);
see mul_char.comm_group
. We also provide an equivalence with the
homomorphisms Rˣ →* R'ˣ
; see mul_char.equiv_to_unit_hom
.
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 mul_char.is_nontrivial.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.
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.
Instances for mul_char
- to_monoid_hom_class : monoid_hom_class F R R'
- map_nonunit : ∀ (χ : F) {a : R}, ¬is_unit a → ⇑χ a = 0
This is the corresponding extension of monoid_hom_class
.
Instances of this typeclass
Instances of other typeclasses for mul_char_class
- mul_char_class.has_sizeof_inst
Equations
- mul_char.coe_to_fun = {coe := λ (χ : mul_char R R'), χ.to_monoid_hom.to_fun}
See note [custom simps projection]
Equations
The trivial multiplicative character. It takes the value 0
on non-units and
the value 1
on units.
Equations
- mul_char.trivial R R' = {to_monoid_hom := {to_fun := λ (x : R), ite (is_unit x) 1 0, map_one' := _, map_mul' := _}, map_nonunit' := _}
Extensionality. See ext
below for the version that will actually be used.
Equations
- mul_char.mul_char_class = {to_monoid_hom_class := {coe := λ (χ : mul_char R R'), χ.to_monoid_hom.to_fun, coe_injective' := _, map_mul := _, map_one := _}, map_nonunit := _}
Equivalence of multiplicative characters with homomorphisms on units #
We show that restriction / extension by zero gives an equivalence
between mul_char R R'
and Rˣ →* R'ˣ
.
Turn a mul_char
into a homomorphism between the unit groups.
Equations
- χ.to_unit_hom = units.map ↑χ
Turn a homomorphism between unit groups into a mul_char
.
The equivalence between multiplicative characters and homomorphisms of unit groups.
Equations
- mul_char.equiv_to_unit_hom = {to_fun := mul_char.to_unit_hom _inst_2, inv_fun := mul_char.of_unit_hom _inst_2, left_inv := _, right_inv := _}
Commutative group structure on multiplicative characters #
The multiplicative characters R → R'
form a commutative group.
If the domain has a zero (and is nontrivial), then χ 0 = 0
.
If the domain is a ring R
, then χ (ring_char R) = 0
.
Equations
- mul_char.has_one = {one := mul_char.trivial R R' _inst_2}
Equations
- mul_char.inhabited = {default := 1}
Evaluation of the trivial character
Multiplication of multiplicative characters. (This needs the target to be commutative.)
Equations
- mul_char.has_mul = {mul := mul_char.mul _inst_2}
The inverse of a multiplicative character. We define it as inverse ∘ χ
.
Equations
- χ.inv = {to_monoid_hom := {to_fun := λ (a : R), ⇑monoid_with_zero.inverse (⇑χ a), map_one' := _, map_mul' := _}, map_nonunit' := _}
Equations
- mul_char.has_inv = {inv := mul_char.inv _inst_2}
The inverse of a multiplicative character χ
, applied to a
, is the inverse of χ a
.
When the domain has a zero, then the inverse of a multiplicative character χ
,
applied to a
, is χ
applied to the inverse of a
.
The product of a character with its inverse is the trivial character.
The commutative group structure on mul_char R R'
.
Equations
- mul_char.comm_group = {mul := has_mul.mul mul_char.has_mul, mul_assoc := _, one := 1, one_mul := _, mul_one := _, npow := group.npow._default 1 has_mul.mul mul_char.one_mul mul_char.mul_one, npow_zero' := _, npow_succ' := _, inv := has_inv.inv mul_char.has_inv, div := group.div._default has_mul.mul mul_char.comm_group._proof_4 1 mul_char.one_mul mul_char.mul_one (group.npow._default 1 has_mul.mul mul_char.one_mul mul_char.mul_one) mul_char.comm_group._proof_5 mul_char.comm_group._proof_6 has_inv.inv, div_eq_mul_inv := _, zpow := group.zpow._default has_mul.mul mul_char.comm_group._proof_8 1 mul_char.one_mul mul_char.mul_one (group.npow._default 1 has_mul.mul mul_char.one_mul mul_char.mul_one) mul_char.comm_group._proof_9 mul_char.comm_group._proof_10 has_inv.inv, zpow_zero' := _, zpow_succ' := _, zpow_neg' := _, mul_left_inv := _, mul_comm := _}
If n
is positive, then (χ ^ n) a = (χ a) ^ n
.
Properties of multiplicative characters #
We introduce the properties of being nontrivial or quadratic and prove some basic facts about them.
We now assume that domain and target are commutative rings.
A multiplicative character is nontrivial iff it is not the trivial character.
If two values of quadratic characters with target ℤ
agree after coercion into a ring
of characteristic not 2
, then they agree in ℤ
.
We can post-compose a multiplicative character with a ring homomorphism.
Equations
- χ.ring_hom_comp f = {to_monoid_hom := {to_fun := λ (a : R), ⇑f (⇑χ a), map_one' := _, map_mul' := _}, map_nonunit' := _}
Composition with an injective ring homomorphism preserves nontriviality.
Composition with a ring homomorphism preserves the property of being a quadratic character.
The inverse of a quadratic character is itself. →
The square of a quadratic character is the trivial character.
The sum over all values of a nontrivial multiplicative character on a finite ring is zero (when the target is a domain).
The sum over all values of the trivial multiplicative character on a finite ring is the cardinality of its unit group.