File: Mathlib/Algebra/GroupWithZero/Action/Defs.lean

full_name: SMulZeroClass
code: /-- Typeclass for scalar multiplication that preserves `0` on the right. -/
class SMulZeroClass (M A : Type*) [Zero A] extends SMul M A where
  /-- Multiplying `0` by a scalar gives `0` -/
  smul_zero : ∀ a : M, a • (0 : A) = 0
goal: Type (max u_10 u_11)

full_name: SMulZeroClass.smul_zero
code: /-- Typeclass for scalar multiplication that preserves `0` on the right. -/
class SMulZeroClass (M A : Type*) [Zero A] extends SMul M A where
  /-- Multiplying `0` by a scalar gives `0` -/
  smul_zero : ∀ a : M, a • (0 : A) = 0
goal: a • 0 = 0

full_name: smul_zero
code: @[simp]
theorem smul_zero (a : M) : a • (0 : A) = 0 
goal: a • 0 = 0

full_name: smul_ite_zero
code: lemma smul_ite_zero (p : Prop) [Decidable p] (a : M) (b : A) :
    (a • if p then b else 0) = if p then a • b else 0 
goal: (a • if p then b else 0) = if p then a • b else 0

full_name: smul_eq_zero_of_right
code: lemma smul_eq_zero_of_right (a : M) {b : A} (h : b = 0) : a • b = 0 
goal: a • b = 0

full_name: right_ne_zero_of_smul
code: lemma right_ne_zero_of_smul {a : M} {b : A} : a • b ≠ 0 → b ≠ 0 
goal: a • b ≠ 0 → b ≠ 0

full_name: Function.Injective.smulZeroClass
code: /-- Pullback a zero-preserving scalar multiplication along an injective zero-preserving map.
See note [reducible non-instances]. -/
protected abbrev Function.Injective.smulZeroClass [Zero B] [SMul M B] (f : ZeroHom B A)
    (hf : Injective f) (smul : ∀ (c : M) (x), f (c • x) = c • f x) :
    SMulZeroClass M B 
goal: SMulZeroClass M B

full_name: ZeroHom.smulZeroClass
code: /-- Pushforward a zero-preserving scalar multiplication along a zero-preserving map.
See note [reducible non-instances]. -/
protected abbrev ZeroHom.smulZeroClass [Zero B] [SMul M B] (f : ZeroHom A B)
    (smul : ∀ (c : M) (x), f (c • x) = c • f x) :
    SMulZeroClass M B 
goal: SMulZeroClass M B

full_name: Function.Surjective.smulZeroClassLeft
code: /-- Push forward the multiplication of `R` on `M` along a compatible surjective map `f : R → S`.

See also `Function.Surjective.distribMulActionLeft`.
-/
abbrev Function.Surjective.smulZeroClassLeft {R S M : Type*} [Zero M] [SMulZeroClass R M]
    [SMul S M] (f : R → S) (hf : Function.Surjective f)
    (hsmul : ∀ (c) (x : M), f c • x = c • x) :
    SMulZeroClass S M 
goal: SMulZeroClass S M

full_name: SMulZeroClass.compFun
code: /-- Compose a `SMulZeroClass` with a function, with scalar multiplication `f r' • m`.
See note [reducible non-instances]. -/
abbrev SMulZeroClass.compFun (f : N → M) :
    SMulZeroClass N A 
goal: SMulZeroClass N A

full_name: SMulZeroClass.toZeroHom
code: /-- Each element of the scalars defines a zero-preserving map. -/
@[simps]
def SMulZeroClass.toZeroHom (x : M) :
    ZeroHom A A 
goal: ZeroHom A A

full_name: SMulZeroClass.toZeroHom_apply
code: /-- Each element of the scalars defines a zero-preserving map. -/
@[simps]
def SMulZeroClass.toZeroHom (x : M) :
    ZeroHom A A 
goal: ∀ (x_1 : A), (SMulZeroClass.toZeroHom A x) x_1 = x • x_1

full_name: DistribSMul
code: /-- Typeclass for scalar multiplication that preserves `0` and `+` on the right.

This is exactly `DistribMulAction` without the `MulAction` part.
-/
@[ext]
class DistribSMul (M A : Type*) [AddZeroClass A] extends SMulZeroClass M A where
  /-- Scalar multiplication distributes across addition -/
  smul_add : ∀ (a : M) (x y : A), a • (x + y) = a • x + a • y
goal: Type (max u_10 u_11)

full_name: DistribSMul.smul_add
code: /-- Typeclass for scalar multiplication that preserves `0` and `+` on the right.

This is exactly `DistribMulAction` without the `MulAction` part.
-/
@[ext]
class DistribSMul (M A : Type*) [AddZeroClass A] extends SMulZeroClass M A where
  /-- Scalar multiplication distributes across addition -/
  smul_add : ∀ (a : M) (x y : A), a • (x + y) = a • x + a • y
goal: a • (x + y) = a • x + a • y

full_name: smul_add
code: theorem smul_add (a : M) (b₁ b₂ : A) : a • (b₁ + b₂) = a • b₁ + a • b₂ 
goal: a • (b₁ + b₂) = a • b₁ + a • b₂

full_name: AddMonoidHom.smulZeroClass
code: instance AddMonoidHom.smulZeroClass [AddZeroClass B] : SMulZeroClass M (B →+ A) 
goal: SMulZeroClass M (B →+ A)

full_name: Function.Injective.distribSMul
code: /-- Pullback a distributive scalar multiplication along an injective additive monoid
homomorphism.
See note [reducible non-instances]. -/
protected abbrev Function.Injective.distribSMul [AddZeroClass B] [SMul M B] (f : B →+ A)
    (hf : Injective f) (smul : ∀ (c : M) (x), f (c • x) = c • f x) : DistribSMul M B 
goal: DistribSMul M B

full_name: Function.Surjective.distribSMul
code: /-- Pushforward a distributive scalar multiplication along a surjective additive monoid
homomorphism.
See note [reducible non-instances]. -/
protected abbrev Function.Surjective.distribSMul [AddZeroClass B] [SMul M B] (f : A →+ B)
    (hf : Surjective f) (smul : ∀ (c : M) (x), f (c • x) = c • f x) : DistribSMul M B 
goal: DistribSMul M B

full_name: Function.Surjective.distribSMulLeft
code: /-- Push forward the multiplication of `R` on `M` along a compatible surjective map `f : R → S`.

See also `Function.Surjective.distribMulActionLeft`.
-/
abbrev Function.Surjective.distribSMulLeft {R S M : Type*} [AddZeroClass M] [DistribSMul R M]
    [SMul S M] (f : R → S) (hf : Function.Surjective f)
    (hsmul : ∀ (c) (x : M), f c • x = c • x) : DistribSMul S M 
goal: DistribSMul S M

full_name: DistribSMul.compFun
code: /-- Compose a `DistribSMul` with a function, with scalar multiplication `f r' • m`.
See note [reducible non-instances]. -/
abbrev DistribSMul.compFun (f : N → M) : DistribSMul N A 
goal: DistribSMul N A

full_name: DistribSMul.toAddMonoidHom_apply
code: /-- Each element of the scalars defines an additive monoid homomorphism. -/
@[simps]
def DistribSMul.toAddMonoidHom (x : M) : A →+ A 
goal: ∀ (x_1 : A), (DistribSMul.toAddMonoidHom A x) x_1 = (fun x x_2 => x • x_2) x x_1

full_name: DistribSMul.toAddMonoidHom
code: /-- Each element of the scalars defines an additive monoid homomorphism. -/
@[simps]
def DistribSMul.toAddMonoidHom (x : M) : A →+ A 
goal: A →+ A

full_name: DistribMulAction.smul_zero
code: /-- Typeclass for multiplicative actions on additive structures. This generalizes group modules. -/
@[ext]
class DistribMulAction (M A : Type*) [Monoid M] [AddMonoid A] extends MulAction M A where
  /-- Multiplying `0` by a scalar gives `0` -/
  smul_zero : ∀ a : M, a • (0 : A) = 0
  /-- Scalar multiplication distributes across addition -/
  smul_add : ∀ (a : M) (x y : A), a • (x + y) = a • x + a • y
goal: a • 0 = 0

full_name: DistribMulAction
code: /-- Typeclass for multiplicative actions on additive structures. This generalizes group modules. -/
@[ext]
class DistribMulAction (M A : Type*) [Monoid M] [AddMonoid A] extends MulAction M A where
  /-- Multiplying `0` by a scalar gives `0` -/
  smul_zero : ∀ a : M, a • (0 : A) = 0
  /-- Scalar multiplication distributes across addition -/
  smul_add : ∀ (a : M) (x y : A), a • (x + y) = a • x + a • y
goal: Type (max u_10 u_11)

full_name: DistribMulAction.smul_add
code: /-- Typeclass for multiplicative actions on additive structures. This generalizes group modules. -/
@[ext]
class DistribMulAction (M A : Type*) [Monoid M] [AddMonoid A] extends MulAction M A where
  /-- Multiplying `0` by a scalar gives `0` -/
  smul_zero : ∀ a : M, a • (0 : A) = 0
  /-- Scalar multiplication distributes across addition -/
  smul_add : ∀ (a : M) (x y : A), a • (x + y) = a • x + a • y
goal: a • (x + y) = a • x + a • y

full_name: DistribMulAction.toDistribSMul
code: instance (priority := 100) DistribMulAction.toDistribSMul : DistribSMul M A 
goal: DistribSMul M A

full_name: Function.Injective.distribMulAction
code: /-- Pullback a distributive multiplicative action along an injective additive monoid
homomorphism.
See note [reducible non-instances]. -/
protected abbrev Function.Injective.distribMulAction [AddMonoid B] [SMul M B] (f : B →+ A)
    (hf : Injective f) (smul : ∀ (c : M) (x), f (c • x) = c • f x) : DistribMulAction M B 
goal: DistribMulAction M B

full_name: Function.Surjective.distribMulAction
code: /-- Pushforward a distributive multiplicative action along a surjective additive monoid
homomorphism.
See note [reducible non-instances]. -/
protected abbrev Function.Surjective.distribMulAction [AddMonoid B] [SMul M B] (f : A →+ B)
    (hf : Surjective f) (smul : ∀ (c : M) (x), f (c • x) = c • f x) : DistribMulAction M B 
goal: DistribMulAction M B

full_name: Function.Surjective.distribMulActionLeft
code: /-- Push forward the action of `R` on `M` along a compatible surjective map `f : R →* S`.

See also `Function.Surjective.mulActionLeft` and `Function.Surjective.moduleLeft`.
-/
abbrev Function.Surjective.distribMulActionLeft {R S M : Type*} [Monoid R] [AddMonoid M]
    [DistribMulAction R M] [Monoid S] [SMul S M] (f : R →* S) (hf : Function.Surjective f)
    (hsmul : ∀ (c) (x : M), f c • x = c • x) : DistribMulAction S M 
goal: DistribMulAction S M

full_name: DistribMulAction.compHom
code: /-- Compose a `DistribMulAction` with a `MonoidHom`, with action `f r' • m`.
See note [reducible non-instances]. -/
abbrev DistribMulAction.compHom [Monoid N] (f : N →* M) : DistribMulAction N A 
goal: DistribMulAction N A

full_name: DistribMulAction.toAddMonoidHom
code: /-- Each element of the monoid defines an additive monoid homomorphism. -/
@[simps!]
def DistribMulAction.toAddMonoidHom (x : M) : A →+ A 
goal: A →+ A

full_name: DistribMulAction.toAddMonoidHom_apply
code: /-- Each element of the monoid defines an additive monoid homomorphism. -/
@[simps!]
def DistribMulAction.toAddMonoidHom (x : M) : A →+ A 
goal: ∀ (x_1 : A), (DistribMulAction.toAddMonoidHom A x) x_1 = x • x_1

full_name: DistribMulAction.toAddMonoidEnd_apply
code: /-- Each element of the monoid defines an additive monoid homomorphism. -/
@[simps]
def DistribMulAction.toAddMonoidEnd :
    M →* AddMonoid.End A 
goal: (DistribMulAction.toAddMonoidEnd M A) x = DistribMulAction.toAddMonoidHom A x

full_name: DistribMulAction.toAddMonoidEnd
code: /-- Each element of the monoid defines an additive monoid homomorphism. -/
@[simps]
def DistribMulAction.toAddMonoidEnd :
    M →* AddMonoid.End A 
goal: M →* AddMonoid.End A

full_name: AddMonoid.nat_smulCommClass
code: instance AddMonoid.nat_smulCommClass :
    SMulCommClass ℕ M
      A 
goal: SMulCommClass ℕ M A

full_name: AddMonoid.nat_smulCommClass'
code: instance AddMonoid.nat_smulCommClass' : SMulCommClass M ℕ A 
goal: SMulCommClass M ℕ A

full_name: AddGroup.int_smulCommClass
code: instance AddGroup.int_smulCommClass : SMulCommClass ℤ M A 
goal: SMulCommClass ℤ M A

full_name: AddGroup.int_smulCommClass'
code: instance AddGroup.int_smulCommClass' : SMulCommClass M ℤ A 
goal: SMulCommClass M ℤ A

full_name: smul_neg
code: @[simp]
theorem smul_neg (r : M) (x : A) : r • -x = -(r • x) 
goal: r • -x = -(r • x)

full_name: smul_sub
code: theorem smul_sub (r : M) (x y : A) : r • (x - y) = r • x - r • y 
goal: r • (x - y) = r • x - r • y

full_name: MulDistribMulAction
code: /-- Typeclass for multiplicative actions on multiplicative structures. This generalizes
conjugation actions. -/
@[ext]
class MulDistribMulAction (M : Type*) (A : Type*) [Monoid M] [Monoid A] extends
  MulAction M A where
  /-- Distributivity of `•` across `*` -/
  smul_mul : ∀ (r : M) (x y : A), r • (x * y) = r • x * r • y
  /-- Multiplying `1` by a scalar gives `1` -/
  smul_one : ∀ r : M, r • (1 : A) = 1
goal: Type (max u_10 u_11)

full_name: MulDistribMulAction.smul_mul
code: /-- Typeclass for multiplicative actions on multiplicative structures. This generalizes
conjugation actions. -/
@[ext]
class MulDistribMulAction (M : Type*) (A : Type*) [Monoid M] [Monoid A] extends
  MulAction M A where
  /-- Distributivity of `•` across `*` -/
  smul_mul : ∀ (r : M) (x y : A), r • (x * y) = r • x * r • y
  /-- Multiplying `1` by a scalar gives `1` -/
  smul_one : ∀ r : M, r • (1 : A) = 1
goal: r • (x * y) = r • x * r • y

full_name: MulDistribMulAction.smul_one
code: /-- Typeclass for multiplicative actions on multiplicative structures. This generalizes
conjugation actions. -/
@[ext]
class MulDistribMulAction (M : Type*) (A : Type*) [Monoid M] [Monoid A] extends
  MulAction M A where
  /-- Distributivity of `•` across `*` -/
  smul_mul : ∀ (r : M) (x y : A), r • (x * y) = r • x * r • y
  /-- Multiplying `1` by a scalar gives `1` -/
  smul_one : ∀ r : M, r • (1 : A) = 1
goal: r • 1 = 1

full_name: smul_mul'
code: theorem smul_mul' (a : M) (b₁ b₂ : A) : a • (b₁ * b₂) = a • b₁ * a • b₂ 
goal: a • (b₁ * b₂) = a • b₁ * a • b₂

full_name: Function.Injective.mulDistribMulAction
code: /-- Pullback a multiplicative distributive multiplicative action along an injective monoid
homomorphism.
See note [reducible non-instances]. -/
protected abbrev Function.Injective.mulDistribMulAction [Monoid B] [SMul M B] (f : B →* A)
    (hf : Injective f) (smul : ∀ (c : M) (x), f (c • x) = c • f x) : MulDistribMulAction M B 
goal: MulDistribMulAction M B

full_name: Function.Surjective.mulDistribMulAction
code: /-- Pushforward a multiplicative distributive multiplicative action along a surjective monoid
homomorphism.
See note [reducible non-instances]. -/
protected abbrev Function.Surjective.mulDistribMulAction [Monoid B] [SMul M B] (f : A →* B)
    (hf : Surjective f) (smul : ∀ (c : M) (x), f (c • x) = c • f x) : MulDistribMulAction M B 
goal: MulDistribMulAction M B

full_name: MulDistribMulAction.compHom
code: /-- Compose a `MulDistribMulAction` with a `MonoidHom`, with action `f r' • m`.
See note [reducible non-instances]. -/
abbrev MulDistribMulAction.compHom [Monoid N] (f : N →* M) : MulDistribMulAction N A 
goal: MulDistribMulAction N A

full_name: MulDistribMulAction.toMonoidHom
code: /-- Scalar multiplication by `r` as a `MonoidHom`. -/
def MulDistribMulAction.toMonoidHom (r : M) :
    A →* A 
goal: A →* A

full_name: MulDistribMulAction.toMonoidHom_apply
code: @[simp]
theorem MulDistribMulAction.toMonoidHom_apply (r : M) (x : A) :
    MulDistribMulAction.toMonoidHom A r x = r • x 
goal: (MulDistribMulAction.toMonoidHom A r) x = r • x

full_name: smul_pow'
code: @[simp] lemma smul_pow' (r : M) (x : A) (n : ℕ) : r • x ^ n = (r • x) ^ n 
goal: r • x ^ n = (r • x) ^ n

full_name: MulDistribMulAction.toMonoidEnd
code: /-- Each element of the monoid defines a monoid homomorphism. -/
@[simps]
def MulDistribMulAction.toMonoidEnd :
    M →* Monoid.End A 
goal: M →* Monoid.End A

full_name: MulDistribMulAction.toMonoidEnd_apply
code: /-- Each element of the monoid defines a monoid homomorphism. -/
@[simps]
def MulDistribMulAction.toMonoidEnd :
    M →* Monoid.End A 
goal: (MulDistribMulAction.toMonoidEnd M A) r = MulDistribMulAction.toMonoidHom A r

full_name: smul_inv'
code: @[simp]
theorem smul_inv' (r : M) (x : A) : r • x⁻¹ = (r • x)⁻¹ 
goal: r • x⁻¹ = (r • x)⁻¹

full_name: smul_div'
code: theorem smul_div' (r : M) (x y : A) : r • (x / y) = r • x / r • y 
goal: r • (x / y) = r • x / r • y

full_name: AddMonoid.End.applyDistribMulAction
code: /-- The tautological action by `AddMonoid.End α` on `α`.

This generalizes `Function.End.applyMulAction`. -/
instance AddMonoid.End.applyDistribMulAction [AddMonoid α] :
    DistribMulAction (AddMonoid.End α) α 
goal: DistribMulAction (AddMonoid.End α) α

full_name: AddMonoid.End.smul_def
code: @[simp]
theorem AddMonoid.End.smul_def [AddMonoid α] (f : AddMonoid.End α) (a : α) : f • a = f a 
goal: f • a = f a

full_name: AddMonoid.End.applyFaithfulSMul
code: /-- `AddMonoid.End.applyDistribMulAction` is faithful. -/
instance AddMonoid.End.applyFaithfulSMul [AddMonoid α] :
    FaithfulSMul (AddMonoid.End α) α 
goal: FaithfulSMul (AddMonoid.End α) α