Instances on spaces of monoid and group morphisms #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
We endow the space of monoid morphisms M →* N
with a comm_monoid
structure when the target is
commutative, through pointwise multiplication, and with a comm_group
structure when the target
is a commutative group. We also prove the same instances for additive situations.
Since these structures permit morphisms of morphisms, we also provide some composition-like operations.
Finally, we provide the ring
structure on add_monoid.End
.
(M →+ N)
is an add_comm_monoid
if N
is commutative.
Equations
- add_monoid_hom.add_comm_monoid = {add := has_add.add add_monoid_hom.has_add, add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := λ (n : ℕ) (f : M →+ N), {to_fun := λ (x : M), n • ⇑f x, map_zero' := _, map_add' := _}, nsmul_zero' := _, nsmul_succ' := _, add_comm := _}
(M →* N)
is a comm_monoid
if N
is commutative.
Equations
- monoid_hom.comm_monoid = {mul := has_mul.mul monoid_hom.has_mul, mul_assoc := _, one := 1, one_mul := _, mul_one := _, npow := λ (n : ℕ) (f : M →* N), {to_fun := λ (x : M), ⇑f x ^ n, map_one' := _, map_mul' := _}, npow_zero' := _, npow_succ' := _, mul_comm := _}
If G
is a commutative group, then M →* G
is a commutative group too.
Equations
- monoid_hom.comm_group = {mul := comm_monoid.mul monoid_hom.comm_monoid, mul_assoc := _, one := comm_monoid.one monoid_hom.comm_monoid, one_mul := _, mul_one := _, npow := comm_monoid.npow monoid_hom.comm_monoid, npow_zero' := _, npow_succ' := _, inv := has_inv.inv monoid_hom.has_inv, div := has_div.div monoid_hom.has_div, div_eq_mul_inv := _, zpow := λ (n : ℤ) (f : M →* G), {to_fun := λ (x : M), ⇑f x ^ n, map_one' := _, map_mul' := _}, zpow_zero' := _, zpow_succ' := _, zpow_neg' := _, mul_left_inv := _, mul_comm := _}
If G
is an additive commutative group, then M →+ G
is an additive commutative
group too.
Equations
- add_monoid_hom.add_comm_group = {add := add_comm_monoid.add add_monoid_hom.add_comm_monoid, add_assoc := _, zero := add_comm_monoid.zero add_monoid_hom.add_comm_monoid, zero_add := _, add_zero := _, nsmul := add_comm_monoid.nsmul add_monoid_hom.add_comm_monoid, nsmul_zero' := _, nsmul_succ' := _, neg := has_neg.neg add_monoid_hom.has_neg, sub := has_sub.sub add_monoid_hom.has_sub, sub_eq_add_neg := _, zsmul := λ (n : ℤ) (f : M →+ G), {to_fun := λ (x : M), n • ⇑f x, map_zero' := _, map_add' := _}, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _}
Equations
- add_monoid.End.semiring = {add := add_comm_monoid.add add_monoid_hom.add_comm_monoid, add_assoc := _, zero := add_comm_monoid.zero add_monoid_hom.add_comm_monoid, zero_add := _, add_zero := _, nsmul := add_comm_monoid.nsmul add_monoid_hom.add_comm_monoid, nsmul_zero' := _, nsmul_succ' := _, add_comm := _, mul := monoid.mul (add_monoid.End.monoid M), left_distrib := _, right_distrib := _, zero_mul := _, mul_zero := _, mul_assoc := _, one := monoid.one (add_monoid.End.monoid M), one_mul := _, mul_one := _, nat_cast := λ (n : ℕ), n • 1, nat_cast_zero := _, nat_cast_succ := _, npow := monoid.npow (add_monoid.End.monoid M), npow_zero' := _, npow_succ' := _}
See also add_monoid.End.nat_cast_def
.
Equations
- add_monoid.End.ring = {add := semiring.add add_monoid.End.semiring, add_assoc := _, zero := semiring.zero add_monoid.End.semiring, zero_add := _, add_zero := _, nsmul := semiring.nsmul add_monoid.End.semiring, nsmul_zero' := _, nsmul_succ' := _, neg := add_comm_group.neg add_monoid_hom.add_comm_group, sub := add_comm_group.sub add_monoid_hom.add_comm_group, sub_eq_add_neg := _, zsmul := add_comm_group.zsmul add_monoid_hom.add_comm_group, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, int_cast := λ (z : ℤ), z • 1, nat_cast := semiring.nat_cast add_monoid.End.semiring, one := semiring.one add_monoid.End.semiring, nat_cast_zero := _, nat_cast_succ := _, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _, mul := semiring.mul add_monoid.End.semiring, mul_assoc := _, one_mul := _, mul_one := _, npow := semiring.npow add_monoid.End.semiring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _}
See also add_monoid.End.int_cast_def
.
Morphisms of morphisms #
The structures above permit morphisms that themselves produce morphisms, provided the codomain is commutative.
flip
arguments of f : M →* N →* P
flip
arguments of f : M →+ N →+ P
Evaluation of an add_monoid_hom
at a point as an additive monoid homomorphism.
See also add_monoid_hom.apply
for the evaluation of any function at a point.
Equations
- add_monoid_hom.eval = (add_monoid_hom.id (M →+ N)).flip
Evaluation of a monoid_hom
at a point as a monoid homomorphism. See also monoid_hom.apply
for the evaluation of any function at a point.
Equations
- monoid_hom.eval = (monoid_hom.id (M →* N)).flip
The expression λ g m, g (f m)
as a add_monoid_hom
.
Equivalently, (λ g, monoid_hom.comp g f)
as a add_monoid_hom
.
This also exists in a linear_map
version, linear_map.lcomp
.
Equations
- f.comp_hom' = (add_monoid_hom.eval.comp f).flip
The expression λ g m, g (f m)
as a monoid_hom
.
Equivalently, (λ g, monoid_hom.comp g f)
as a monoid_hom
.
Equations
- f.comp_hom' = (monoid_hom.eval.comp f).flip
Composition of monoid morphisms (monoid_hom.comp
) as a monoid morphism.
Note that unlike monoid_hom.comp_hom'
this requires commutativity of N
.
Composition of additive monoid morphisms (add_monoid_hom.comp
) as an additive
monoid morphism.
Note that unlike add_monoid_hom.comp_hom'
this requires commutativity of N
.
This also exists in a linear_map
version, linear_map.llcomp
.
Flipping arguments of additive monoid morphisms (add_monoid_hom.flip
)
as an additive monoid morphism.
Equations
- add_monoid_hom.flip_hom = {to_fun := add_monoid_hom.flip mP, map_zero' := _, map_add' := _}
Flipping arguments of monoid morphisms (monoid_hom.flip
) as a monoid morphism.
Equations
- monoid_hom.flip_hom = {to_fun := monoid_hom.flip mP, map_one' := _, map_mul' := _}
The expression λ m q, f m (g q)
as an add_monoid_hom
.
Note that the expression λ q n, f (g q) n
is simply add_monoid_hom.comp
.
This also exists as a linear_map
version, linear_map.compl₂
The expression λ m q, f m (g q)
as a monoid_hom
.
Note that the expression λ q n, f (g q) n
is simply monoid_hom.comp
.
The expression λ m n, g (f m n)
as a monoid_hom
.
Equations
- f.compr₂ g = (⇑monoid_hom.comp_hom g).comp f
The expression λ m n, g (f m n)
as an add_monoid_hom
.
This also exists as a linear_map version, linear_map.compr₂
Equations
- f.compr₂ g = (⇑add_monoid_hom.comp_hom g).comp f
Miscellaneous definitions #
Due to the fact this file imports algebra.group_power.basic
, it is not possible to import it in
some of the lower-level files like algebra.ring.basic
. The following lemmas should be rehomed
if the import structure permits them to be.
Multiplication of an element of a (semi)ring is an add_monoid_hom
in both arguments.
This is a more-strongly bundled version of add_monoid_hom.mul_left
and add_monoid_hom.mul_right
.
Stronger versions of this exists for algebras as linear_map.mul
, non_unital_alg_hom.mul
and algebra.lmul
.
Equations
- add_monoid_hom.mul = {to_fun := add_monoid_hom.mul_left _inst_1, map_zero' := _, map_add' := _}
An add_monoid_hom
preserves multiplication if pre- and post- composition with
add_monoid_hom.mul
are equivalent. By converting the statement into an equality of
add_monoid_hom
s, this lemma allows various specialized ext
lemmas about →+
to then be applied.
The left multiplication map: (a, b) ↦ a * b
. See also add_monoid_hom.mul_left
.
Equations
The right multiplication map: (a, b) ↦ b * a
. See also add_monoid_hom.mul_right
.