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

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
⊢ 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₁.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
⊢ 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₁.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
⊢ 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: cases inst₁
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: congr <;> solve| injection h₁ | injection h₂ | injection h₃
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: ext : 1 <;> assumption
state_before: R : Type u
inst₁ inst₂ : Semiring R
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
⊢ toNonUnitalSemiring = toNonUnitalSemiring
state_after: no goals

tactic: 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
⊢ toNonAssocSemiring = toNonAssocSemiring
state_after: no goals

tactic: ext : 1
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
⊢ MonoidWithZero.toMonoid = MonoidWithZero.toMonoid
state_after: case h_mul
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
⊢ HMul.hMul = HMul.hMul

tactic: exact h_mul
state_before: case h_mul
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
⊢ HMul.hMul = HMul.hMul
state_after: no goals

tactic: injection h₂
state_before: case mk.mk.e_npow
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
⊢ npow✝¹ = npow✝
state_after: case mk.mk.e_npow
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₃ : MonoidWithZero.toMonoid = MonoidWithZero.toMonoid
toNonUnitalNonAssocSemiring_eq✝ :
  NonUnitalSemiring.toNonUnitalNonAssocSemiring = NonUnitalSemiring.toNonUnitalNonAssocSemiring
toOne_eq✝ : toOne = toOne
toNatCast_eq✝ : toNatCast = toNatCast
⊢ npow✝¹ = npow✝

tactic: injection h₃
state_before: case mk.mk.e_npow
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
⊢ npow✝¹ = npow✝
state_after: no goals