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_2
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 : ℕ
⊢ (matPolyEquiv (stdBasisMatrix i j p)).coeff k = stdBasisMatrix i j (p.coeff k)
state_after: case refine_1
R : Type u_1
A : Type u_2
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]),
    (matPolyEquiv (stdBasisMatrix i j p)).coeff k = stdBasisMatrix i j (p.coeff k) →
      (matPolyEquiv (stdBasisMatrix i j q)).coeff k = stdBasisMatrix i j (q.coeff k) →
        (matPolyEquiv (stdBasisMatrix i j (p + q))).coeff k = stdBasisMatrix i j ((p + q).coeff k)

case refine_2
R : Type u_1
A : Type u_2
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),
    (matPolyEquiv (stdBasisMatrix i j ((monomial n_1) a))).coeff k = stdBasisMatrix i j (((monomial n_1) a).coeff k)

tactic: intro p q hp hq
state_before: case refine_1
R : Type u_1
A : Type u_2
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]),
    (matPolyEquiv (stdBasisMatrix i j p)).coeff k = stdBasisMatrix i j (p.coeff k) →
      (matPolyEquiv (stdBasisMatrix i j q)).coeff k = stdBasisMatrix i j (q.coeff k) →
        (matPolyEquiv (stdBasisMatrix i j (p + q))).coeff k = stdBasisMatrix i j ((p + q).coeff k)
state_after: case refine_1
R : Type u_1
A : Type u_2
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 : (matPolyEquiv (stdBasisMatrix i j p)).coeff k = stdBasisMatrix i j (p.coeff k)
hq : (matPolyEquiv (stdBasisMatrix i j q)).coeff k = stdBasisMatrix i j (q.coeff k)
⊢ (matPolyEquiv (stdBasisMatrix i j (p + q))).coeff k = stdBasisMatrix i j ((p + q).coeff k)

tactic: ext
state_before: case refine_1
R : Type u_1
A : Type u_2
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 : (matPolyEquiv (stdBasisMatrix i j p)).coeff k = stdBasisMatrix i j (p.coeff k)
hq : (matPolyEquiv (stdBasisMatrix i j q)).coeff k = stdBasisMatrix i j (q.coeff k)
⊢ (matPolyEquiv (stdBasisMatrix i j (p + q))).coeff k = stdBasisMatrix i j ((p + q).coeff k)
state_after: case refine_1.a
R : Type u_1
A : Type u_2
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 : (matPolyEquiv (stdBasisMatrix i j p)).coeff k = stdBasisMatrix i j (p.coeff k)
hq : (matPolyEquiv (stdBasisMatrix i j q)).coeff k = stdBasisMatrix i j (q.coeff k)
i✝ j✝ : n
⊢ (matPolyEquiv (stdBasisMatrix i j (p + q))).coeff k i✝ j✝ = stdBasisMatrix i j ((p + q).coeff k) i✝ j✝

tactic: simp [hp, hq, coeff_add, DMatrix.add_apply, stdBasisMatrix_add]
state_before: case refine_1.a
R : Type u_1
A : Type u_2
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 : (matPolyEquiv (stdBasisMatrix i j p)).coeff k = stdBasisMatrix i j (p.coeff k)
hq : (matPolyEquiv (stdBasisMatrix i j q)).coeff k = stdBasisMatrix i j (q.coeff k)
i✝ j✝ : n
⊢ (matPolyEquiv (stdBasisMatrix i j (p + q))).coeff k i✝ j✝ = stdBasisMatrix i j ((p + q).coeff k) i✝ j✝
state_after: no goals

tactic: intro k x
state_before: case refine_2
R : Type u_1
A : Type u_2
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),
    (matPolyEquiv (stdBasisMatrix i j ((monomial n_1) a))).coeff k = stdBasisMatrix i j (((monomial n_1) a).coeff k)
state_after: case refine_2
R : Type u_1
A : Type u_2
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
⊢ (matPolyEquiv (stdBasisMatrix i j ((monomial k) x))).coeff k✝ = stdBasisMatrix i j (((monomial k) x).coeff k✝)

tactic: simp only [matPolyEquiv_coeff_apply_aux_1, coeff_monomial]
state_before: case refine_2
R : Type u_1
A : Type u_2
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
⊢ (matPolyEquiv (stdBasisMatrix i j ((monomial k) x))).coeff k✝ = stdBasisMatrix i j (((monomial k) x).coeff k✝)
state_after: case refine_2
R : Type u_1
A : Type u_2
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
⊢ (if k = k✝ then stdBasisMatrix i j x else 0) = stdBasisMatrix i j (if k = k✝ then x else 0)

tactic: funext
state_before: case neg
R : Type u_1
A : Type u_2
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
state_after: case neg.h.h
R : Type u_1
A : Type u_2
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
⊢ 0 x✝¹ x✝ = stdBasisMatrix i j 0 x✝¹ x✝

tactic: simp
state_before: case neg.h.h
R : Type u_1
A : Type u_2
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
⊢ 0 x✝¹ x✝ = stdBasisMatrix i j 0 x✝¹ x✝
state_after: no goals