Theorem: AddGroupWithOne.ext
File: Mathlib/Algebra/Ring/Ext.lean

Proof steps:
state_before: R : Type u
inst₁ inst₂ : AddGroupWithOne R
h_add : HAdd.hAdd = HAdd.hAdd
h_one : One.one = One.one
⊢ inst₁ = inst₂
state_after: R : Type u
inst₁ inst₂ : AddGroupWithOne R
h_add : HAdd.hAdd = HAdd.hAdd
h_one : One.one = One.one
this : toAddMonoidWithOne = toAddMonoidWithOne
⊢ inst₁ = inst₂
tactic: have : inst₁.toAddMonoidWithOne = inst₂.toAddMonoidWithOne :=
    AddMonoidWithOne.ext h_add h_one
state_before: R : Type u
inst₁ inst₂ : AddGroupWithOne R
h_add : HAdd.hAdd = HAdd.hAdd
h_one : One.one = One.one
this✝ : toAddMonoidWithOne = toAddMonoidWithOne
this : AddMonoidWithOne.toNatCast = AddMonoidWithOne.toNatCast
⊢ inst₁ = inst₂
state_after: R : Type u
inst₁ inst₂ : AddGroupWithOne R
h_add : HAdd.hAdd = HAdd.hAdd
h_one : One.one = One.one
this✝ : toAddMonoidWithOne = toAddMonoidWithOne
this : AddMonoidWithOne.toNatCast = AddMonoidWithOne.toNatCast
h_group : toAddGroup = toAddGroup
⊢ inst₁ = inst₂
tactic: have h_group : inst₁.toAddGroup = inst₂.toAddGroup := by ext : 1; exact h_add
state_before: R : Type u
inst₁ inst₂ : AddGroupWithOne R
h_add : HAdd.hAdd = HAdd.hAdd
h_one : One.one = One.one
this✝ : toAddMonoidWithOne = toAddMonoidWithOne
this : AddMonoidWithOne.toNatCast = AddMonoidWithOne.toNatCast
h_group : toAddGroup = toAddGroup
⊢ inst₁ = inst₂
state_after: R : Type u
inst₁ inst₂ : AddGroupWithOne R
h_add : HAdd.hAdd = HAdd.hAdd
h_one : One.one = One.one
this✝ : toAddMonoidWithOne = toAddMonoidWithOne
this : AddMonoidWithOne.toNatCast = AddMonoidWithOne.toNatCast
h_group : SubNegMonoid.mk ⋯ AddGroupWithOne.zsmul ⋯ ⋯ ⋯ = SubNegMonoid.mk ⋯ AddGroupWithOne.zsmul ⋯ ⋯ ⋯
⊢ inst₁ = inst₂
tactic: injection h_group with h_group
state_before: R : Type u
inst₁ inst₂ : AddGroupWithOne R
h_add : HAdd.hAdd = HAdd.hAdd
h_one : One.one = One.one
this✝ : toAddMonoidWithOne = toAddMonoidWithOne
this : AddMonoidWithOne.toNatCast = AddMonoidWithOne.toNatCast
h_group : SubNegMonoid.mk ⋯ AddGroupWithOne.zsmul ⋯ ⋯ ⋯ = SubNegMonoid.mk ⋯ AddGroupWithOne.zsmul ⋯ ⋯ ⋯
⊢ inst₁ = inst₂
state_after: R : Type u
inst₁ inst₂ : AddGroupWithOne R
h_add : HAdd.hAdd = HAdd.hAdd
h_one : One.one = One.one
this✝ : toAddMonoidWithOne = toAddMonoidWithOne
this : AddMonoidWithOne.toNatCast = AddMonoidWithOne.toNatCast
toAddMonoid_eq✝ : AddMonoidWithOne.toAddMonoid = AddMonoidWithOne.toAddMonoid
toNeg_eq✝ : toNeg = toNeg
toSub_eq✝ : toSub = toSub
zsmul_eq✝ : AddGroupWithOne.zsmul = AddGroupWithOne.zsmul
⊢ inst₁ = inst₂
tactic: injection h_group
state_before: R : Type u
inst₁ inst₂ : AddGroupWithOne R
h_add : HAdd.hAdd = HAdd.hAdd
h_one : One.one = One.one
this✝ : toAddMonoidWithOne = toAddMonoidWithOne
this : AddMonoidWithOne.toNatCast = AddMonoidWithOne.toNatCast
toAddMonoid_eq✝ : AddMonoidWithOne.toAddMonoid = AddMonoidWithOne.toAddMonoid
toNeg_eq✝ : toNeg = toNeg
toSub_eq✝ : toSub = toSub
zsmul_eq✝ : AddGroupWithOne.zsmul = AddGroupWithOne.zsmul
⊢ inst₁ = inst₂
state_after: R : Type u
inst₁ inst₂ : AddGroupWithOne R
h_add : HAdd.hAdd = HAdd.hAdd
h_one : One.one = One.one
this✝¹ : toAddMonoidWithOne = toAddMonoidWithOne
this✝ : AddMonoidWithOne.toNatCast = AddMonoidWithOne.toNatCast
toAddMonoid_eq✝ : AddMonoidWithOne.toAddMonoid = AddMonoidWithOne.toAddMonoid
toNeg_eq✝ : toNeg = toNeg
toSub_eq✝ : toSub = toSub
zsmul_eq✝ : AddGroupWithOne.zsmul = AddGroupWithOne.zsmul
this : IntCast.intCast = IntCast.intCast
⊢ inst₁ = inst₂
tactic: have : inst₁.toIntCast.intCast = inst₂.toIntCast.intCast := by
    funext n; cases n with
    | ofNat n   => rewrite [Int.ofNat_eq_coe, inst₁.intCast_ofNat, inst₂.intCast_ofNat]; congr
    | negSucc n => rewrite [inst₁.intCast_negSucc, inst₂.intCast_negSucc]; congr
state_before: R : Type u
inst₁ inst₂ : AddGroupWithOne R
h_add : HAdd.hAdd = HAdd.hAdd
h_one : One.one = One.one
this✝¹ : toAddMonoidWithOne = toAddMonoidWithOne
this✝ : AddMonoidWithOne.toNatCast = AddMonoidWithOne.toNatCast
toAddMonoid_eq✝ : AddMonoidWithOne.toAddMonoid = AddMonoidWithOne.toAddMonoid
toNeg_eq✝ : toNeg = toNeg
toSub_eq✝ : toSub = toSub
zsmul_eq✝ : AddGroupWithOne.zsmul = AddGroupWithOne.zsmul
this : IntCast.intCast = IntCast.intCast
⊢ inst₁ = inst₂
state_after: case mk.mk
R : Type u
inst₂ : AddGroupWithOne R
toAddMonoidWithOne✝ : AddMonoidWithOne R
toNeg✝ : Neg R
toSub✝ : Sub R
sub_eq_add_neg✝ : ∀ (a b : R), a - b = a + -b
zsmul✝ : ℤ → R → R
zsmul_zero'✝ : ∀ (a : R), zsmul✝ 0 a = 0
zsmul_succ'✝ : ∀ (n : ℕ) (a : R), zsmul✝ (Int.ofNat n.succ) a = zsmul✝ (Int.ofNat n) a + a
zsmul_neg'✝ : ∀ (n : ℕ) (a : R), zsmul✝ (Int.negSucc n) a = -zsmul✝ (↑n.succ) a
add_left_neg✝ : ∀ (a : R), -a + a = 0
intCast✝ : ℤ → R
intCast_ofNat✝ : ∀ (n : ℕ), IntCast.intCast ↑n = ↑n
intCast_negSucc✝ : ∀ (n : ℕ), IntCast.intCast (Int.negSucc n) = -↑(n + 1)
h_add : HAdd.hAdd = HAdd.hAdd
h_one : One.one = One.one
this✝¹ : toAddMonoidWithOne = toAddMonoidWithOne
this✝ : AddMonoidWithOne.toNatCast = AddMonoidWithOne.toNatCast
toAddMonoid_eq✝ : AddMonoidWithOne.toAddMonoid = AddMonoidWithOne.toAddMonoid
toNeg_eq✝ : toNeg = toNeg
toSub_eq✝ : toSub = toSub
zsmul_eq✝ : AddGroupWithOne.zsmul = AddGroupWithOne.zsmul
this : IntCast.intCast = IntCast.intCast
⊢ mk sub_eq_add_neg✝ zsmul✝ zsmul_zero'✝ zsmul_succ'✝ zsmul_neg'✝ add_left_neg✝ intCast_ofNat✝ intCast_negSucc✝ = inst₂
tactic: rcases inst₁ with @⟨⟨⟩⟩
state_before: case mk.mk
R : Type u
inst₂ : AddGroupWithOne R
toAddMonoidWithOne✝ : AddMonoidWithOne R
toNeg✝ : Neg R
toSub✝ : Sub R
sub_eq_add_neg✝ : ∀ (a b : R), a - b = a + -b
zsmul✝ : ℤ → R → R
zsmul_zero'✝ : ∀ (a : R), zsmul✝ 0 a = 0
zsmul_succ'✝ : ∀ (n : ℕ) (a : R), zsmul✝ (Int.ofNat n.succ) a = zsmul✝ (Int.ofNat n) a + a
zsmul_neg'✝ : ∀ (n : ℕ) (a : R), zsmul✝ (Int.negSucc n) a = -zsmul✝ (↑n.succ) a
add_left_neg✝ : ∀ (a : R), -a + a = 0
intCast✝ : ℤ → R
intCast_ofNat✝ : ∀ (n : ℕ), IntCast.intCast ↑n = ↑n
intCast_negSucc✝ : ∀ (n : ℕ), IntCast.intCast (Int.negSucc n) = -↑(n + 1)
h_add : HAdd.hAdd = HAdd.hAdd
h_one : One.one = One.one
this✝¹ : toAddMonoidWithOne = toAddMonoidWithOne
this✝ : AddMonoidWithOne.toNatCast = AddMonoidWithOne.toNatCast
toAddMonoid_eq✝ : AddMonoidWithOne.toAddMonoid = AddMonoidWithOne.toAddMonoid
toNeg_eq✝ : toNeg = toNeg
toSub_eq✝ : toSub = toSub
zsmul_eq✝ : AddGroupWithOne.zsmul = AddGroupWithOne.zsmul
this : IntCast.intCast = IntCast.intCast
⊢ mk sub_eq_add_neg✝ zsmul✝ zsmul_zero'✝ zsmul_succ'✝ zsmul_neg'✝ add_left_neg✝ intCast_ofNat✝ intCast_negSucc✝ = inst₂
state_after: case mk.mk.mk.mk
R : Type u
toAddMonoidWithOne✝¹ : AddMonoidWithOne R
toNeg✝¹ : Neg R
toSub✝¹ : Sub R
sub_eq_add_neg✝¹ : ∀ (a b : R), a - b = a + -b
zsmul✝¹ : ℤ → R → R
zsmul_zero'✝¹ : ∀ (a : R), zsmul✝¹ 0 a = 0
zsmul_succ'✝¹ : ∀ (n : ℕ) (a : R), zsmul✝¹ (Int.ofNat n.succ) a = zsmul✝¹ (Int.ofNat n) a + a
zsmul_neg'✝¹ : ∀ (n : ℕ) (a : R), zsmul✝¹ (Int.negSucc n) a = -zsmul✝¹ (↑n.succ) a
add_left_neg✝¹ : ∀ (a : R), -a + a = 0
intCast✝¹ : ℤ → R
intCast_ofNat✝¹ : ∀ (n : ℕ), IntCast.intCast ↑n = ↑n
intCast_negSucc✝¹ : ∀ (n : ℕ), IntCast.intCast (Int.negSucc n) = -↑(n + 1)
toAddMonoidWithOne✝ : AddMonoidWithOne R
toNeg✝ : Neg R
toSub✝ : Sub R
sub_eq_add_neg✝ : ∀ (a b : R), a - b = a + -b
zsmul✝ : ℤ → R → R
zsmul_zero'✝ : ∀ (a : R), zsmul✝ 0 a = 0
zsmul_succ'✝ : ∀ (n : ℕ) (a : R), zsmul✝ (Int.ofNat n.succ) a = zsmul✝ (Int.ofNat n) a + a
zsmul_neg'✝ : ∀ (n : ℕ) (a : R), zsmul✝ (Int.negSucc n) a = -zsmul✝ (↑n.succ) a
add_left_neg✝ : ∀ (a : R), -a + a = 0
intCast✝ : ℤ → R
intCast_ofNat✝ : ∀ (n : ℕ), IntCast.intCast ↑n = ↑n
intCast_negSucc✝ : ∀ (n : ℕ), IntCast.intCast (Int.negSucc n) = -↑(n + 1)
h_add : HAdd.hAdd = HAdd.hAdd
h_one : One.one = One.one
this✝¹ : toAddMonoidWithOne = toAddMonoidWithOne
this✝ : AddMonoidWithOne.toNatCast = AddMonoidWithOne.toNatCast
toAddMonoid_eq✝ : AddMonoidWithOne.toAddMonoid = AddMonoidWithOne.toAddMonoid
toNeg_eq✝ : toNeg = toNeg
toSub_eq✝ : toSub = toSub
zsmul_eq✝ : AddGroupWithOne.zsmul = AddGroupWithOne.zsmul
this : IntCast.intCast = IntCast.intCast
⊢ mk sub_eq_add_neg✝¹ zsmul✝¹ zsmul_zero'✝¹ zsmul_succ'✝¹ zsmul_neg'✝¹ add_left_neg✝¹ intCast_ofNat✝¹
      intCast_negSucc✝¹ =
    mk sub_eq_add_neg✝ zsmul✝ zsmul_zero'✝ zsmul_succ'✝ zsmul_neg'✝ add_left_neg✝ intCast_ofNat✝ intCast_negSucc✝
tactic: rcases inst₂ with @⟨⟨⟩⟩
state_before: case mk.mk.mk.mk
R : Type u
toAddMonoidWithOne✝¹ : AddMonoidWithOne R
toNeg✝¹ : Neg R
toSub✝¹ : Sub R
sub_eq_add_neg✝¹ : ∀ (a b : R), a - b = a + -b
zsmul✝¹ : ℤ → R → R
zsmul_zero'✝¹ : ∀ (a : R), zsmul✝¹ 0 a = 0
zsmul_succ'✝¹ : ∀ (n : ℕ) (a : R), zsmul✝¹ (Int.ofNat n.succ) a = zsmul✝¹ (Int.ofNat n) a + a
zsmul_neg'✝¹ : ∀ (n : ℕ) (a : R), zsmul✝¹ (Int.negSucc n) a = -zsmul✝¹ (↑n.succ) a
add_left_neg✝¹ : ∀ (a : R), -a + a = 0
intCast✝¹ : ℤ → R
intCast_ofNat✝¹ : ∀ (n : ℕ), IntCast.intCast ↑n = ↑n
intCast_negSucc✝¹ : ∀ (n : ℕ), IntCast.intCast (Int.negSucc n) = -↑(n + 1)
toAddMonoidWithOne✝ : AddMonoidWithOne R
toNeg✝ : Neg R
toSub✝ : Sub R
sub_eq_add_neg✝ : ∀ (a b : R), a - b = a + -b
zsmul✝ : ℤ → R → R
zsmul_zero'✝ : ∀ (a : R), zsmul✝ 0 a = 0
zsmul_succ'✝ : ∀ (n : ℕ) (a : R), zsmul✝ (Int.ofNat n.succ) a = zsmul✝ (Int.ofNat n) a + a
zsmul_neg'✝ : ∀ (n : ℕ) (a : R), zsmul✝ (Int.negSucc n) a = -zsmul✝ (↑n.succ) a
add_left_neg✝ : ∀ (a : R), -a + a = 0
intCast✝ : ℤ → R
intCast_ofNat✝ : ∀ (n : ℕ), IntCast.intCast ↑n = ↑n
intCast_negSucc✝ : ∀ (n : ℕ), IntCast.intCast (Int.negSucc n) = -↑(n + 1)
h_add : HAdd.hAdd = HAdd.hAdd
h_one : One.one = One.one
this✝¹ : toAddMonoidWithOne = toAddMonoidWithOne
this✝ : AddMonoidWithOne.toNatCast = AddMonoidWithOne.toNatCast
toAddMonoid_eq✝ : AddMonoidWithOne.toAddMonoid = AddMonoidWithOne.toAddMonoid
toNeg_eq✝ : toNeg = toNeg
toSub_eq✝ : toSub = toSub
zsmul_eq✝ : AddGroupWithOne.zsmul = AddGroupWithOne.zsmul
this : IntCast.intCast = IntCast.intCast
⊢ mk sub_eq_add_neg✝¹ zsmul✝¹ zsmul_zero'✝¹ zsmul_succ'✝¹ zsmul_neg'✝¹ add_left_neg✝¹ intCast_ofNat✝¹
      intCast_negSucc✝¹ =
    mk sub_eq_add_neg✝ zsmul✝ zsmul_zero'✝ zsmul_succ'✝ zsmul_neg'✝ add_left_neg✝ intCast_ofNat✝ intCast_negSucc✝
state_after: no goals
tactic: congr