Theorem: DivInvMonoid.ext
File: Mathlib/Algebra/Group/Ext.lean

Proof steps:
state_before: M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : HMul.hMul = HMul.hMul
h_inv : Inv.inv = Inv.inv
⊢ m₁ = m₂
state_after: M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : HMul.hMul = HMul.hMul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
⊢ m₁ = m₂
tactic: have h_mon := Monoid.ext h_mul
state_before: M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : HMul.hMul = HMul.hMul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
⊢ m₁ = m₂
state_after: M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : HMul.hMul = HMul.hMul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toFun := id, map_one' := h₁, map_mul' := ⋯ }
⊢ m₁ = m₂
tactic: 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)
state_before: M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : HMul.hMul = HMul.hMul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toFun := id, map_one' := h₁, map_mul' := ⋯ }
this : Monoid.npow = Monoid.npow
⊢ m₁ = m₂
state_after: M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : HMul.hMul = HMul.hMul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toFun := id, map_one' := h₁, map_mul' := ⋯ }
this✝ : Monoid.npow = Monoid.npow
this : DivInvMonoid.zpow = DivInvMonoid.zpow
⊢ m₁ = m₂
tactic: have : m₁.zpow = m₂.zpow := by
    ext m x
    exact @MonoidHom.map_zpow' M M m₁ m₂ f (congr_fun h_inv) x m
state_before: M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : HMul.hMul = HMul.hMul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toFun := id, map_one' := h₁, map_mul' := ⋯ }
this✝ : Monoid.npow = Monoid.npow
this : DivInvMonoid.zpow = DivInvMonoid.zpow
⊢ m₁ = m₂
state_after: M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : HMul.hMul = HMul.hMul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toFun := id, map_one' := h₁, map_mul' := ⋯ }
this✝¹ : Monoid.npow = Monoid.npow
this✝ : DivInvMonoid.zpow = DivInvMonoid.zpow
this : Div.div = Div.div
⊢ m₁ = m₂
tactic: have : m₁.div = m₂.div := by
    ext a b
    exact @map_div' _ _
      (F := @MonoidHom _ _ (_) _) _ (id _) _
      (@MonoidHom.instMonoidHomClass _ _ (_) _) f (congr_fun h_inv) a b
state_before: M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : HMul.hMul = HMul.hMul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toFun := id, map_one' := h₁, map_mul' := ⋯ }
this✝¹ : Monoid.npow = Monoid.npow
this✝ : DivInvMonoid.zpow = DivInvMonoid.zpow
this : Div.div = Div.div
⊢ m₁ = m₂
state_after: 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 n.succ) a = zpow✝ (Int.ofNat n) a * a
inv✝ : M → M
zpow_neg'✝ : ∀ (n : ℕ) (a : M), zpow✝ (Int.negSucc n) a = (zpow✝ (↑n.succ) a)⁻¹
div✝ : M → M → M
div_eq_mul_inv✝ : ∀ (a b : M), a / b = a * b⁻¹
h_mul : HMul.hMul = HMul.hMul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toFun := id, map_one' := h₁, map_mul' := ⋯ }
this✝¹ : Monoid.npow = Monoid.npow
this✝ : DivInvMonoid.zpow = DivInvMonoid.zpow
this : Div.div = Div.div
⊢ mk div_eq_mul_inv✝ zpow✝ zpow_zero'✝ zpow_succ'✝ zpow_neg'✝ = m₂
tactic: rcases m₁ with @⟨_, ⟨_⟩, ⟨_⟩⟩
state_before: 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 n.succ) a = zpow✝ (Int.ofNat n) a * a
inv✝ : M → M
zpow_neg'✝ : ∀ (n : ℕ) (a : M), zpow✝ (Int.negSucc n) a = (zpow✝ (↑n.succ) a)⁻¹
div✝ : M → M → M
div_eq_mul_inv✝ : ∀ (a b : M), a / b = a * b⁻¹
h_mul : HMul.hMul = HMul.hMul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toFun := id, map_one' := h₁, map_mul' := ⋯ }
this✝¹ : Monoid.npow = Monoid.npow
this✝ : DivInvMonoid.zpow = DivInvMonoid.zpow
this : Div.div = Div.div
⊢ mk div_eq_mul_inv✝ zpow✝ zpow_zero'✝ zpow_succ'✝ zpow_neg'✝ = m₂
state_after: 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 n.succ) a = zpow✝¹ (Int.ofNat n) a * a
inv✝¹ : M → M
zpow_neg'✝¹ : ∀ (n : ℕ) (a : M), zpow✝¹ (Int.negSucc n) a = (zpow✝¹ (↑n.succ) 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 n.succ) a = zpow✝ (Int.ofNat n) a * a
inv✝ : M → M
zpow_neg'✝ : ∀ (n : ℕ) (a : M), zpow✝ (Int.negSucc n) a = (zpow✝ (↑n.succ) a)⁻¹
div✝ : M → M → M
div_eq_mul_inv✝ : ∀ (a b : M), a / b = a * b⁻¹
h_mul : HMul.hMul = HMul.hMul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toFun := id, map_one' := h₁, map_mul' := ⋯ }
this✝¹ : Monoid.npow = Monoid.npow
this✝ : DivInvMonoid.zpow = DivInvMonoid.zpow
this : Div.div = Div.div
⊢ mk div_eq_mul_inv✝¹ zpow✝¹ zpow_zero'✝¹ zpow_succ'✝¹ zpow_neg'✝¹ =
    mk div_eq_mul_inv✝ zpow✝ zpow_zero'✝ zpow_succ'✝ zpow_neg'✝
tactic: rcases m₂ with @⟨_, ⟨_⟩, ⟨_⟩⟩
state_before: 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 n.succ) a = zpow✝¹ (Int.ofNat n) a * a
inv✝¹ : M → M
zpow_neg'✝¹ : ∀ (n : ℕ) (a : M), zpow✝¹ (Int.negSucc n) a = (zpow✝¹ (↑n.succ) 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 n.succ) a = zpow✝ (Int.ofNat n) a * a
inv✝ : M → M
zpow_neg'✝ : ∀ (n : ℕ) (a : M), zpow✝ (Int.negSucc n) a = (zpow✝ (↑n.succ) a)⁻¹
div✝ : M → M → M
div_eq_mul_inv✝ : ∀ (a b : M), a / b = a * b⁻¹
h_mul : HMul.hMul = HMul.hMul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
f : M →* M := { toFun := id, map_one' := h₁, map_mul' := ⋯ }
this✝¹ : Monoid.npow = Monoid.npow
this✝ : DivInvMonoid.zpow = DivInvMonoid.zpow
this : Div.div = Div.div
⊢ mk div_eq_mul_inv✝¹ zpow✝¹ zpow_zero'✝¹ zpow_succ'✝¹ zpow_neg'✝¹ =
    mk div_eq_mul_inv✝ zpow✝ zpow_zero'✝ zpow_succ'✝ zpow_neg'✝
state_after: no goals
tactic: congr