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 bundledMonoidWithZerohoms. Also use forGroupWithZerohoms.
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 : α → β
Instances For
α →*₀ β denotes the type of zero-preserving monoid homomorphisms from α to β.
Equations
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
Instances For
Any type satisfying MonoidWithZeroHomClass can be cast into MonoidWithZeroHom via
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 down-cast to a ZeroHom, forgetting the monoidal property.
Equations
Copy of a MonoidHom with a new toFun equal to the old one. Useful to fix
definitional equalities.
Equations
Instances For
Composition of MonoidWithZeroHoms as a MonoidWithZeroHom.
Equations
Instances For
Equations
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
The trivial homomorphism between monoids with zero, sending everything to 1 other than 0.