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

tactic: have h_mon := Monoid.ext h_mul
state_before: M : Type u_1
m₁ m₂ : DivInvMonoid M
h_mul : Mul.mul = Mul.mul
h_inv : Inv.inv = Inv.inv
⊢ 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 : Mul.mul = Mul.mul
h_inv : Inv.inv = Inv.inv
h_mon : toMonoid = toMonoid
h₁ : One.one = One.one
⊢ 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 : 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₂

tactic: have : m₁.div = m₂.div := by
  ext (a b)
  exact @map_div' _ _
    (@MonoidHom _ _ (_) _) (id _) _
    (@MonoidHom.monoidHomClass _ _ (_) _) f (congr_fun h_inv) a b
state_before: 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₂

tactic: rcases m₁ with @⟨_, ⟨_⟩, ⟨_⟩⟩
state_before: 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₂

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 (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₂

tactic: congr
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 (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✝

tactic: ext (m x)
state_before: 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

tactic: exact @MonoidHom.map_zpow' M M m₁ m₂ f (congr_fun h_inv) x m
state_before: 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

tactic: ext (a b)
state_before: 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

tactic: exact @map_div' _ _
  (@MonoidHom _ _ (_) _) (id _) _
  (@MonoidHom.monoidHomClass _ _ (_) _) f (congr_fun h_inv) a b
state_before: 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