l3lab/ntp-mathlib huggingface dataset:
@[to_additive]
instance (priority := 50) SMulCommClass.op_left [SMul M α] [SMul Mᵐᵒᵖ α] [IsCentralScalar M α]
    [SMul N α] [SMulCommClass M N α] : SMulCommClass Mᵐᵒᵖ N α :=
  ⟨fun m n a => by 

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝⁴ : SMul M α
inst✝³ : SMul Mᵐᵒᵖ α
inst✝² : IsCentralScalar M α
inst✝¹ : SMul N α
inst✝ : SMulCommClass M N α
m : Mᵐᵒᵖ
n : N
a : α
⊢ m • n • a = n • m • a

Next tactic:
rw [← unop_smul_eq_smul m (n • a), ← unop_smul_eq_smul m a, smul_comm]
@[to_additive]
instance (priority := 50) SMulCommClass.op_right [SMul M α] [SMul N α] [SMul Nᵐᵒᵖ α]
    [IsCentralScalar N α] [SMulCommClass M N α] : SMulCommClass M Nᵐᵒᵖ α :=
  ⟨fun m n a => by 

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝⁴ : SMul M α
inst✝³ : SMul N α
inst✝² : SMul Nᵐᵒᵖ α
inst✝¹ : IsCentralScalar N α
inst✝ : SMulCommClass M N α
m : M
n : Nᵐᵒᵖ
a : α
⊢ m • n • a = n • m • a

Next tactic:
rw [← unop_smul_eq_smul n (m • a), ← unop_smul_eq_smul n a, smul_comm]
@[to_additive]
instance (priority := 50) IsScalarTower.op_left [SMul M α] [SMul Mᵐᵒᵖ α] [IsCentralScalar M α]
    [SMul M N] [SMul Mᵐᵒᵖ N] [IsCentralScalar M N] [SMul N α] [IsScalarTower M N α] :
    IsScalarTower Mᵐᵒᵖ N α :=
  ⟨fun m n a => by 

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝⁷ : SMul M α
inst✝⁶ : SMul Mᵐᵒᵖ α
inst✝⁵ : IsCentralScalar M α
inst✝⁴ : SMul M N
inst✝³ : SMul Mᵐᵒᵖ N
inst✝² : IsCentralScalar M N
inst✝¹ : SMul N α
inst✝ : IsScalarTower M N α
m : Mᵐᵒᵖ
n : N
a : α
⊢ (m • n) • a = m • n • a

Next tactic:
rw [← unop_smul_eq_smul m (n • a), ← unop_smul_eq_smul m n, smul_assoc]
@[to_additive]
instance (priority := 50) IsScalarTower.op_right [SMul M α] [SMul M N] [SMul N α]
    [SMul Nᵐᵒᵖ α] [IsCentralScalar N α] [IsScalarTower M N α] : IsScalarTower M Nᵐᵒᵖ α :=
  ⟨fun m n a => by
    

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝⁵ : SMul M α
inst✝⁴ : SMul M N
inst✝³ : SMul N α
inst✝² : SMul Nᵐᵒᵖ α
inst✝¹ : IsCentralScalar N α
inst✝ : IsScalarTower M N α
m : M
n : Nᵐᵒᵖ
a : α
⊢ (m • n) • a = m • n • a

Next tactic:
rw [← unop_smul_eq_smul n a, ← unop_smul_eq_smul (m • n) a, MulOpposite.unop_smul, smul_assoc]
/-- Given a tower of scalar actions `M → α → β`, if we use `SMul.comp`
to pull back both of `M`'s actions by a map `g : N → M`, then we obtain a new
tower of scalar actions `N → α → β`.

This cannot be an instance because it can cause infinite loops whenever the `SMul` arguments
are still metavariables.
-/
@[to_additive
      "Given a tower of additive actions `M → α → β`, if we use `SMul.comp` to pull back both of
       `M`'s actions by a map `g : N → M`, then we obtain a new tower of scalar actions `N → α → β`.

       This cannot be an instance because it can cause infinite loops whenever the `SMul` arguments
       are still metavariables."]
theorem comp.isScalarTower [SMul M β] [SMul α β] [IsScalarTower M α β] (g : N → M) : by
    

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝³ : SMul M α
inst✝² : SMul M β
inst✝¹ : SMul α β
inst✝ : IsScalarTower M α β
g : N → M
⊢ Sort ?u.9982

Next tactic:
haveI := comp α g
/-- Given a tower of scalar actions `M → α → β`, if we use `SMul.comp`
to pull back both of `M`'s actions by a map `g : N → M`, then we obtain a new
tower of scalar actions `N → α → β`.

This cannot be an instance because it can cause infinite loops whenever the `SMul` arguments
are still metavariables.
-/
@[to_additive
      "Given a tower of additive actions `M → α → β`, if we use `SMul.comp` to pull back both of
       `M`'s actions by a map `g : N → M`, then we obtain a new tower of scalar actions `N → α → β`.

       This cannot be an instance because it can cause infinite loops whenever the `SMul` arguments
       are still metavariables."]
theorem comp.isScalarTower [SMul M β] [SMul α β] [IsScalarTower M α β] (g : N → M) : by
    haveI := comp α g; 

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝³ : SMul M α
inst✝² : SMul M β
inst✝¹ : SMul α β
inst✝ : IsScalarTower M α β
g : N → M
this : SMul N α
⊢ Sort ?u.9982

Next tactic:
haveI := comp β g
/-- Given a tower of scalar actions `M → α → β`, if we use `SMul.comp`
to pull back both of `M`'s actions by a map `g : N → M`, then we obtain a new
tower of scalar actions `N → α → β`.

This cannot be an instance because it can cause infinite loops whenever the `SMul` arguments
are still metavariables.
-/
@[to_additive
      "Given a tower of additive actions `M → α → β`, if we use `SMul.comp` to pull back both of
       `M`'s actions by a map `g : N → M`, then we obtain a new tower of scalar actions `N → α → β`.

       This cannot be an instance because it can cause infinite loops whenever the `SMul` arguments
       are still metavariables."]
theorem comp.isScalarTower [SMul M β] [SMul α β] [IsScalarTower M α β] (g : N → M) : by
    haveI := comp α g; haveI := comp β g; 

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝³ : SMul M α
inst✝² : SMul M β
inst✝¹ : SMul α β
inst✝ : IsScalarTower M α β
g : N → M
this✝ : SMul N α
this : SMul N β
⊢ Sort ?u.9982

Next tactic:
exact IsScalarTower N α β
@[to_additive]
theorem smul_smul_smul_comm [SMul α β] [SMul α γ] [SMul β δ] [SMul α δ] [SMul γ δ]
    [IsScalarTower α β δ] [IsScalarTower α γ δ] [SMulCommClass β γ δ] (a : α) (b : β) (c : γ)
    (d : δ) : (a • b) • c • d = (a • c) • b • d := by
  

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝⁷ : SMul α β
inst✝⁶ : SMul α γ
inst✝⁵ : SMul β δ
inst✝⁴ : SMul α δ
inst✝³ : SMul γ δ
inst✝² : IsScalarTower α β δ
inst✝¹ : IsScalarTower α γ δ
inst✝ : SMulCommClass β γ δ
a : α
b : β
c : γ
d : δ
⊢ (a • b) • c • d = (a • c) • b • d

Next tactic:
rw [smul_assoc, smul_assoc, smul_comm b]
@[to_additive]
theorem ite_smul (a₁ a₂ : M) (b : α) : ite p a₁ a₂ • b = ite p (a₁ • b) (a₂ • b) := by
  

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝¹ : SMul M α
p : Prop
inst✝ : Decidable p
a₁ a₂ : M
b : α
⊢ (if p then a₁ else a₂) • b = if p then a₁ • b else a₂ • b

Next tactic:
split_ifs
@[to_additive]
theorem ite_smul (a₁ a₂ : M) (b : α) : ite p a₁ a₂ • b = ite p (a₁ • b) (a₂ • b) := by
  split_ifs <;> 

Proof state:
case pos
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝¹ : SMul M α
p : Prop
inst✝ : Decidable p
a₁ a₂ : M
b : α
h✝ : p
⊢ a₁ • b = a₁ • b

Next tactic:
rfl
@[to_additive]
theorem ite_smul (a₁ a₂ : M) (b : α) : ite p a₁ a₂ • b = ite p (a₁ • b) (a₂ • b) := by
  split_ifs <;> 

Proof state:
case neg
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝¹ : SMul M α
p : Prop
inst✝ : Decidable p
a₁ a₂ : M
b : α
h✝ : ¬p
⊢ a₂ • b = a₂ • b

Next tactic:
rfl
@[to_additive]
theorem smul_ite (a : M) (b₁ b₂ : α) : a • ite p b₁ b₂ = ite p (a • b₁) (a • b₂) := by
  

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝¹ : SMul M α
p : Prop
inst✝ : Decidable p
a : M
b₁ b₂ : α
⊢ (a • if p then b₁ else b₂) = if p then a • b₁ else a • b₂

Next tactic:
split_ifs
@[to_additive]
theorem smul_ite (a : M) (b₁ b₂ : α) : a • ite p b₁ b₂ = ite p (a • b₁) (a • b₂) := by
  split_ifs <;> 

Proof state:
case pos
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝¹ : SMul M α
p : Prop
inst✝ : Decidable p
a : M
b₁ b₂ : α
h✝ : p
⊢ a • b₁ = a • b₁

Next tactic:
rfl
@[to_additive]
theorem smul_ite (a : M) (b₁ b₂ : α) : a • ite p b₁ b₂ = ite p (a • b₁) (a • b₂) := by
  split_ifs <;> 

Proof state:
case neg
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝¹ : SMul M α
p : Prop
inst✝ : Decidable p
a : M
b₁ b₂ : α
h✝ : ¬p
⊢ a • b₂ = a • b₂

Next tactic:
rfl
/-- Pullback a multiplicative action along an injective map respecting `•`.
See note [reducible non-instances]. -/
@[to_additive (attr := reducible)
    "Pullback an additive action along an injective map respecting `+ᵥ`."]
protected def Function.Injective.mulAction [SMul M β] (f : β → α) (hf : Injective f)
    (smul : ∀ (c : M) (x), f (c • x) = c • f x) :
    MulAction M β where
  smul := (· • ·)
  one_smul x := hf <| (smul _ _).trans <| one_smul _ (f x)
  mul_smul c₁ c₂ x := hf <| by 

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝² : Monoid M
inst✝¹ : MulAction M α
inst✝ : SMul M β
f : β → α
hf : Injective f
smul : ∀ (c : M) (x : β), f (c • x) = c • f x
c₁ c₂ : M
x : β
⊢ f ((c₁ * c₂) • x) = f (c₁ • c₂ • x)

Next tactic:
simp only [smul, mul_smul]
/-- Pushforward a multiplicative action along a surjective map respecting `•`.
See note [reducible non-instances]. -/
@[to_additive (attr := reducible)
    "Pushforward an additive action along a surjective map respecting `+ᵥ`."]
protected def Function.Surjective.mulAction [SMul M β] (f : α → β) (hf : Surjective f)
    (smul : ∀ (c : M) (x), f (c • x) = c • f x) :
    MulAction M β where
  smul := (· • ·)
  one_smul y := by
    

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝² : Monoid M
inst✝¹ : MulAction M α
inst✝ : SMul M β
f : α → β
hf : Surjective f
smul : ∀ (c : M) (x : α), f (c • x) = c • f x
y : β
⊢ 1 • y = y

Next tactic:
rcases hf y with ⟨x, rfl⟩
/-- Pushforward a multiplicative action along a surjective map respecting `•`.
See note [reducible non-instances]. -/
@[to_additive (attr := reducible)
    "Pushforward an additive action along a surjective map respecting `+ᵥ`."]
protected def Function.Surjective.mulAction [SMul M β] (f : α → β) (hf : Surjective f)
    (smul : ∀ (c : M) (x), f (c • x) = c • f x) :
    MulAction M β where
  smul := (· • ·)
  one_smul y := by
    rcases hf y with ⟨x, rfl⟩
    

Proof state:
case intro
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝² : Monoid M
inst✝¹ : MulAction M α
inst✝ : SMul M β
f : α → β
hf : Surjective f
smul : ∀ (c : M) (x : α), f (c • x) = c • f x
x : α
⊢ 1 • f x = f x

Next tactic:
rw [← smul, one_smul]
/-- Pushforward a multiplicative action along a surjective map respecting `•`.
See note [reducible non-instances]. -/
@[to_additive (attr := reducible)
    "Pushforward an additive action along a surjective map respecting `+ᵥ`."]
protected def Function.Surjective.mulAction [SMul M β] (f : α → β) (hf : Surjective f)
    (smul : ∀ (c : M) (x), f (c • x) = c • f x) :
    MulAction M β where
  smul := (· • ·)
  one_smul y := by
    rcases hf y with ⟨x, rfl⟩
    rw [← smul, one_smul]
  mul_smul c₁ c₂ y := by
    

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝² : Monoid M
inst✝¹ : MulAction M α
inst✝ : SMul M β
f : α → β
hf : Surjective f
smul : ∀ (c : M) (x : α), f (c • x) = c • f x
c₁ c₂ : M
y : β
⊢ (c₁ * c₂) • y = c₁ • c₂ • y

Next tactic:
rcases hf y with ⟨x, rfl⟩
/-- Pushforward a multiplicative action along a surjective map respecting `•`.
See note [reducible non-instances]. -/
@[to_additive (attr := reducible)
    "Pushforward an additive action along a surjective map respecting `+ᵥ`."]
protected def Function.Surjective.mulAction [SMul M β] (f : α → β) (hf : Surjective f)
    (smul : ∀ (c : M) (x), f (c • x) = c • f x) :
    MulAction M β where
  smul := (· • ·)
  one_smul y := by
    rcases hf y with ⟨x, rfl⟩
    rw [← smul, one_smul]
  mul_smul c₁ c₂ y := by
    rcases hf y with ⟨x, rfl⟩
    

Proof state:
case intro
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝² : Monoid M
inst✝¹ : MulAction M α
inst✝ : SMul M β
f : α → β
hf : Surjective f
smul : ∀ (c : M) (x : α), f (c • x) = c • f x
c₁ c₂ : M
x : α
⊢ (c₁ * c₂) • f x = c₁ • c₂ • f x

Next tactic:
simp only [← smul, mul_smul]
/-- Push forward the action of `R` on `M` along a compatible surjective map `f : R →* S`.

See also `Function.Surjective.distribMulActionLeft` and `Function.Surjective.moduleLeft`.
-/
@[to_additive (attr := reducible)
    "Push forward the action of `R` on `M` along a compatible surjective map `f : R →+ S`."]
def Function.Surjective.mulActionLeft {R S M : Type*} [Monoid R] [MulAction R M] [Monoid S]
    [SMul S M] (f : R →* S) (hf : Function.Surjective f)
    (hsmul : ∀ (c) (x : M), f c • x = c • x) :
    MulAction S M where
  smul := (· • ·)
  one_smul b := by 

Proof state:
M✝ : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝⁵ : Monoid M✝
inst✝⁴ : MulAction M✝ α
R : Type u_10
S : Type u_11
M : Type u_12
inst✝³ : Monoid R
inst✝² : MulAction R M
inst✝¹ : Monoid S
inst✝ : SMul S M
f : R →* S
hf : Surjective ⇑f
hsmul : ∀ (c : R) (x : M), f c • x = c • x
b : M
⊢ 1 • b = b

Next tactic:
rw [← f.map_one, hsmul, one_smul]
/-- Push forward the action of `R` on `M` along a compatible surjective map `f : R →* S`.

See also `Function.Surjective.distribMulActionLeft` and `Function.Surjective.moduleLeft`.
-/
@[to_additive (attr := reducible)
    "Push forward the action of `R` on `M` along a compatible surjective map `f : R →+ S`."]
def Function.Surjective.mulActionLeft {R S M : Type*} [Monoid R] [MulAction R M] [Monoid S]
    [SMul S M] (f : R →* S) (hf : Function.Surjective f)
    (hsmul : ∀ (c) (x : M), f c • x = c • x) :
    MulAction S M where
  smul := (· • ·)
  one_smul b := by rw [← f.map_one, hsmul, one_smul]
  mul_smul := hf.forall₂.mpr fun a b x => by 

Proof state:
M✝ : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝⁵ : Monoid M✝
inst✝⁴ : MulAction M✝ α
R : Type u_10
S : Type u_11
M : Type u_12
inst✝³ : Monoid R
inst✝² : MulAction R M
inst✝¹ : Monoid S
inst✝ : SMul S M
f : R →* S
hf : Surjective ⇑f
hsmul : ∀ (c : R) (x : M), f c • x = c • x
a b : R
x : M
⊢ (f a * f b) • x = f a • f b • x

Next tactic:
simp only [← f.map_mul, hsmul, mul_smul]
/-- Note that the `IsScalarTower M α α` and `SMulCommClass M α α` typeclass arguments are
usually satisfied by `Algebra M α`. -/
@[to_additive] -- Porting note: nolint to_additive_doc
theorem smul_mul_smul [Mul α] (r s : M) (x y : α) [IsScalarTower M α α] [SMulCommClass M α α] :
    r • x * s • y = (r * s) • (x * y) := by
  

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝⁴ : Monoid M
inst✝³ : MulAction M α
inst✝² : Mul α
r s : M
x y : α
inst✝¹ : IsScalarTower M α α
inst✝ : SMulCommClass M α α
⊢ r • x * s • y = (r * s) • (x * y)

Next tactic:
rw [smul_mul_assoc, mul_smul_comm, ← smul_assoc, smul_eq_mul]
/-- Embedding of `α` into functions `M → α` induced by a multiplicative action of `M` on `α`. -/
@[to_additive]
def toFun : α ↪ M → α :=
  ⟨fun y x => x • y, fun y₁ y₂ H => one_smul M y₁ ▸ one_smul M y₂ ▸ by 

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝¹ : Monoid M
inst✝ : MulAction M α
y₁ y₂ : α
H : (fun y x => x • y) y₁ = (fun y x => x • y) y₂
⊢ 1 • y₁ = 1 • y₂

Next tactic:
convert congr_fun H 1
/-- A multiplicative action of `M` on `α` and a monoid homomorphism `N → M` induce
a multiplicative action of `N` on `α`.

See note [reducible non-instances]. -/
@[to_additive (attr := reducible)]
def compHom [Monoid N] (g : N →* M) :
    MulAction N α where
  smul := SMul.comp.smul g
  -- Porting note: was `by simp [g.map_one, MulAction.one_smul]`
  one_smul _ := by 

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝² : Monoid M
inst✝¹ : MulAction M α
inst✝ : Monoid N
g : N →* M
x✝ : α
⊢ 1 • x✝ = x✝

Next tactic:
simp [(· • ·)]
/-- A multiplicative action of `M` on `α` and a monoid homomorphism `N → M` induce
a multiplicative action of `N` on `α`.

See note [reducible non-instances]. -/
@[to_additive (attr := reducible)]
def compHom [Monoid N] (g : N →* M) :
    MulAction N α where
  smul := SMul.comp.smul g
  -- Porting note: was `by simp [g.map_one, MulAction.one_smul]`
  one_smul _ := by simp [(· • ·)]; 

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝² : Monoid M
inst✝¹ : MulAction M α
inst✝ : Monoid N
g : N →* M
x✝ : α
⊢ SMul.smul 1 x✝ = x✝

Next tactic:
apply MulAction.one_smul
/-- A multiplicative action of `M` on `α` and a monoid homomorphism `N → M` induce
a multiplicative action of `N` on `α`.

See note [reducible non-instances]. -/
@[to_additive (attr := reducible)]
def compHom [Monoid N] (g : N →* M) :
    MulAction N α where
  smul := SMul.comp.smul g
  -- Porting note: was `by simp [g.map_one, MulAction.one_smul]`
  one_smul _ := by simp [(· • ·)]; apply MulAction.one_smul
  -- Porting note: was `by simp [g.map_mul, MulAction.mul_smul]`
  mul_smul _ _ _ := by 

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝² : Monoid M
inst✝¹ : MulAction M α
inst✝ : Monoid N
g : N →* M
x✝² x✝¹ : N
x✝ : α
⊢ (x✝² * x✝¹) • x✝ = x✝² • x✝¹ • x✝

Next tactic:
simp [(· • ·)]
/-- A multiplicative action of `M` on `α` and a monoid homomorphism `N → M` induce
a multiplicative action of `N` on `α`.

See note [reducible non-instances]. -/
@[to_additive (attr := reducible)]
def compHom [Monoid N] (g : N →* M) :
    MulAction N α where
  smul := SMul.comp.smul g
  -- Porting note: was `by simp [g.map_one, MulAction.one_smul]`
  one_smul _ := by simp [(· • ·)]; apply MulAction.one_smul
  -- Porting note: was `by simp [g.map_mul, MulAction.mul_smul]`
  mul_smul _ _ _ := by simp [(· • ·)]; 

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝² : Monoid M
inst✝¹ : MulAction M α
inst✝ : Monoid N
g : N →* M
x✝² x✝¹ : N
x✝ : α
⊢ SMul.smul (g x✝² * g x✝¹) x✝ = SMul.smul (g x✝²) (SMul.smul (g x✝¹) x✝)

Next tactic:
apply MulAction.mul_smul
/-- If an action is transitive, then composing this action with a surjective homomorphism gives
again a transitive action. -/
@[to_additive]
theorem isPretransitive_compHom
    {E F G : Type*} [Monoid E] [Monoid F] [MulAction F G] [IsPretransitive F G]
    {f : E →* F} (hf : Surjective f) :
    letI : MulAction E G := MulAction.compHom _ f
    IsPretransitive E G := by
  

Proof state:
M : Type u_1
N : Type u_2
G✝ : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝⁵ : Monoid M
inst✝⁴ : MulAction M α
E : Type u_10
F : Type u_11
G : Type u_12
inst✝³ : Monoid E
inst✝² : Monoid F
inst✝¹ : MulAction F G
inst✝ : IsPretransitive F G
f : E →* F
hf : Surjective ⇑f
⊢ IsPretransitive E G

Next tactic:
let _ : MulAction E G := MulAction.compHom _ f
/-- If an action is transitive, then composing this action with a surjective homomorphism gives
again a transitive action. -/
@[to_additive]
theorem isPretransitive_compHom
    {E F G : Type*} [Monoid E] [Monoid F] [MulAction F G] [IsPretransitive F G]
    {f : E →* F} (hf : Surjective f) :
    letI : MulAction E G := MulAction.compHom _ f
    IsPretransitive E G := by
  let _ : MulAction E G := MulAction.compHom _ f
  

Proof state:
M : Type u_1
N : Type u_2
G✝ : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝⁵ : Monoid M
inst✝⁴ : MulAction M α
E : Type u_10
F : Type u_11
G : Type u_12
inst✝³ : Monoid E
inst✝² : Monoid F
inst✝¹ : MulAction F G
inst✝ : IsPretransitive F G
f : E →* F
hf : Surjective ⇑f
x✝ : MulAction E G := compHom G f
⊢ IsPretransitive E G

Next tactic:
refine ⟨fun x y ↦ ?_⟩
/-- If an action is transitive, then composing this action with a surjective homomorphism gives
again a transitive action. -/
@[to_additive]
theorem isPretransitive_compHom
    {E F G : Type*} [Monoid E] [Monoid F] [MulAction F G] [IsPretransitive F G]
    {f : E →* F} (hf : Surjective f) :
    letI : MulAction E G := MulAction.compHom _ f
    IsPretransitive E G := by
  let _ : MulAction E G := MulAction.compHom _ f
  refine ⟨fun x y ↦ ?_⟩
  

Proof state:
M : Type u_1
N : Type u_2
G✝ : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝⁵ : Monoid M
inst✝⁴ : MulAction M α
E : Type u_10
F : Type u_11
G : Type u_12
inst✝³ : Monoid E
inst✝² : Monoid F
inst✝¹ : MulAction F G
inst✝ : IsPretransitive F G
f : E →* F
hf : Surjective ⇑f
x✝ : MulAction E G := compHom G f
x y : G
⊢ ∃ g, g • x = y

Next tactic:
obtain ⟨m, rfl⟩ : ∃ m : F, m • x = y := exists_smul_eq F x y
/-- If an action is transitive, then composing this action with a surjective homomorphism gives
again a transitive action. -/
@[to_additive]
theorem isPretransitive_compHom
    {E F G : Type*} [Monoid E] [Monoid F] [MulAction F G] [IsPretransitive F G]
    {f : E →* F} (hf : Surjective f) :
    letI : MulAction E G := MulAction.compHom _ f
    IsPretransitive E G := by
  let _ : MulAction E G := MulAction.compHom _ f
  refine ⟨fun x y ↦ ?_⟩
  obtain ⟨m, rfl⟩ : ∃ m : F, m • x = y := exists_smul_eq F x y
  

Proof state:
case intro
M : Type u_1
N : Type u_2
G✝ : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝⁵ : Monoid M
inst✝⁴ : MulAction M α
E : Type u_10
F : Type u_11
G : Type u_12
inst✝³ : Monoid E
inst✝² : Monoid F
inst✝¹ : MulAction F G
inst✝ : IsPretransitive F G
f : E →* F
hf : Surjective ⇑f
x✝ : MulAction E G := compHom G f
x : G
m : F
⊢ ∃ g, g • x = m • x

Next tactic:
obtain ⟨e, rfl⟩ : ∃ e, f e = m := hf m
/-- If an action is transitive, then composing this action with a surjective homomorphism gives
again a transitive action. -/
@[to_additive]
theorem isPretransitive_compHom
    {E F G : Type*} [Monoid E] [Monoid F] [MulAction F G] [IsPretransitive F G]
    {f : E →* F} (hf : Surjective f) :
    letI : MulAction E G := MulAction.compHom _ f
    IsPretransitive E G := by
  let _ : MulAction E G := MulAction.compHom _ f
  refine ⟨fun x y ↦ ?_⟩
  obtain ⟨m, rfl⟩ : ∃ m : F, m • x = y := exists_smul_eq F x y
  obtain ⟨e, rfl⟩ : ∃ e, f e = m := hf m
  

Proof state:
case intro.intro
M : Type u_1
N : Type u_2
G✝ : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
inst✝⁵ : Monoid M
inst✝⁴ : MulAction M α
E : Type u_10
F : Type u_11
G : Type u_12
inst✝³ : Monoid E
inst✝² : Monoid F
inst✝¹ : MulAction F G
inst✝ : IsPretransitive F G
f : E →* F
hf : Surjective ⇑f
x✝ : MulAction E G := compHom G f
x : G
e : E
⊢ ∃ g, g • x = f e • x

Next tactic:
exact ⟨e, rfl⟩
@[to_additive]
theorem smul_one_smul {M} (N) [Monoid N] [SMul M N] [MulAction N α] [SMul M α]
    [IsScalarTower M N α] (x : M) (y : α) : (x • (1 : N)) • y = x • y := by
  

Proof state:
M✝ : Type u_1
N✝ : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
M : Type u_10
N : Type u_11
inst✝⁴ : Monoid N
inst✝³ : SMul M N
inst✝² : MulAction N α
inst✝¹ : SMul M α
inst✝ : IsScalarTower M N α
x : M
y : α
⊢ (x • 1) • y = x • y

Next tactic:
rw [smul_assoc, one_smul]
@[to_additive (attr := simp)]
theorem smul_one_mul {M N} [MulOneClass N] [SMul M N] [IsScalarTower M N N] (x : M) (y : N) :
    x • (1 : N) * y = x • y := by 

Proof state:
M✝ : Type u_1
N✝ : Type u_2
G : Type u_3
A : Type u_4
B : Type u_5
α : Type u_6
β : Type u_7
γ : Type u_8
δ : Type u_9
M : Type u_10
N : Type u_11
inst✝² : MulOneClass N
inst✝¹ : SMul M N
inst✝ : IsScalarTower M N N
x : M
y : N
⊢ x • 1 * y = x • y

Next tactic:
rw [smul_mul_assoc, one_mul]