File: Mathlib/Algebra/SMulWithZero.lean

full_name: SMulWithZero.zero_smul
code: /-- `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`. -/
class SMulWithZero [Zero R] [Zero M] extends SMulZeroClass R M where
  /-- Scalar multiplication by the scalar `0` is `0`. -/
  zero_smul : ∀ m : M, (0 : R) • m = 0
goal: 0 • m = 0

full_name: SMulWithZero
code: /-- `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`. -/
class SMulWithZero [Zero R] [Zero M] extends SMulZeroClass R M where
  /-- Scalar multiplication by the scalar `0` is `0`. -/
  zero_smul : ∀ m : M, (0 : R) • m = 0
goal: Type (max u_1 u_3)

full_name: MulZeroClass.toSMulWithZero
code: instance MulZeroClass.toSMulWithZero [MulZeroClass R] : SMulWithZero R R 
goal: SMulWithZero R R

full_name: MulZeroClass.toOppositeSMulWithZero
code: /-- Like `MulZeroClass.toSMulWithZero`, but multiplies on the right. -/
instance MulZeroClass.toOppositeSMulWithZero [MulZeroClass R] : SMulWithZero Rᵐᵒᵖ R 
goal: SMulWithZero Rᵐᵒᵖ R

full_name: zero_smul
code: @[simp]
theorem zero_smul (m : M) : (0 : R) • m = 0 
goal: 0 • m = 0

full_name: smul_eq_zero_of_left
code: lemma smul_eq_zero_of_left (h : a = 0) (b : M) : a • b = 0 
goal: a • b = 0

full_name: left_ne_zero_of_smul
code: lemma left_ne_zero_of_smul : a • b ≠ 0 → a ≠ 0 
goal: a • b ≠ 0 → a ≠ 0

full_name: Function.Injective.smulWithZero
code: /-- Pullback a `SMulWithZero` structure along an injective zero-preserving homomorphism.
See note [reducible non-instances]. -/
protected abbrev Function.Injective.smulWithZero (f : ZeroHom M' M) (hf : Function.Injective f)
    (smul : ∀ (a : R) (b), f (a • b) = a • f b) :
    SMulWithZero R M' 
goal: SMulWithZero R M'

full_name: Function.Surjective.smulWithZero
code: /-- Pushforward a `SMulWithZero` structure along a surjective zero-preserving homomorphism.
See note [reducible non-instances]. -/
protected abbrev Function.Surjective.smulWithZero (f : ZeroHom M M') (hf : Function.Surjective f)
    (smul : ∀ (a : R) (b), f (a • b) = a • f b) :
    SMulWithZero R M' 
goal: SMulWithZero R M'

full_name: SMulWithZero.compHom
code: /-- Compose a `SMulWithZero` with a `ZeroHom`, with action `f r' • m` -/
def SMulWithZero.compHom (f : ZeroHom R' R) : SMulWithZero R' M 
goal: SMulWithZero R' M

full_name: AddMonoid.natSMulWithZero
code: instance AddMonoid.natSMulWithZero [AddMonoid M] : SMulWithZero ℕ M 
goal: SMulWithZero ℕ M

full_name: AddGroup.intSMulWithZero
code: instance AddGroup.intSMulWithZero [AddGroup M] : SMulWithZero ℤ M 
goal: SMulWithZero ℤ M

full_name: MulActionWithZero.zero_smul
code: /-- 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`. -/
class MulActionWithZero extends MulAction R M where
  -- these fields are copied from `SMulWithZero`, as `extends` behaves poorly
  /-- Scalar multiplication by any element send `0` to `0`. -/
  smul_zero : ∀ r : R, r • (0 : M) = 0
  /-- Scalar multiplication by the scalar `0` is `0`. -/
  zero_smul : ∀ m : M, (0 : R) • m = 0
goal: 0 • m = 0

full_name: MulActionWithZero
code: /-- 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`. -/
class MulActionWithZero extends MulAction R M where
  -- these fields are copied from `SMulWithZero`, as `extends` behaves poorly
  /-- Scalar multiplication by any element send `0` to `0`. -/
  smul_zero : ∀ r : R, r • (0 : M) = 0
  /-- Scalar multiplication by the scalar `0` is `0`. -/
  zero_smul : ∀ m : M, (0 : R) • m = 0
goal: Type (max u_1 u_3)

full_name: MulActionWithZero.smul_zero
code: /-- 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`. -/
class MulActionWithZero extends MulAction R M where
  -- these fields are copied from `SMulWithZero`, as `extends` behaves poorly
  /-- Scalar multiplication by any element send `0` to `0`. -/
  smul_zero : ∀ r : R, r • (0 : M) = 0
  /-- Scalar multiplication by the scalar `0` is `0`. -/
  zero_smul : ∀ m : M, (0 : R) • m = 0
goal: r • 0 = 0

full_name: MulActionWithZero.toSMulWithZero
code: instance (priority := 100) MulActionWithZero.toSMulWithZero [m : MulActionWithZero R M] :
    SMulWithZero R M 
goal: SMulWithZero R M

full_name: MonoidWithZero.toMulActionWithZero
code: /-- See also `Semiring.toModule` -/
instance MonoidWithZero.toMulActionWithZero : MulActionWithZero R R 
goal: MulActionWithZero R R

full_name: MonoidWithZero.toOppositeMulActionWithZero
code: /-- Like `MonoidWithZero.toMulActionWithZero`, but multiplies on the right. See also
`Semiring.toOppositeModule` -/
instance MonoidWithZero.toOppositeMulActionWithZero : MulActionWithZero Rᵐᵒᵖ R 
goal: MulActionWithZero Rᵐᵒᵖ R

full_name: MulActionWithZero.subsingleton
code: protected lemma MulActionWithZero.subsingleton
    [MulActionWithZero R M] [Subsingleton R] : Subsingleton M 
goal: Subsingleton M

full_name: MulActionWithZero.nontrivial
code: protected lemma MulActionWithZero.nontrivial
    [MulActionWithZero R M] [Nontrivial M] : Nontrivial R 
goal: Nontrivial R

full_name: ite_zero_smul
code: lemma ite_zero_smul (a : R) (b : M) : (if p then a else 0 : R) • b = if p then a • b else 0 
goal: (if p then a else 0) • b = if p then a • b else 0

full_name: boole_smul
code: lemma boole_smul (a : M) : (if p then 1 else 0 : R) • a = if p then a else 0 
goal: (if p then 1 else 0) • a = if p then a else 0

full_name: Pi.single_apply_smul
code: lemma Pi.single_apply_smul {ι : Type*} [DecidableEq ι] (x : M) (i j : ι) :
    (Pi.single i 1 : ι → R) j • x = (Pi.single i x : ι → M) j 
goal: Pi.single i 1 j • x = Pi.single i x j

full_name: Function.Injective.mulActionWithZero
code: /-- Pullback a `MulActionWithZero` structure along an injective zero-preserving homomorphism.
See note [reducible non-instances]. -/
protected abbrev Function.Injective.mulActionWithZero (f : ZeroHom M' M) (hf : Function.Injective f)
    (smul : ∀ (a : R) (b), f (a • b) = a • f b) : MulActionWithZero R M' 
goal: MulActionWithZero R M'

full_name: Function.Surjective.mulActionWithZero
code: /-- Pushforward a `MulActionWithZero` structure along a surjective zero-preserving homomorphism.
See note [reducible non-instances]. -/
protected abbrev Function.Surjective.mulActionWithZero (f : ZeroHom M M')
    (hf : Function.Surjective f) (smul : ∀ (a : R) (b), f (a • b) = a • f b) :
    MulActionWithZero R M' 
goal: MulActionWithZero R M'

full_name: MulActionWithZero.compHom
code: /-- Compose a `MulActionWithZero` with a `MonoidWithZeroHom`, with action `f r' • m` -/
def MulActionWithZero.compHom (f : R' →*₀ R) : MulActionWithZero R' M 
goal: MulActionWithZero R' M

full_name: smul_inv₀
code: theorem smul_inv₀ [SMulCommClass α β β] [IsScalarTower α β β] (c : α) (x : β) :
    (c • x)⁻¹ = c⁻¹ • x⁻¹ 
goal: (c • x)⁻¹ = c⁻¹ • x⁻¹

full_name: smulMonoidWithZeroHom
code: /-- Scalar multiplication as a monoid homomorphism with zero. -/
@[simps]
def smulMonoidWithZeroHom {α β : Type*} [MonoidWithZero α] [MulZeroOneClass β]
    [MulActionWithZero α β] [IsScalarTower α β β] [SMulCommClass α β β] : α × β →*₀ β 
goal: α × β →*₀ β

full_name: smulMonoidWithZeroHom_apply
code: /-- Scalar multiplication as a monoid homomorphism with zero. -/
@[simps]
def smulMonoidWithZeroHom {α β : Type*} [MonoidWithZero α] [MulZeroOneClass β]
    [MulActionWithZero α β] [IsScalarTower α β β] [SMulCommClass α β β] : α × β →*₀ β 
goal: ∀ (a : α × β), smulMonoidWithZeroHom a = (↑smulMonoidHom).toFun a

full_name: NonUnitalNonAssocSemiring.toDistribSMul
code: instance NonUnitalNonAssocSemiring.toDistribSMul [NonUnitalNonAssocSemiring R] :
    DistribSMul R R 
goal: DistribSMul R R