Operations on submonoid
s #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
In this file we define various operations on submonoid
s and monoid_hom
s.
Main definitions #
Conversion between multiplicative and additive definitions #
submonoid.to_add_submonoid
,submonoid.to_add_submonoid'
,add_submonoid.to_submonoid
,add_submonoid.to_submonoid'
: convert between multiplicative and additive submonoids ofM
,multiplicative M
, andadditive M
. These are stated asorder_iso
s.
(Commutative) monoid structure on a submonoid #
submonoid.to_monoid
,submonoid.to_comm_monoid
: a submonoid inherits a (commutative) monoid structure.
Group actions by submonoids #
submonoid.mul_action
,submonoid.distrib_mul_action
: a submonoid inherits (distributive) multiplicative actions.
Operations on submonoids #
submonoid.comap
: preimage of a submonoid under a monoid homomorphism as a submonoid of the domain;submonoid.map
: image of a submonoid under a monoid homomorphism as a submonoid of the codomain;submonoid.prod
: product of two submonoidss : submonoid M
andt : submonoid N
as a submonoid ofM × N
;
Monoid homomorphisms between submonoid #
submonoid.subtype
: embedding of a submonoid into the ambient monoid.submonoid.inclusion
: given two submonoidsS
,T
such thatS ≤ T
,S.inclusion T
is the inclusion ofS
intoT
as a monoid homomorphism;mul_equiv.submonoid_congr
: converts a proof ofS = T
into a monoid isomorphism betweenS
andT
.submonoid.prod_equiv
: monoid isomorphism betweens.prod t
ands × t
;
Operations on monoid_hom
s #
monoid_hom.mrange
: range of a monoid homomorphism as a submonoid of the codomain;monoid_hom.mker
: kernel of a monoid homomorphism as a submonoid of the domain;monoid_hom.restrict
: restrict a monoid homomorphism to a submonoid;monoid_hom.cod_restrict
: restrict the codomain of a monoid homomorphism to a submonoid;monoid_hom.mrange_restrict
: restrict a monoid homomorphism to its range;
Tags #
submonoid, range, product, map, comap
Conversion to/from additive
/multiplicative
#
Submonoids of monoid M
are isomorphic to additive submonoids of additive M
.
Equations
- submonoid.to_add_submonoid = {to_equiv := {to_fun := λ (S : submonoid M), {carrier := ⇑additive.to_mul ⁻¹' ↑S, add_mem' := _, zero_mem' := _}, inv_fun := λ (S : add_submonoid (additive M)), {carrier := ⇑additive.of_mul ⁻¹' ↑S, mul_mem' := _, one_mem' := _}, left_inv := _, right_inv := _}, map_rel_iff' := _}
Additive submonoids of an additive monoid additive M
are isomorphic to submonoids of M
.
Additive submonoids of an additive monoid A
are isomorphic to
multiplicative submonoids of multiplicative A
.
Equations
- add_submonoid.to_submonoid = {to_equiv := {to_fun := λ (S : add_submonoid A), {carrier := ⇑multiplicative.to_add ⁻¹' ↑S, mul_mem' := _, one_mem' := _}, inv_fun := λ (S : submonoid (multiplicative A)), {carrier := ⇑multiplicative.of_add ⁻¹' ↑S, add_mem' := _, zero_mem' := _}, left_inv := _, right_inv := _}, map_rel_iff' := _}
Submonoids of a monoid multiplicative A
are isomorphic to additive submonoids of A
.
comap
and map
#
The preimage of a submonoid along a monoid homomorphism is a submonoid.
The preimage of an add_submonoid
along an add_monoid
homomorphism is an
add_submonoid
.
The image of a submonoid along a monoid homomorphism is a submonoid.
The image of an add_submonoid
along an add_monoid
homomorphism is
an add_submonoid
.
map f
and comap f
form a galois_coinsertion
when f
is injective.
Equations
map f
and comap f
form a galois_coinsertion
when f
is injective.
Equations
map f
and comap f
form a galois_insertion
when f
is surjective.
Equations
map f
and comap f
form a galois_insertion
when f
is surjective.
Equations
A submonoid of a monoid inherits a 1.
Equations
- one_mem_class.has_one S' = {one := ⟨1, _⟩}
An add_submonoid
of an add_monoid
inherits a zero.
Equations
- zero_mem_class.has_zero S' = {zero := ⟨0, _⟩}
An add_submonoid
of an add_monoid
inherits a scalar multiplication.
An add_submonoid
of an unital additive magma inherits an unital additive magma
structure.
Equations
A submonoid of a unital magma inherits a unital magma structure.
Equations
A submonoid of a monoid inherits a monoid structure.
Equations
An add_submonoid
of an add_monoid
inherits an add_monoid
structure.
Equations
A submonoid of a comm_monoid
is a comm_monoid
.
Equations
An add_submonoid
of an add_comm_monoid
is
an add_comm_monoid
.
Equations
An add_submonoid
of an ordered_add_comm_monoid
is
an ordered_add_comm_monoid
.
Equations
A submonoid of an ordered_comm_monoid
is an ordered_comm_monoid
.
Equations
An add_submonoid
of a linear_ordered_add_comm_monoid
is
a linear_ordered_add_comm_monoid
.
Equations
A submonoid of a linear_ordered_comm_monoid
is a linear_ordered_comm_monoid
.
Equations
An add_submonoid
of an ordered_cancel_add_comm_monoid
is
an ordered_cancel_add_comm_monoid
.
A submonoid of an ordered_cancel_comm_monoid
is an ordered_cancel_comm_monoid
.
A submonoid of a linear_ordered_cancel_comm_monoid
is a linear_ordered_cancel_comm_monoid
.
Equations
An add_submonoid
of a linear_ordered_cancel_add_comm_monoid
is
a linear_ordered_cancel_add_comm_monoid
.
The natural monoid hom from a submonoid of monoid M
to M
.
Equations
- submonoid_class.subtype S' = {to_fun := coe coe_to_lift, map_one' := _, map_mul' := _}
The natural monoid hom from an add_submonoid
of add_monoid
M
to M
.
Equations
- add_submonoid_class.subtype S' = {to_fun := coe coe_to_lift, map_zero' := _, map_add' := _}
An add_submonoid
of an add_monoid
inherits an addition.
An add_submonoid
of an add_monoid
inherits a zero.
An add_submonoid
of an unital additive magma inherits an unital additive magma
structure.
Equations
A submonoid of a unital magma inherits a unital magma structure.
Equations
An add_submonoid
of an add_monoid
inherits an add_monoid
structure.
Equations
- S.to_add_monoid = function.injective.add_monoid coe _ _ _ _
An add_submonoid
of an add_comm_monoid
is
an add_comm_monoid
.
Equations
A submonoid of a comm_monoid
is a comm_monoid
.
Equations
- S.to_comm_monoid = function.injective.comm_monoid coe _ _ _ _
An add_submonoid
of an ordered_add_comm_monoid
is
an ordered_add_comm_monoid
.
Equations
A submonoid of an ordered_comm_monoid
is an ordered_comm_monoid
.
Equations
An add_submonoid
of a linear_ordered_add_comm_monoid
is
a linear_ordered_add_comm_monoid
.
Equations
A submonoid of a linear_ordered_comm_monoid
is a linear_ordered_comm_monoid
.
Equations
An add_submonoid
of an ordered_cancel_add_comm_monoid
is
an ordered_cancel_add_comm_monoid
.
Equations
A submonoid of an ordered_cancel_comm_monoid
is an ordered_cancel_comm_monoid
.
Equations
An add_submonoid
of a linear_ordered_cancel_add_comm_monoid
is
a linear_ordered_cancel_add_comm_monoid
.
Equations
A submonoid of a linear_ordered_cancel_comm_monoid
is a linear_ordered_cancel_comm_monoid
.
Equations
The natural monoid hom from an add_submonoid
of add_monoid
M
to M
.
The natural monoid hom from a submonoid of monoid M
to M
.
An additive subgroup is isomorphic to its image under an injective function. If you
have an isomorphism, use add_equiv.add_submonoid_map
for better definitional equalities.
A subgroup is isomorphic to its image under an injective function. If you have an isomorphism,
use mul_equiv.submonoid_map
for better definitional equalities.
Given submonoid
s s
, t
of monoids M
, N
respectively, s × t
as a submonoid
of M × N
.
Given add_submonoid
s s
, t
of add_monoid
s A
, B
respectively, s × t
as an add_submonoid
of A × B
.
The product of submonoids is isomorphic to their product as monoids.
The product of additive submonoids is isomorphic to their product as additive monoids
For many categories (monoids, modules, rings, ...) the set-theoretic image of a morphism f
is
a subobject of the codomain. When this is the case, it is useful to define the range of a morphism
in such a way that the underlying carrier set of the range subobject is definitionally
set.range f
. In particular this means that the types ↥(set.range f)
and ↥f.range
are
interchangeable without proof obligations.
A convenient candidate definition for range which is mathematically correct is map ⊤ f
, just as
set.range
could have been defined as f '' set.univ
. However, this lacks the desired definitional
convenience, in that it both does not match set.range
, and that it introduces a redudant x ∈ ⊤
term which clutters proofs. In such a case one may resort to the copy
pattern. A copy
function converts the definitional problem for the carrier set of a subobject
into a one-off propositional proof obligation which one discharges while writing the definition of
the definitionally convenient range (the parameter hs
in the example below).
A good example is the case of a morphism of monoids. A convenient definition for
monoid_hom.mrange
would be (⊤ : submonoid M).map f
. However since this lacks the required
definitional convenience, we first define submonoid.copy
as follows:
protected def copy (S : submonoid M) (s : set M) (hs : s = S) : submonoid M :=
{ carrier := s,
one_mem' := hs.symm ▸ S.one_mem',
mul_mem' := hs.symm ▸ S.mul_mem' }
and then finally define:
The range of a monoid homomorphism is a submonoid. See Note [range copy pattern].
Equations
- monoid_hom.mrange f = (submonoid.map f ⊤).copy (set.range ⇑f) _
Instances for ↥monoid_hom.mrange
The range of an add_monoid_hom
is an add_submonoid
.
Equations
- add_monoid_hom.mrange f = (add_submonoid.map f ⊤).copy (set.range ⇑f) _
Instances for ↥add_monoid_hom.mrange
The range of a surjective add_monoid
hom is the whole of the codomain.
The range of a surjective monoid hom is the whole of the codomain.
The image under an add_monoid
hom of the add_submonoid
generated by a set equals
the add_submonoid
generated by the image of the set.
The image under a monoid hom of the submonoid generated by a set equals the submonoid generated by the image of the set.
Restriction of an add_monoid hom to an add_submonoid
of the domain.
Equations
- f.restrict s = f.comp (add_submonoid_class.subtype s)
Restriction of a monoid hom to a submonoid of the domain.
Equations
- f.restrict s = f.comp (submonoid_class.subtype s)
Restriction of an add_monoid
hom to an add_submonoid
of the codomain.
Restriction of a monoid hom to a submonoid of the codomain.
Restriction of an add_monoid
hom to its range interpreted as a submonoid.
Equations
- f.mrange_restrict = f.cod_restrict (add_monoid_hom.mrange f) _
Restriction of a monoid hom to its range interpreted as a submonoid.
Equations
- f.mrange_restrict = f.cod_restrict (monoid_hom.mrange f) _
The multiplicative kernel of a monoid homomorphism is the submonoid of elements x : G
such
that f x = 1
Equations
The additive kernel of an add_monoid
homomorphism is the add_submonoid
of
elements such that f x = 0
Equations
Equations
- add_monoid_hom.decidable_mem_mker f = λ (x : M), decidable_of_iff (⇑f x = 0) _
Equations
- monoid_hom.decidable_mem_mker f = λ (x : M), decidable_of_iff (⇑f x = 1) _
the add_monoid_hom
from the preimage of an additive submonoid to itself.
The monoid_hom
from the preimage of a submonoid to itself.
the add_monoid_hom
from an additive submonoid to its image. See
add_equiv.add_submonoid_map
for a variant for add_equiv
s.
The monoid_hom
from a submonoid to its image.
See mul_equiv.submonoid_map
for a variant for mul_equiv
s.
The monoid hom associated to an inclusion of submonoids.
Equations
- submonoid.inclusion h = S.subtype.cod_restrict T _
The add_monoid
hom associated to an inclusion of submonoids.
Equations
- add_submonoid.inclusion h = S.subtype.cod_restrict T _
A submonoid is either the trivial submonoid or nontrivial.
An additive submonoid is either the trivial additive submonoid or nontrivial.
An additive submonoid is either the trivial additive submonoid or contains a nonzero element.
Makes the identity isomorphism from a proof that two submonoids of a multiplicative monoid are equal.
Equations
- mul_equiv.submonoid_congr h = {to_fun := (equiv.set_congr _).to_fun, inv_fun := (equiv.set_congr _).inv_fun, left_inv := _, right_inv := _, map_mul' := _}
Makes the identity additive isomorphism from a proof two submonoids of an additive monoid are equal.
Equations
- add_equiv.add_submonoid_congr h = {to_fun := (equiv.set_congr _).to_fun, inv_fun := (equiv.set_congr _).inv_fun, left_inv := _, right_inv := _, map_add' := _}
A monoid homomorphism f : M →* N
with a left-inverse g : N → M
defines a multiplicative
equivalence between M
and f.mrange
.
This is a bidirectional version of monoid_hom.mrange_restrict
.
Equations
- mul_equiv.of_left_inverse' f h = {to_fun := ⇑(f.mrange_restrict), inv_fun := g ∘ ⇑((monoid_hom.mrange f).subtype), left_inv := h, right_inv := _, map_mul' := _}
An additive monoid homomorphism f : M →+ N
with a left-inverse g : N → M
defines an additive
equivalence between M
and f.mrange
.
This is a bidirectional version of add_monoid_hom.mrange_restrict
.
Equations
- add_equiv.of_left_inverse' f h = {to_fun := ⇑(f.mrange_restrict), inv_fun := g ∘ ⇑((add_monoid_hom.mrange f).subtype), left_inv := h, right_inv := _, map_add' := _}
An add_equiv
φ
between two additive monoids M
and N
induces an add_equiv
between a submonoid S ≤ M
and the submonoid φ(S) ≤ N
. See add_monoid_hom.add_submonoid_map
for a variant for add_monoid_hom
s.
A mul_equiv
φ
between two monoids M
and N
induces a mul_equiv
between
a submonoid S ≤ M
and the submonoid φ(S) ≤ N
.
See monoid_hom.submonoid_map
for a variant for monoid_hom
s.
Actions by submonoid
s #
These instances tranfer the action by an element m : M
of a monoid M
written as m • a
onto the
action by an element s : S
of a submonoid S : submonoid M
such that s • a = (s : M) • a
.
These instances work particularly well in conjunction with monoid.to_mul_action
, enabling
s • m
as an alias for ↑s * m
.
Equations
- S.has_vadd = has_vadd.comp α ⇑(S.subtype)
Equations
- S.has_smul = has_smul.comp α ⇑(S.subtype)
Note that this provides is_scalar_tower S M' M'
which is needed by smul_mul_assoc
.
The action by a submonoid is the action by the underlying monoid.
Equations
The additive action by an add_submonoid is the action by the underlying add_monoid.
Equations
The action by a submonoid is the action by the underlying monoid.
Equations
The action by a submonoid is the action by the underlying monoid.