Introduce smul_with_zero
#
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
In analogy with the usual monoid action on a Type M
, we introduce an action of a
monoid_with_zero
on a Type with 0
.
In particular, for Types R
and M
, both containing 0
, we define smul_with_zero 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 monoid_with_zero
, we introduce the typeclass
mul_action_with_zero 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 monoid_with_zero, acting as zero;
- associativity of the monoid.
We also add an instance
:
- any
monoid_with_zero
has amul_action_with_zero R R
acting on itself.
Main declarations #
smul_monoid_with_zero_hom
: Scalar multiplication bundled as a morphism of monoids with zero.
- to_smul_zero_class : smul_zero_class R M
- zero_smul : ∀ (m : M), 0 • m = 0
smul_with_zero
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
.
Instances of this typeclass
- mul_action_with_zero.to_smul_with_zero
- mul_zero_class.to_smul_with_zero
- mul_zero_class.to_opposite_smul_with_zero
- add_monoid.nat_smul_with_zero
- add_group.int_smul_with_zero
- pi.smul_with_zero
- pi.smul_with_zero'
- ulift.smul_with_zero
- ulift.smul_with_zero'
- punit.smul_with_zero
- prod.smul_with_zero
- subsemiring.smul_with_zero
- subring.smul_with_zero
- subalgebra.smul_with_zero
- order_dual.smul_with_zero
- direct_sum.grade_zero.smul_with_zero
Instances of other typeclasses for smul_with_zero
- smul_with_zero.has_sizeof_inst
Equations
- mul_zero_class.to_smul_with_zero R = {to_smul_zero_class := {to_has_smul := {smul := has_mul.mul (mul_zero_class.to_has_mul R)}, smul_zero := _}, zero_smul := _}
Like mul_zero_class.to_smul_with_zero
, but multiplies on the right.
Equations
- mul_zero_class.to_opposite_smul_with_zero R = {to_smul_zero_class := {to_has_smul := {smul := has_smul.smul (has_mul.to_has_opposite_smul R)}, smul_zero := _}, zero_smul := _}
Pullback a smul_with_zero
structure along an injective zero-preserving homomorphism.
See note [reducible non-instances].
Equations
- function.injective.smul_with_zero f hf smul = {to_smul_zero_class := {to_has_smul := {smul := has_smul.smul _inst_6}, smul_zero := _}, zero_smul := _}
Pushforward a smul_with_zero
structure along a surjective zero-preserving homomorphism.
See note [reducible non-instances].
Equations
- function.surjective.smul_with_zero f hf smul = {to_smul_zero_class := {to_has_smul := {smul := has_smul.smul _inst_6}, smul_zero := _}, zero_smul := _}
Compose a smul_with_zero
with a zero_hom
, with action f r' • m
Equations
- smul_with_zero.comp_hom M f = {to_smul_zero_class := {to_has_smul := {smul := has_smul.smul ∘ ⇑f}, smul_zero := _}, zero_smul := _}
Equations
- add_monoid.nat_smul_with_zero = {to_smul_zero_class := {to_has_smul := add_monoid.has_smul_nat _inst_1, smul_zero := _}, zero_smul := _}
Equations
An action of a monoid with zero R
on a Type M
, also with 0
, extends mul_action
and
is compatible with 0
(both in R
and in M
), with 1 ∈ R
, and with associativity of
multiplication on the monoid M
.
Instances of this typeclass
- module.to_mul_action_with_zero
- monoid_with_zero.to_mul_action_with_zero
- monoid_with_zero.to_opposite_mul_action_with_zero
- pi.mul_action_with_zero
- pi.mul_action_with_zero'
- ulift.mul_action_with_zero
- ulift.mul_action_with_zero'
- punit.mul_action_with_zero
- prod.mul_action_with_zero
- subsemiring.mul_action_with_zero
- subring.mul_action_with_zero
- subalgebra.mul_action_with_zero
- order_dual.mul_action_with_zero
- uniform_space.completion.mul_action_with_zero
Instances of other typeclasses for mul_action_with_zero
- mul_action_with_zero.has_sizeof_inst
Equations
See also semiring.to_module
Equations
- monoid_with_zero.to_mul_action_with_zero R = {to_mul_action := {to_has_smul := smul_zero_class.to_has_smul smul_with_zero.to_smul_zero_class, one_smul := _, mul_smul := _}, smul_zero := _, zero_smul := _}
Like monoid_with_zero.to_mul_action_with_zero
, but multiplies on the right. See also
semiring.to_opposite_module
Equations
- monoid_with_zero.to_opposite_mul_action_with_zero R = {to_mul_action := {to_has_smul := smul_zero_class.to_has_smul smul_with_zero.to_smul_zero_class, one_smul := _, mul_smul := _}, smul_zero := _, zero_smul := _}
Pullback a mul_action_with_zero
structure along an injective zero-preserving homomorphism.
See note [reducible non-instances].
Equations
- function.injective.mul_action_with_zero f hf smul = {to_mul_action := {to_has_smul := mul_action.to_has_smul (function.injective.mul_action ⇑f hf smul), one_smul := _, mul_smul := _}, smul_zero := _, zero_smul := _}
Pushforward a mul_action_with_zero
structure along a surjective zero-preserving homomorphism.
See note [reducible non-instances].
Equations
- function.surjective.mul_action_with_zero f hf smul = {to_mul_action := {to_has_smul := mul_action.to_has_smul (function.surjective.mul_action ⇑f hf smul), one_smul := _, mul_smul := _}, smul_zero := _, zero_smul := _}
Compose a mul_action_with_zero
with a monoid_with_zero_hom
, with action f r' • m
Equations
- mul_action_with_zero.comp_hom M f = {to_mul_action := {to_has_smul := {smul := has_smul.smul ∘ ⇑f}, one_smul := _, mul_smul := _}, smul_zero := _, zero_smul := _}
Scalar multiplication as a monoid homomorphism with zero.
Equations
- smul_monoid_with_zero_hom = {to_fun := smul_monoid_hom.to_fun, map_zero' := _, map_one' := _, map_mul' := _}