[GOAL]
M : Type u
m₁ m₂ : Monoid M
h_mul : Mul.mul = Mul.mul
⊢ m₁ = m₂
[PROOFSTEP]
have : m₁.toMulOneClass = m₂.toMulOneClass := MulOneClass.ext h_mul
[GOAL]
M : Type u
m₁ m₂ : Monoid M
h_mul : Mul.mul = Mul.mul
this : toMulOneClass = toMulOneClass
⊢ m₁ = m₂
[PROOFSTEP]
have h₁ : m₁.one = m₂.one := congr_arg (·.one) (this)
[GOAL]
M : Type u
m₁ m₂ : Monoid M
h_mul : Mul.mul = Mul.mul
this : toMulOneClass = toMulOneClass
h₁ : One.one = One.one
⊢ m₁ = m₂
[PROOFSTEP]
let f : @MonoidHom M M m₁.toMulOneClass m₂.toMulOneClass :=
  @MonoidHom.mk _ _ (_) _ (@OneHom.mk _ _ (_) _ id h₁) (fun x y => congr_fun (congr_fun h_mul x) y)
[GOAL]
M : Type u
m₁ m₂ : Monoid M
h_mul : Mul.mul = Mul.mul
this : toMulOneClass = toMulOneClass
h₁ : One.one = One.one
f : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }
⊢ m₁ = m₂
[PROOFSTEP]
have : m₁.npow = m₂.npow := by
  ext n x
  exact @MonoidHom.map_pow M M m₁ m₂ f x n
[GOAL]
M : Type u
m₁ m₂ : Monoid M
h_mul : Mul.mul = Mul.mul
this : toMulOneClass = toMulOneClass
h₁ : One.one = One.one
f : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }
⊢ npow = npow
[PROOFSTEP]
ext n x
[GOAL]
case h.h
M : Type u
m₁ m₂ : Monoid M
h_mul : Mul.mul = Mul.mul
this : toMulOneClass = toMulOneClass
h₁ : One.one = One.one
f : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }
n : ℕ
x : M
⊢ npow n x = npow n x
[PROOFSTEP]
exact @MonoidHom.map_pow M M m₁ m₂ f x n
[GOAL]
M : Type u
m₁ m₂ : Monoid M
h_mul : Mul.mul = Mul.mul
this✝ : toMulOneClass = toMulOneClass
h₁ : One.one = One.one
f : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }
this : npow = npow
⊢ m₁ = m₂
[PROOFSTEP]
rcases m₁ with @⟨@⟨⟨_⟩⟩, ⟨_⟩⟩
[GOAL]
case mk.mk.mk.mk
M : Type u
m₂ : Monoid M
npow✝ : ℕ → M → M
mul✝ : M → M → M
mul_assoc✝ : ∀ (a b c : M), a * b * c = a * (b * c)
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
one✝ : M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
h_mul : Mul.mul = Mul.mul
this✝ : toMulOneClass = toMulOneClass
h₁ : One.one = One.one
f : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }
this : npow = npow
⊢ mk one_mul✝ mul_one✝ npow✝ = m₂
[PROOFSTEP]
rcases m₂ with @⟨@⟨⟨_⟩⟩, ⟨_⟩⟩
[GOAL]
case mk.mk.mk.mk.mk.mk.mk.mk
M : Type u
npow✝¹ : ℕ → M → M
mul✝¹ : M → M → M
mul_assoc✝¹ : ∀ (a b c : M), a * b * c = a * (b * c)
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
one✝¹ : M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow✝ : ℕ → M → M
mul✝ : M → M → M
mul_assoc✝ : ∀ (a b c : M), a * b * c = a * (b * c)
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
one✝ : M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
h_mul : Mul.mul = Mul.mul
this✝ : toMulOneClass = toMulOneClass
h₁ : One.one = One.one
f : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }
this : npow = npow
⊢ mk one_mul✝¹ mul_one✝¹ npow✝¹ = mk one_mul✝ mul_one✝ npow✝
[PROOFSTEP]
congr
[GOAL]
M : Type u
⊢ Function.Injective (@toMonoid M)
[PROOFSTEP]
rintro ⟨⟩ ⟨⟩ h
[GOAL]
case mk.mk
M : Type u
toMonoid✝¹ : Monoid M
mul_comm✝¹ : ∀ (a b : M), a * b = b * a
toMonoid✝ : Monoid M
mul_comm✝ : ∀ (a b : M), a * b = b * a
h : toMonoid = toMonoid
⊢ mk mul_comm✝¹ = mk mul_comm✝
[PROOFSTEP]
congr
[GOAL]
M : Type u
⊢ Function.Injective (@toMonoid M)
[PROOFSTEP]
rintro @⟨@⟨⟩⟩ @⟨@⟨⟩⟩ h
[GOAL]
case mk.mk.mk.mk
M : Type u
toOne✝¹ : One M
npow✝¹ : ℕ → M → M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
toSemigroup✝¹ : Semigroup M
mul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
toOne✝ : One M
npow✝ : ℕ → M → M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
toSemigroup✝ : Semigroup M
mul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
h : toMonoid = toMonoid
⊢ mk one_mul✝¹ mul_one✝¹ npow✝¹ = mk one_mul✝ mul_one✝ npow✝
[PROOFSTEP]
congr
[GOAL]
case mk.mk.mk.mk.e_toLeftCancelSemigroup.e_toSemigroup
M : Type u
toOne✝¹ : One M
npow✝¹ : ℕ → M → M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
toSemigroup✝¹ : Semigroup M
mul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
toOne✝ : One M
npow✝ : ℕ → M → M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
toSemigroup✝ : Semigroup M
mul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
h : toMonoid = toMonoid
⊢ toSemigroup✝¹ = toSemigroup✝
[PROOFSTEP]
injection h
[GOAL]
case mk.mk.mk.mk.e_toOne
M : Type u
toOne✝¹ : One M
npow✝¹ : ℕ → M → M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
toSemigroup✝¹ : Semigroup M
mul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
toOne✝ : One M
npow✝ : ℕ → M → M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
toSemigroup✝ : Semigroup M
mul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
h : toMonoid = toMonoid
⊢ toOne✝¹ = toOne✝
[PROOFSTEP]
injection h
[GOAL]
case mk.mk.mk.mk.e_npow
M : Type u
toOne✝¹ : One M
npow✝¹ : ℕ → M → M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
toSemigroup✝¹ : Semigroup M
mul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
toOne✝ : One M
npow✝ : ℕ → M → M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
toSemigroup✝ : Semigroup M
mul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
h : toMonoid = toMonoid
⊢ npow✝¹ = npow✝
[PROOFSTEP]
injection h
[GOAL]
M : Type u
⊢ Function.Injective (@toMonoid M)
[PROOFSTEP]
rintro @⟨@⟨⟩⟩ @⟨@⟨⟩⟩ h
[GOAL]
case mk.mk.mk.mk
M : Type u
toOne✝¹ : One M
npow✝¹ : ℕ → M → M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
toSemigroup✝¹ : Semigroup M
mul_right_cancel✝¹ : ∀ (a b c : M), a * b = c * b → a = c
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
toOne✝ : One M
npow✝ : ℕ → M → M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
toSemigroup✝ : Semigroup M
mul_right_cancel✝ : ∀ (a b c : M), a * b = c * b → a = c
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
h : toMonoid = toMonoid
⊢ mk one_mul✝¹ mul_one✝¹ npow✝¹ = mk one_mul✝ mul_one✝ npow✝
[PROOFSTEP]
congr
[GOAL]
case mk.mk.mk.mk.e_toRightCancelSemigroup.e_toSemigroup
M : Type u
toOne✝¹ : One M
npow✝¹ : ℕ → M → M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
toSemigroup✝¹ : Semigroup M
mul_right_cancel✝¹ : ∀ (a b c : M), a * b = c * b → a = c
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
toOne✝ : One M
npow✝ : ℕ → M → M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
toSemigroup✝ : Semigroup M
mul_right_cancel✝ : ∀ (a b c : M), a * b = c * b → a = c
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
h : toMonoid = toMonoid
⊢ toSemigroup✝¹ = toSemigroup✝
[PROOFSTEP]
injection h
[GOAL]
case mk.mk.mk.mk.e_toOne
M : Type u
toOne✝¹ : One M
npow✝¹ : ℕ → M → M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
toSemigroup✝¹ : Semigroup M
mul_right_cancel✝¹ : ∀ (a b c : M), a * b = c * b → a = c
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
toOne✝ : One M
npow✝ : ℕ → M → M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
toSemigroup✝ : Semigroup M
mul_right_cancel✝ : ∀ (a b c : M), a * b = c * b → a = c
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
h : toMonoid = toMonoid
⊢ toOne✝¹ = toOne✝
[PROOFSTEP]
injection h
[GOAL]
case mk.mk.mk.mk.e_npow
M : Type u
toOne✝¹ : One M
npow✝¹ : ℕ → M → M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
toSemigroup✝¹ : Semigroup M
mul_right_cancel✝¹ : ∀ (a b c : M), a * b = c * b → a = c
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
toOne✝ : One M
npow✝ : ℕ → M → M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
toSemigroup✝ : Semigroup M
mul_right_cancel✝ : ∀ (a b c : M), a * b = c * b → a = c
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
h : toMonoid = toMonoid
⊢ npow✝¹ = npow✝
[PROOFSTEP]
injection h
[GOAL]
M : Type u
⊢ Function.Injective (@toLeftCancelMonoid M)
[PROOFSTEP]
rintro ⟨⟩ ⟨⟩ h
[GOAL]
case mk.mk
M : Type u
toLeftCancelMonoid✝¹ : LeftCancelMonoid M
mul_right_cancel✝¹ : ∀ (a b c : M), a * b = c * b → a = c
toLeftCancelMonoid✝ : LeftCancelMonoid M
mul_right_cancel✝ : ∀ (a b c : M), a * b = c * b → a = c
h : toLeftCancelMonoid = toLeftCancelMonoid
⊢ mk mul_right_cancel✝¹ = mk mul_right_cancel✝
[PROOFSTEP]
congr
[GOAL]
M : Type u
⊢ Function.Injective (@toCommMonoid M)
[PROOFSTEP]
rintro @⟨@⟨@⟨⟩⟩⟩ @⟨@⟨@⟨⟩⟩⟩ h
[GOAL]
case mk.mk.mk.mk.mk.mk
M : Type u
toOne✝¹ : One M
npow✝¹ : ℕ → M → M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
toSemigroup✝¹ : Semigroup M
mul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
mul_comm✝¹ : ∀ (a b : M), a * b = b * a
toOne✝ : One M
npow✝ : ℕ → M → M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
toSemigroup✝ : Semigroup M
mul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
mul_comm✝ : ∀ (a b : M), a * b = b * a
h : toCommMonoid = toCommMonoid
⊢ mk mul_comm✝¹ = mk mul_comm✝
[PROOFSTEP]
congr
[GOAL]
case mk.mk.mk.mk.mk.mk.e_toLeftCancelMonoid.e_toLeftCancelSemigroup.e_toSemigroup
M : Type u
toOne✝¹ : One M
npow✝¹ : ℕ → M → M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
toSemigroup✝¹ : Semigroup M
mul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
mul_comm✝¹ : ∀ (a b : M), a * b = b * a
toOne✝ : One M
npow✝ : ℕ → M → M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
toSemigroup✝ : Semigroup M
mul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
mul_comm✝ : ∀ (a b : M), a * b = b * a
h : toCommMonoid = toCommMonoid
⊢ toSemigroup✝¹ = toSemigroup✝
[PROOFSTEP]
{ injection h with h'
  injection h'
}
[GOAL]
case mk.mk.mk.mk.mk.mk.e_toLeftCancelMonoid.e_toLeftCancelSemigroup.e_toSemigroup
M : Type u
toOne✝¹ : One M
npow✝¹ : ℕ → M → M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
toSemigroup✝¹ : Semigroup M
mul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
mul_comm✝¹ : ∀ (a b : M), a * b = b * a
toOne✝ : One M
npow✝ : ℕ → M → M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
toSemigroup✝ : Semigroup M
mul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
mul_comm✝ : ∀ (a b : M), a * b = b * a
h : toCommMonoid = toCommMonoid
⊢ toSemigroup✝¹ = toSemigroup✝
[PROOFSTEP]
injection h with h'
[GOAL]
case mk.mk.mk.mk.mk.mk.e_toLeftCancelMonoid.e_toLeftCancelSemigroup.e_toSemigroup
M : Type u
toOne✝¹ : One M
npow✝¹ : ℕ → M → M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
toSemigroup✝¹ : Semigroup M
mul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
mul_comm✝¹ : ∀ (a b : M), a * b = b * a
toOne✝ : One M
npow✝ : ℕ → M → M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
toSemigroup✝ : Semigroup M
mul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
mul_comm✝ : ∀ (a b : M), a * b = b * a
h' :
  Monoid.mk (_ : ∀ (a : M), 1 * a = a) (_ : ∀ (a : M), a * 1 = a) LeftCancelMonoid.npow =
    Monoid.mk (_ : ∀ (a : M), 1 * a = a) (_ : ∀ (a : M), a * 1 = a) LeftCancelMonoid.npow
⊢ toSemigroup✝¹ = toSemigroup✝
[PROOFSTEP]
injection h'
[GOAL]
case mk.mk.mk.mk.mk.mk.e_toLeftCancelMonoid.e_toOne
M : Type u
toOne✝¹ : One M
npow✝¹ : ℕ → M → M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
toSemigroup✝¹ : Semigroup M
mul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
mul_comm✝¹ : ∀ (a b : M), a * b = b * a
toOne✝ : One M
npow✝ : ℕ → M → M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
toSemigroup✝ : Semigroup M
mul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
mul_comm✝ : ∀ (a b : M), a * b = b * a
h : toCommMonoid = toCommMonoid
⊢ toOne✝¹ = toOne✝
[PROOFSTEP]
{ injection h with h'
  injection h'
}
[GOAL]
case mk.mk.mk.mk.mk.mk.e_toLeftCancelMonoid.e_toOne
M : Type u
toOne✝¹ : One M
npow✝¹ : ℕ → M → M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
toSemigroup✝¹ : Semigroup M
mul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
mul_comm✝¹ : ∀ (a b : M), a * b = b * a
toOne✝ : One M
npow✝ : ℕ → M → M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
toSemigroup✝ : Semigroup M
mul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
mul_comm✝ : ∀ (a b : M), a * b = b * a
h : toCommMonoid = toCommMonoid
⊢ toOne✝¹ = toOne✝
[PROOFSTEP]
injection h with h'
[GOAL]
case mk.mk.mk.mk.mk.mk.e_toLeftCancelMonoid.e_toOne
M : Type u
toOne✝¹ : One M
npow✝¹ : ℕ → M → M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
toSemigroup✝¹ : Semigroup M
mul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
mul_comm✝¹ : ∀ (a b : M), a * b = b * a
toOne✝ : One M
npow✝ : ℕ → M → M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
toSemigroup✝ : Semigroup M
mul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
mul_comm✝ : ∀ (a b : M), a * b = b * a
h' :
  Monoid.mk (_ : ∀ (a : M), 1 * a = a) (_ : ∀ (a : M), a * 1 = a) LeftCancelMonoid.npow =
    Monoid.mk (_ : ∀ (a : M), 1 * a = a) (_ : ∀ (a : M), a * 1 = a) LeftCancelMonoid.npow
⊢ toOne✝¹ = toOne✝
[PROOFSTEP]
injection h'
[GOAL]
case mk.mk.mk.mk.mk.mk.e_toLeftCancelMonoid.e_npow
M : Type u
toOne✝¹ : One M
npow✝¹ : ℕ → M → M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
toSemigroup✝¹ : Semigroup M
mul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
mul_comm✝¹ : ∀ (a b : M), a * b = b * a
toOne✝ : One M
npow✝ : ℕ → M → M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
toSemigroup✝ : Semigroup M
mul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
mul_comm✝ : ∀ (a b : M), a * b = b * a
h : toCommMonoid = toCommMonoid
⊢ npow✝¹ = npow✝
[PROOFSTEP]
{ injection h with h'
  injection h'
}
[GOAL]
case mk.mk.mk.mk.mk.mk.e_toLeftCancelMonoid.e_npow
M : Type u
toOne✝¹ : One M
npow✝¹ : ℕ → M → M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
toSemigroup✝¹ : Semigroup M
mul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
mul_comm✝¹ : ∀ (a b : M), a * b = b * a
toOne✝ : One M
npow✝ : ℕ → M → M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
toSemigroup✝ : Semigroup M
mul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
mul_comm✝ : ∀ (a b : M), a * b = b * a
h : toCommMonoid = toCommMonoid
⊢ npow✝¹ = npow✝
[PROOFSTEP]
injection h with h'
[GOAL]
case mk.mk.mk.mk.mk.mk.e_toLeftCancelMonoid.e_npow
M : Type u
toOne✝¹ : One M
npow✝¹ : ℕ → M → M
npow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1
toSemigroup✝¹ : Semigroup M
mul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝¹ : ∀ (a : M), 1 * a = a
mul_one✝¹ : ∀ (a : M), a * 1 = a
npow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x
mul_comm✝¹ : ∀ (a b : M), a * b = b * a
toOne✝ : One M
npow✝ : ℕ → M → M
npow_zero✝ : ∀ (x : M), npow✝ 0 x = 1
toSemigroup✝ : Semigroup M
mul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c
one_mul✝ : ∀ (a : M), 1 * a = a
mul_one✝ : ∀ (a : M), a * 1 = a
npow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x
mul_comm✝ : ∀ (a b : M), a * b = b * a
h' :
  Monoid.mk (_ : ∀ (a : M), 1 * a = a) (_ : ∀ (a : M), a * 1 = a) LeftCancelMonoid.npow =
    Monoid.mk (_ : ∀ (a : M), 1 * a = a) (_ : ∀ (a : M), a * 1 = a) LeftCancelMonoid.npow
⊢ npow✝¹ = npow✝
[PROOFSTEP]
injection h'
[GOAL]
M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : Mul.mul = Mul.mul
h_inv : Inv.inv = Inv.inv
⊢ m₁ = m₂
[PROOFSTEP]
have h_mon := Monoid.ext h_mul
[GOAL]
M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : Mul.mul = Mul.mul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
⊢ m₁ = m₂
[PROOFSTEP]
have h₁ : m₁.one = m₂.one := congr_arg (·.one) h_mon
[GOAL]
M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : Mul.mul = Mul.mul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
⊢ m₁ = m₂
[PROOFSTEP]
let f : @MonoidHom M M m₁.toMulOneClass m₂.toMulOneClass :=
  @MonoidHom.mk _ _ (_) _ (@OneHom.mk _ _ (_) _ id h₁) (fun x y => congr_fun (congr_fun h_mul x) y)
[GOAL]
M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : Mul.mul = Mul.mul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }
⊢ m₁ = m₂
[PROOFSTEP]
have : m₁.npow = m₂.npow := congr_arg (·.npow) h_mon
[GOAL]
M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : Mul.mul = Mul.mul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }
this : Monoid.npow = Monoid.npow
⊢ m₁ = m₂
[PROOFSTEP]
have : m₁.zpow = m₂.zpow := by
  ext m x
  exact @MonoidHom.map_zpow' M M m₁ m₂ f (congr_fun h_inv) x m
[GOAL]
M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : Mul.mul = Mul.mul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }
this : Monoid.npow = Monoid.npow
⊢ zpow = zpow
[PROOFSTEP]
ext m x
[GOAL]
case h.h
M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : Mul.mul = Mul.mul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }
this : Monoid.npow = Monoid.npow
m : ℤ
x : M
⊢ zpow m x = zpow m x
[PROOFSTEP]
exact @MonoidHom.map_zpow' M M m₁ m₂ f (congr_fun h_inv) x m
[GOAL]
M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : Mul.mul = Mul.mul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }
this✝ : Monoid.npow = Monoid.npow
this : zpow = zpow
⊢ m₁ = m₂
[PROOFSTEP]
have : m₁.div = m₂.div := by
  ext a b
  exact @map_div' _ _ (@MonoidHom _ _ (_) _) (id _) _ (@MonoidHom.monoidHomClass _ _ (_) _) f (congr_fun h_inv) a b
[GOAL]
M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : Mul.mul = Mul.mul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }
this✝ : Monoid.npow = Monoid.npow
this : zpow = zpow
⊢ Div.div = Div.div
[PROOFSTEP]
ext a b
[GOAL]
case h.h
M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : Mul.mul = Mul.mul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }
this✝ : Monoid.npow = Monoid.npow
this : zpow = zpow
a b : M
⊢ Div.div a b = Div.div a b
[PROOFSTEP]
exact @map_div' _ _ (@MonoidHom _ _ (_) _) (id _) _ (@MonoidHom.monoidHomClass _ _ (_) _) f (congr_fun h_inv) a b
[GOAL]
M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : Mul.mul = Mul.mul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }
this✝¹ : Monoid.npow = Monoid.npow
this✝ : zpow = zpow
this : Div.div = Div.div
⊢ m₁ = m₂
[PROOFSTEP]
rcases m₁ with @⟨_, ⟨_⟩, ⟨_⟩⟩
[GOAL]
case mk.mk.mk
M : Type u_1
m₂ : DivInvMonoid M
toMonoid✝ : Monoid M
zpow✝ : ℤ → M → M
zpow_zero'✝ : ∀ (a : M), zpow✝ 0 a = 1
zpow_succ'✝ : ∀ (n : ℕ) (a : M), zpow✝ (Int.ofNat (Nat.succ n)) a = a * zpow✝ (Int.ofNat n) a
inv✝ : M → M
zpow_neg'✝ : ∀ (n : ℕ) (a : M), zpow✝ (Int.negSucc n) a = (zpow✝ (↑(Nat.succ n)) a)⁻¹
div✝ : M → M → M
div_eq_mul_inv✝ : ∀ (a b : M), a / b = a * b⁻¹
h_mul : Mul.mul = Mul.mul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }
this✝¹ : Monoid.npow = Monoid.npow
this✝ : zpow = zpow
this : Div.div = Div.div
⊢ mk zpow✝ = m₂
[PROOFSTEP]
rcases m₂ with @⟨_, ⟨_⟩, ⟨_⟩⟩
[GOAL]
case mk.mk.mk.mk.mk.mk
M : Type u_1
toMonoid✝¹ : Monoid M
zpow✝¹ : ℤ → M → M
zpow_zero'✝¹ : ∀ (a : M), zpow✝¹ 0 a = 1
zpow_succ'✝¹ : ∀ (n : ℕ) (a : M), zpow✝¹ (Int.ofNat (Nat.succ n)) a = a * zpow✝¹ (Int.ofNat n) a
inv✝¹ : M → M
zpow_neg'✝¹ : ∀ (n : ℕ) (a : M), zpow✝¹ (Int.negSucc n) a = (zpow✝¹ (↑(Nat.succ n)) a)⁻¹
div✝¹ : M → M → M
div_eq_mul_inv✝¹ : ∀ (a b : M), a / b = a * b⁻¹
toMonoid✝ : Monoid M
zpow✝ : ℤ → M → M
zpow_zero'✝ : ∀ (a : M), zpow✝ 0 a = 1
zpow_succ'✝ : ∀ (n : ℕ) (a : M), zpow✝ (Int.ofNat (Nat.succ n)) a = a * zpow✝ (Int.ofNat n) a
inv✝ : M → M
zpow_neg'✝ : ∀ (n : ℕ) (a : M), zpow✝ (Int.negSucc n) a = (zpow✝ (↑(Nat.succ n)) a)⁻¹
div✝ : M → M → M
div_eq_mul_inv✝ : ∀ (a b : M), a / b = a * b⁻¹
h_mul : Mul.mul = Mul.mul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }
this✝¹ : Monoid.npow = Monoid.npow
this✝ : zpow = zpow
this : Div.div = Div.div
⊢ mk zpow✝¹ = mk zpow✝
[PROOFSTEP]
congr
[GOAL]
G : Type u_1
g₁ g₂ : Group G
h_mul : Mul.mul = Mul.mul
⊢ g₁ = g₂
[PROOFSTEP]
have h₁ : g₁.one = g₂.one := congr_arg (·.one) (Monoid.ext h_mul)
[GOAL]
G : Type u_1
g₁ g₂ : Group G
h_mul : Mul.mul = Mul.mul
h₁ : One.one = One.one
⊢ g₁ = g₂
[PROOFSTEP]
let f : @MonoidHom G G g₁.toMulOneClass g₂.toMulOneClass :=
  @MonoidHom.mk _ _ (_) _ (@OneHom.mk _ _ (_) _ id h₁) (fun x y => congr_fun (congr_fun h_mul x) y)
[GOAL]
G : Type u_1
g₁ g₂ : Group G
h_mul : Mul.mul = Mul.mul
h₁ : One.one = One.one
f : G →* G := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : G), Mul.mul x y = Mul.mul x y) }
⊢ g₁ = g₂
[PROOFSTEP]
exact
  Group.toDivInvMonoid_injective (DivInvMonoid.ext h_mul (funext <| @MonoidHom.map_inv G G g₁ g₂.toDivisionMonoid f))
