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

Proof steps:
state_before: R : Type u
inst₁ inst₂ : Semiring R
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
⊢ inst₁ = inst₂
state_after: R : Type u
inst₁ inst₂ : Semiring R
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
h₁ : toNonUnitalSemiring = toNonUnitalSemiring
⊢ inst₁ = inst₂
tactic: have h₁ : inst₁.toNonUnitalSemiring = inst₂.toNonUnitalSemiring := by
    ext : 1 <;> assumption
state_before: R : Type u
inst₁ inst₂ : Semiring R
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
h₁ : toNonUnitalSemiring = toNonUnitalSemiring
⊢ inst₁ = inst₂
state_after: R : Type u
inst₁ inst₂ : Semiring R
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
h₁ : toNonUnitalSemiring = toNonUnitalSemiring
h₂ : toNonAssocSemiring = toNonAssocSemiring
⊢ inst₁ = inst₂
tactic: have h₂ : inst₁.toNonAssocSemiring = inst₂.toNonAssocSemiring := by
    ext : 1 <;> assumption
state_before: R : Type u
inst₁ inst₂ : Semiring R
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
h₁ : toNonUnitalSemiring = toNonUnitalSemiring
h₂ : toNonAssocSemiring = toNonAssocSemiring
⊢ inst₁ = inst₂
state_after: R : Type u
inst₁ inst₂ : Semiring R
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
h₁ : toNonUnitalSemiring = toNonUnitalSemiring
h₂ : toNonAssocSemiring = toNonAssocSemiring
h₃ : MonoidWithZero.toMonoid = MonoidWithZero.toMonoid
⊢ inst₁ = inst₂
tactic: have h₃ : (inst₁.toMonoidWithZero).toMonoid = (inst₂.toMonoidWithZero).toMonoid := by
    ext : 1; exact h_mul
state_before: R : Type u
inst₁ inst₂ : Semiring R
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
h₁ : toNonUnitalSemiring = toNonUnitalSemiring
h₂ : toNonAssocSemiring = toNonAssocSemiring
h₃ : MonoidWithZero.toMonoid = MonoidWithZero.toMonoid
⊢ inst₁ = inst₂
state_after: case mk
R : Type u
inst₂ : Semiring R
toNonUnitalSemiring✝ : NonUnitalSemiring R
toOne✝ : One R
one_mul✝ : ∀ (a : R), 1 * a = a
mul_one✝ : ∀ (a : R), a * 1 = a
toNatCast✝ : NatCast R
natCast_zero✝ : NatCast.natCast 0 = 0
natCast_succ✝ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
npow✝ : ℕ → R → R
npow_zero✝ : ∀ (x : R), npow✝ 0 x = 1
npow_succ✝ : ∀ (n : ℕ) (x : R), npow✝ (n + 1) x = npow✝ n x * x
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
h₁ : toNonUnitalSemiring = toNonUnitalSemiring
h₂ : toNonAssocSemiring = toNonAssocSemiring
h₃ : MonoidWithZero.toMonoid = MonoidWithZero.toMonoid
⊢ mk one_mul✝ mul_one✝ natCast_zero✝ natCast_succ✝ npow✝ npow_zero✝ npow_succ✝ = inst₂
tactic: cases inst₁
state_before: case mk
R : Type u
inst₂ : Semiring R
toNonUnitalSemiring✝ : NonUnitalSemiring R
toOne✝ : One R
one_mul✝ : ∀ (a : R), 1 * a = a
mul_one✝ : ∀ (a : R), a * 1 = a
toNatCast✝ : NatCast R
natCast_zero✝ : NatCast.natCast 0 = 0
natCast_succ✝ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
npow✝ : ℕ → R → R
npow_zero✝ : ∀ (x : R), npow✝ 0 x = 1
npow_succ✝ : ∀ (n : ℕ) (x : R), npow✝ (n + 1) x = npow✝ n x * x
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
h₁ : toNonUnitalSemiring = toNonUnitalSemiring
h₂ : toNonAssocSemiring = toNonAssocSemiring
h₃ : MonoidWithZero.toMonoid = MonoidWithZero.toMonoid
⊢ mk one_mul✝ mul_one✝ natCast_zero✝ natCast_succ✝ npow✝ npow_zero✝ npow_succ✝ = inst₂
state_after: case mk.mk
R : Type u
toNonUnitalSemiring✝¹ : NonUnitalSemiring R
toOne✝¹ : One R
one_mul✝¹ : ∀ (a : R), 1 * a = a
mul_one✝¹ : ∀ (a : R), a * 1 = a
toNatCast✝¹ : NatCast R
natCast_zero✝¹ : NatCast.natCast 0 = 0
natCast_succ✝¹ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
npow✝¹ : ℕ → R → R
npow_zero✝¹ : ∀ (x : R), npow✝¹ 0 x = 1
npow_succ✝¹ : ∀ (n : ℕ) (x : R), npow✝¹ (n + 1) x = npow✝¹ n x * x
toNonUnitalSemiring✝ : NonUnitalSemiring R
toOne✝ : One R
one_mul✝ : ∀ (a : R), 1 * a = a
mul_one✝ : ∀ (a : R), a * 1 = a
toNatCast✝ : NatCast R
natCast_zero✝ : NatCast.natCast 0 = 0
natCast_succ✝ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
npow✝ : ℕ → R → R
npow_zero✝ : ∀ (x : R), npow✝ 0 x = 1
npow_succ✝ : ∀ (n : ℕ) (x : R), npow✝ (n + 1) x = npow✝ n x * x
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
h₁ : toNonUnitalSemiring = toNonUnitalSemiring
h₂ : toNonAssocSemiring = toNonAssocSemiring
h₃ : MonoidWithZero.toMonoid = MonoidWithZero.toMonoid
⊢ mk one_mul✝¹ mul_one✝¹ natCast_zero✝¹ natCast_succ✝¹ npow✝¹ npow_zero✝¹ npow_succ✝¹ =
    mk one_mul✝ mul_one✝ natCast_zero✝ natCast_succ✝ npow✝ npow_zero✝ npow_succ✝
tactic: cases inst₂
state_before: case mk.mk
R : Type u
toNonUnitalSemiring✝¹ : NonUnitalSemiring R
toOne✝¹ : One R
one_mul✝¹ : ∀ (a : R), 1 * a = a
mul_one✝¹ : ∀ (a : R), a * 1 = a
toNatCast✝¹ : NatCast R
natCast_zero✝¹ : NatCast.natCast 0 = 0
natCast_succ✝¹ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
npow✝¹ : ℕ → R → R
npow_zero✝¹ : ∀ (x : R), npow✝¹ 0 x = 1
npow_succ✝¹ : ∀ (n : ℕ) (x : R), npow✝¹ (n + 1) x = npow✝¹ n x * x
toNonUnitalSemiring✝ : NonUnitalSemiring R
toOne✝ : One R
one_mul✝ : ∀ (a : R), 1 * a = a
mul_one✝ : ∀ (a : R), a * 1 = a
toNatCast✝ : NatCast R
natCast_zero✝ : NatCast.natCast 0 = 0
natCast_succ✝ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
npow✝ : ℕ → R → R
npow_zero✝ : ∀ (x : R), npow✝ 0 x = 1
npow_succ✝ : ∀ (n : ℕ) (x : R), npow✝ (n + 1) x = npow✝ n x * x
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
h₁ : toNonUnitalSemiring = toNonUnitalSemiring
h₂ : toNonAssocSemiring = toNonAssocSemiring
h₃ : MonoidWithZero.toMonoid = MonoidWithZero.toMonoid
⊢ mk one_mul✝¹ mul_one✝¹ natCast_zero✝¹ natCast_succ✝¹ npow✝¹ npow_zero✝¹ npow_succ✝¹ =
    mk one_mul✝ mul_one✝ natCast_zero✝ natCast_succ✝ npow✝ npow_zero✝ npow_succ✝
state_after: no goals
tactic: congr <;> solve| injection h₁ | injection h₂ | injection h₃