Monoid with zero and group with zero homomorphisms #
This file defines homomorphisms of monoids with zero.
We also define coercion to a function, and usual operations: composition, identity homomorphism, pointwise multiplication and pointwise inversion.
Notations #
→*₀
:MonoidWithZeroHom
, the type of bundledMonoidWithZero
homs. Also use forGroupWithZero
homs.
Implementation notes #
Implicit {}
brackets are often used instead of type class []
brackets. This is done when the
instances can be inferred because they are implicit arguments to the type MonoidHom
. When they
can be inferred from the type it is faster to use this method than to use type class inference.
Tags #
monoid homomorphism
MonoidWithZeroHomClass F α β
states that F
is a type of
MonoidWithZero
-preserving homomorphisms.
You should also extend this typeclass when you extend MonoidWithZeroHom
.
Instances
α →*₀ β
is the type of functions α → β
that preserve
the MonoidWithZero
structure.
MonoidWithZeroHom
is also used for group homomorphisms.
When possible, instead of parametrizing results over (f : α →*₀ β)
,
you should parametrize over (F : Type*) [MonoidWithZeroHomClass F α β] (f : F)
.
When you extend this structure, make sure to extend MonoidWithZeroHomClass
.
- toFun : α → β
- map_zero' : self.toFun 0 = 0
- map_one' : self.toFun 1 = 1
The proposition that the function preserves 1
The proposition that the function preserves multiplication
Instances For
α →*₀ β
denotes the type of zero-preserving monoid homomorphisms from α
to β
.
Equations
- «term_→*₀_» = Lean.ParserDescr.trailingNode `term_→*₀_ 25 26 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " →*₀ ") (Lean.ParserDescr.cat `term 25))
Instances For
Turn an element of a type F
satisfying MonoidWithZeroHomClass F α β
into an actual
MonoidWithZeroHom
. This is declared as the default coercion from F
to α →*₀ β
.
Equations
- ↑f = let __src := ↑f; let __src_1 := ↑f; { toZeroHom := { toFun := __src.toFun, map_zero' := ⋯ }, map_one' := ⋯, map_mul' := ⋯ }
Instances For
Any type satisfying MonoidWithZeroHomClass
can be cast into MonoidWithZeroHom
via
MonoidWithZeroHomClass.toMonoidWithZeroHom
.
Equations
- instCoeTCMonoidWithZeroHom = { coe := MonoidWithZeroHomClass.toMonoidWithZeroHom }
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Bundled morphisms can be down-cast to weaker bundlings
MonoidWithZeroHom
down-cast to a MonoidHom
, forgetting the 0-preserving property.
Equations
- MonoidWithZeroHom.coeToMonoidHom = { coe := MonoidWithZeroHom.toMonoidHom }
MonoidWithZeroHom
down-cast to a ZeroHom
, forgetting the monoidal property.
Equations
- MonoidWithZeroHom.coeToZeroHom = { coe := MonoidWithZeroHom.toZeroHom }
Copy of a MonoidHom
with a new toFun
equal to the old one. Useful to fix
definitional equalities.
Equations
- MonoidWithZeroHom.copy f f' h = let __src := ZeroHom.copy (↑f) f' h; let __src_1 := MonoidHom.copy (↑f) f' h; { toOneHom := { toFun := __src.toFun, map_one' := ⋯ }, map_mul' := ⋯ }
Instances For
The identity map from a MonoidWithZero
to itself.
Equations
- MonoidWithZeroHom.id α = { toZeroHom := { toFun := fun (x : α) => x, map_zero' := ⋯ }, map_one' := ⋯, map_mul' := ⋯ }
Instances For
Composition of MonoidWithZeroHom
s as a MonoidWithZeroHom
.
Equations
- MonoidWithZeroHom.comp hnp hmn = { toZeroHom := { toFun := ⇑hnp ∘ ⇑hmn, map_zero' := ⋯ }, map_one' := ⋯, map_mul' := ⋯ }
Instances For
Equations
- MonoidWithZeroHom.instInhabitedMonoidWithZeroHom = { default := MonoidWithZeroHom.id α }
Given two monoid with zero morphisms f
, g
to a commutative monoid with zero, f * g
is the
monoid with zero morphism sending x
to f x * g x
.
Equations
- One or more equations did not get rendered due to their size.
Equivalences #
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯