Homomorphisms of semirings and rings #
This file defines bundled homomorphisms of (non-unital) semirings and rings. As with monoid and
groups, we use the same structure RingHom a β
, a.k.a. α →+* β
, for both types of homomorphisms.
Main definitions #
NonUnitalRingHom
: Non-unital (semi)ring homomorphisms. Additive monoid homomorphism which preserve multiplication.RingHom
: (Semi)ring homomorphisms. Monoid homomorphisms which are also additive monoid homomorphism.
Notations #
→ₙ+*
: Non-unital (semi)ring homs→+*
: (Semi)ring homs
Implementation notes #
-
There's a coercion from bundled homs to fun, and the canonical notation is to use the bundled hom as a function via this coercion.
-
There is no
SemiringHom
-- the idea is thatRingHom
is used. The constructor for aRingHom
between semirings needs a proof ofmap_zero
,map_one
andmap_add
as well asmap_mul
; a separate constructorRingHom.mk'
will construct ring homs between rings from monoid homs given only a proof that addition is preserved.
Tags #
RingHom
, SemiringHom
Bundled non-unital semiring homomorphisms α →ₙ+* β
; use this for bundled non-unital ring
homomorphisms too.
When possible, instead of parametrizing results over (f : α →ₙ+* β)
,
you should parametrize over (F : Type*) [NonUnitalRingHomClass F α β] (f : F)
.
When you extend this structure, make sure to extend NonUnitalRingHomClass
.
- toFun : α → β
- map_zero' : self.toMulHom.toFun 0 = 0
The proposition that the function preserves 0
The proposition that the function preserves addition
Instances For
α →ₙ+* β
denotes the type of non-unital ring 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
Reinterpret a non-unital ring homomorphism f : α →ₙ+* β
as an additive
monoid homomorphism α →+ β
. The simp
-normal form is (f : α →+ β)
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
NonUnitalRingHomClass F α β
states that F
is a type of non-unital (semi)ring
homomorphisms. You should extend this class when you extend NonUnitalRingHom
.
Instances
Turn an element of a type F
satisfying NonUnitalRingHomClass F α β
into an actual
NonUnitalRingHom
. This is declared as the default coercion from F
to α →ₙ+* β
.
Equations
Instances For
Any type satisfying NonUnitalRingHomClass
can be cast into NonUnitalRingHom
via
NonUnitalRingHomClass.toNonUnitalRingHom
.
Equations
- instCoeTCNonUnitalRingHom = { coe := NonUnitalRingHomClass.toNonUnitalRingHom }
Equations
- One or more equations did not get rendered due to their size.
Equations
- (_ : NonUnitalRingHomClass (α →ₙ+* β) α β) = (_ : NonUnitalRingHomClass (α →ₙ+* β) α β)
Copy of a RingHom
with a new toFun
equal to the old one. Useful to fix definitional
equalities.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The identity non-unital ring homomorphism from a non-unital semiring to itself.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- NonUnitalRingHom.instInhabitedNonUnitalRingHom = { default := 0 }
Composition of non-unital ring homomorphisms is a non-unital ring homomorphism.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Composition of non-unital ring homomorphisms is associative.
Equations
- NonUnitalRingHom.instMonoidWithZeroNonUnitalRingHom = MonoidWithZero.mk (_ : ∀ (f : α →ₙ+* α), NonUnitalRingHom.comp 0 f = 0) (_ : ∀ (g : α →ₙ+* α), NonUnitalRingHom.comp g 0 = 0)
Bundled semiring homomorphisms; use this for bundled ring homomorphisms too.
This extends from both MonoidHom
and MonoidWithZeroHom
in order to put the fields in a
sensible order, even though MonoidWithZeroHom
already extends MonoidHom
.
- toFun : α → β
- map_one' : (↑↑self).toFun 1 = 1
- map_zero' : (↑↑self).toFun 0 = 0
The proposition that the function preserves 0
The proposition that the function preserves addition
Instances For
α →+* β
denotes the type of ring 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
Reinterpret a ring homomorphism f : α →+* β
as a monoid with zero homomorphism α →*₀ β
.
The simp
-normal form is (f : α →*₀ β)
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Reinterpret a ring homomorphism f : α →+* β
as an additive monoid homomorphism α →+ β
.
The simp
-normal form is (f : α →+ β)
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Reinterpret a ring homomorphism f : α →+* β
as a non-unital ring homomorphism α →ₙ+* β
. The
simp
-normal form is (f : α →ₙ+* β)
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
RingHomClass F α β
states that F
is a type of (semi)ring homomorphisms.
You should extend this class when you extend RingHom
.
This extends from both MonoidHomClass
and MonoidWithZeroHomClass
in
order to put the fields in a sensible order, even though
MonoidWithZeroHomClass
already extends MonoidHomClass
.
Instances
Ring homomorphisms preserve bit1
.
Turn an element of a type F
satisfying RingHomClass F α β
into an actual
RingHom
. This is declared as the default coercion from F
to α →+* β
.
Equations
Instances For
Any type satisfying RingHomClass
can be cast into RingHom
via RingHomClass.toRingHom
.
Equations
- instCoeTCRingHom = { coe := RingHomClass.toRingHom }
Equations
- (_ : NonUnitalRingHomClass F α β) = (_ : NonUnitalRingHomClass F α β)
Throughout this section, some Semiring
arguments are specified with {}
instead of []
.
See note [implicit instance arguments].
Equations
- One or more equations did not get rendered due to their size.
Equations
- (_ : RingHomClass (α →+* β) α β) = (_ : RingHomClass (α →+* β) α β)
Equations
- RingHom.coeToMonoidHom = { coe := RingHom.toMonoidHom }
Copy of a RingHom
with a new toFun
equal to the old one. Useful to fix definitional
equalities.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Ring homomorphisms map zero to zero.
Ring homomorphisms map one to one.
Ring homomorphisms preserve addition.
Ring homomorphisms preserve multiplication.
f : α →+* β
has a trivial codomain iff f 1 = 0
.
f : α →+* β
has a trivial codomain iff it has a trivial range.
f : α →+* β
doesn't map 1
to 0
if β
is nontrivial
If there is a homomorphism f : α →+* β
and β
is nontrivial, then α
is nontrivial.
Ring homomorphisms preserve additive inverse.
Ring homomorphisms preserve subtraction.
Makes a ring homomorphism from a monoid homomorphism of rings which preserves addition.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The identity ring homomorphism from a semiring to itself.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- RingHom.instInhabitedRingHom = { default := RingHom.id α }
Composition of ring homomorphisms is a ring homomorphism.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Composition of semiring homomorphisms is associative.
Equations
- RingHom.instMonoidRingHom = Monoid.mk (_ : ∀ (f : α →+* α), RingHom.comp (RingHom.id α) f = f) (_ : ∀ (f : α →+* α), RingHom.comp f (RingHom.id α) = f) npowRec
Make a ring homomorphism from an additive group homomorphism from a commutative ring to an
integral domain that commutes with self multiplication, assumes that two is nonzero and 1
is sent
to 1
.
Equations
- One or more equations did not get rendered due to their size.