Introduce SMulWithZero
#
In analogy with the usual monoid action on a Type M
, we introduce an action of a
MonoidWithZero
on a Type with 0
.
In particular, for Types R
and M
, both containing 0
, we define SMulWithZero R M
to
be the typeclass where the products r • 0
and 0 • m
vanish for all r : R
and all m : M
.
Moreover, in the case in which R
is a MonoidWithZero
, we introduce the typeclass
MulActionWithZero R M
, mimicking group actions and having an absorbing 0
in R
.
Thus, the action is required to be compatible with
- the unit of the monoid, acting as the identity;
- the zero of the
MonoidWithZero
, acting as zero; - associativity of the monoid.
We also add an instance
:
- any
MonoidWithZero
has aMulActionWithZero R R
acting on itself.
Main declarations #
smulMonoidWithZeroHom
: Scalar multiplication bundled as a morphism of monoids with zero.
SMulWithZero
is a class consisting of a Type R
with 0 ∈ R
and a scalar multiplication
of R
on a Type M
with 0
, such that the equality r • m = 0
holds if at least one among r
or m
equals 0
.
- smul : R → M → M
Scalar multiplication by the scalar
0
is0
.
Instances
- AddGroup.intSMulWithZero
- AddMonoid.natSMulWithZero
- Finsupp.instSMulWithZero
- Lex.instSMulWithZero
- Lex.instSMulWithZero'
- MulActionWithZero.toSMulWithZero
- MulOpposite.instSMulWithZero
- MulZeroClass.toOppositeSMulWithZero
- MulZeroClass.toSMulWithZero
- OrderDual.instSMulWithZero
- OrderDual.instSMulWithZero'
- PUnit.smulWithZero
- Pi.smulWithZero
- Pi.smulWithZero'
- Prod.smulWithZero
- Subalgebra.instSMulWithZeroSubtypeMem
- Subfield.instSMulWithZeroSubtypeMem
- Subring.instSMulWithZeroSubtypeMem
- Subsemiring.instSMulWithZeroSubtypeMem
- Subsemiring.instSMulWithZeroSubtypeMem_1
- ULift.smulWithZero
- ULift.smulWithZero'
Equations
Like MulZeroClass.toSMulWithZero
, but multiplies on the right.
Equations
Pullback a SMulWithZero
structure along an injective zero-preserving homomorphism.
See note [reducible non-instances].
Equations
- Function.Injective.smulWithZero f hf smul = SMulWithZero.mk ⋯
Pushforward a SMulWithZero
structure along a surjective zero-preserving homomorphism.
See note [reducible non-instances].
Equations
- Function.Surjective.smulWithZero f hf smul = SMulWithZero.mk ⋯
Compose a SMulWithZero
with a ZeroHom
, with action f r' • m
Equations
Equations
Equations
An action of a monoid with zero R
on a Type M
, also with 0
, extends MulAction
and
is compatible with 0
(both in R
and in M
), with 1 ∈ R
, and with associativity of
multiplication on the monoid M
.
- smul : R → M → M
Scalar multiplication by any element send
0
to0
.Scalar multiplication by the scalar
0
is0
.
Instances
- Lex.instMulActionWithZero
- Lex.instMulActionWithZero'
- Module.toMulActionWithZero
- MonoidWithZero.toMulActionWithZero
- MonoidWithZero.toOppositeMulActionWithZero
- MulOpposite.instMulActionWithZero
- OrderDual.instMulActionWithZero
- OrderDual.instMulActionWithZero'
- PUnit.mulActionWithZero
- Pi.mulActionWithZero
- Pi.mulActionWithZero'
- Prod.mulActionWithZero
- Subalgebra.instMulActionWithZeroSubtypeMem
- Subfield.instMulActionWithZeroSubtypeMem
- Subring.instMulActionWithZeroSubtypeMem
- Subsemiring.instMulActionWithZeroSubtypeMem
- Subsemiring.mulActionWithZero
- ULift.mulActionWithZero
- ULift.mulActionWithZero'
- UniformSpace.Completion.instMulActionWithZeroOfUniformContinuousConstSMul
Equations
See also Semiring.toModule
Equations
Like MonoidWithZero.toMulActionWithZero
, but multiplies on the right. See also
Semiring.toOppositeModule
Equations
Pullback a MulActionWithZero
structure along an injective zero-preserving homomorphism.
See note [reducible non-instances].
Equations
- Function.Injective.mulActionWithZero f hf smul = MulActionWithZero.mk ⋯ ⋯
Pushforward a MulActionWithZero
structure along a surjective zero-preserving homomorphism.
See note [reducible non-instances].
Equations
- Function.Surjective.mulActionWithZero f hf smul = MulActionWithZero.mk ⋯ ⋯
Compose a MulActionWithZero
with a MonoidWithZeroHom
, with action f r' • m