Theorem: matPolyEquiv_coeff_apply_aux_2
File: Mathlib/RingTheory/PolynomialAlgebra.lean

tactic: refine Polynomial.induction_on' p ?_ ?_
state_before: R : Type u_1
A : Type ?u.521163
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
i j : n
p : R[X]
k : ℕ
⊢ coeff (↑matPolyEquiv (stdBasisMatrix i j p)) k = stdBasisMatrix i j (coeff p k)

tactic: intro p q hp hq
state_before: case refine_1
R : Type u_1
A : Type ?u.521163
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
i j : n
p : R[X]
k : ℕ
⊢ ∀ (p q : R[X]),
    coeff (↑matPolyEquiv (stdBasisMatrix i j p)) k = stdBasisMatrix i j (coeff p k) →
      coeff (↑matPolyEquiv (stdBasisMatrix i j q)) k = stdBasisMatrix i j (coeff q k) →
        coeff (↑matPolyEquiv (stdBasisMatrix i j (p + q))) k = stdBasisMatrix i j (coeff (p + q) k)

tactic: ext
state_before: case refine_1
R : Type u_1
A : Type ?u.521163
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
i j : n
p✝ : R[X]
k : ℕ
p q : R[X]
hp : coeff (↑matPolyEquiv (stdBasisMatrix i j p)) k = stdBasisMatrix i j (coeff p k)
hq : coeff (↑matPolyEquiv (stdBasisMatrix i j q)) k = stdBasisMatrix i j (coeff q k)
⊢ coeff (↑matPolyEquiv (stdBasisMatrix i j (p + q))) k = stdBasisMatrix i j (coeff (p + q) k)

tactic: simp [hp, hq, coeff_add, DMatrix.add_apply, stdBasisMatrix_add]
state_before: case refine_1.a.h
R : Type u_1
A : Type ?u.521163
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
i j : n
p✝ : R[X]
k : ℕ
p q : R[X]
hp : coeff (↑matPolyEquiv (stdBasisMatrix i j p)) k = stdBasisMatrix i j (coeff p k)
hq : coeff (↑matPolyEquiv (stdBasisMatrix i j q)) k = stdBasisMatrix i j (coeff q k)
i✝ x✝ : n
⊢ coeff (↑matPolyEquiv (stdBasisMatrix i j (p + q))) k i✝ x✝ = stdBasisMatrix i j (coeff (p + q) k) i✝ x✝

tactic: intro k x
state_before: case refine_2
R : Type u_1
A : Type ?u.521163
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
i j : n
p : R[X]
k : ℕ
⊢ ∀ (n_1 : ℕ) (a : R),
    coeff (↑matPolyEquiv (stdBasisMatrix i j (↑(monomial n_1) a))) k = stdBasisMatrix i j (coeff (↑(monomial n_1) a) k)

tactic: simp only [matPolyEquiv_coeff_apply_aux_1, coeff_monomial]
state_before: case refine_2
R : Type u_1
A : Type ?u.521163
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
i j : n
p : R[X]
k✝ k : ℕ
x : R
⊢ coeff (↑matPolyEquiv (stdBasisMatrix i j (↑(monomial k) x))) k✝ = stdBasisMatrix i j (coeff (↑(monomial k) x) k✝)

tactic: funext
state_before: case refine_2.inr
R : Type u_1
A : Type ?u.521163
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
i j : n
p : R[X]
k✝ k : ℕ
x : R
h✝ : ¬k = k✝
⊢ 0 = stdBasisMatrix i j 0

tactic: simp
state_before: case refine_2.inr.h.h
R : Type u_1
A : Type ?u.521163
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
i j : n
p : R[X]
k✝ k : ℕ
x : R
h✝ : ¬k = k✝
x✝¹ x✝ : n
⊢ OfNat.ofNat 0 x✝¹ x✝ = stdBasisMatrix i j 0 x✝¹ x✝