[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a : A
p : R[X]
⊢ ↑(↑(toFunBilinear R A) a) p = sum p fun n r => ↑(monomial n) (a * ↑(algebraMap R A) r)
[PROOFSTEP]
simp only [toFunBilinear_apply_apply, aeval_def, eval₂_eq_sum, Polynomial.sum, Finset.smul_sum]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a : A
p : R[X]
⊢ (Finset.sum (support p) fun x => a • (↑(algebraMap R A[X]) (coeff p x) * X ^ x)) =
    Finset.sum (support p) fun x => ↑(monomial x) (a * ↑(algebraMap R A) (coeff p x))
[PROOFSTEP]
congr with i : 1
[GOAL]
case e_f.h
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a : A
p : R[X]
i : ℕ
⊢ a • (↑(algebraMap R A[X]) (coeff p i) * X ^ i) = ↑(monomial i) (a * ↑(algebraMap R A) (coeff p i))
[PROOFSTEP]
rw [← Algebra.smul_def, ← C_mul', mul_smul_comm, C_mul_X_pow_eq_monomial, ← Algebra.commutes, ← Algebra.smul_def,
  smul_monomial]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p : R[X]
k : ℕ
h : Decidable ¬coeff p k = 0
a : A
⊢ (if ¬coeff p k = 0 then a * ↑(algebraMap R A) (coeff p k) else 0) = a * ↑(algebraMap R A) (coeff p k)
[PROOFSTEP]
classical split_ifs <;> simp [*]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p : R[X]
k : ℕ
h : Decidable ¬coeff p k = 0
a : A
⊢ (if ¬coeff p k = 0 then a * ↑(algebraMap R A) (coeff p k) else 0) = a * ↑(algebraMap R A) (coeff p k)
[PROOFSTEP]
split_ifs
[GOAL]
case pos
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p : R[X]
k : ℕ
h : Decidable ¬coeff p k = 0
a : A
h✝ : coeff p k = 0
⊢ 0 = a * ↑(algebraMap R A) (coeff p k)
[PROOFSTEP]
simp [*]
[GOAL]
case neg
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p : R[X]
k : ℕ
h : Decidable ¬coeff p k = 0
a : A
h✝ : ¬coeff p k = 0
⊢ a * ↑(algebraMap R A) (coeff p k) = a * ↑(algebraMap R A) (coeff p k)
[PROOFSTEP]
simp [*]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
k : ℕ
a₁ a₂ : A
p₁ p₂ : R[X]
⊢ a₁ * a₂ * ↑(algebraMap R A) (coeff (p₁ * p₂) k) =
    Finset.sum (Finset.Nat.antidiagonal k) fun x =>
      a₁ * ↑(algebraMap R A) (coeff p₁ x.fst) * (a₂ * ↑(algebraMap R A) (coeff p₂ x.snd))
[PROOFSTEP]
simp_rw [mul_assoc, Algebra.commutes, ← Finset.mul_sum, mul_assoc, ← Finset.mul_sum]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
k : ℕ
a₁ a₂ : A
p₁ p₂ : R[X]
⊢ a₁ * (a₂ * ↑(algebraMap R A) (coeff (p₁ * p₂) k)) =
    a₁ *
      (a₂ *
        Finset.sum (Finset.Nat.antidiagonal k) fun x =>
          ↑(algebraMap R A) (coeff p₂ x.snd) * ↑(algebraMap R A) (coeff p₁ x.fst))
[PROOFSTEP]
congr
[GOAL]
case e_a.e_a
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
k : ℕ
a₁ a₂ : A
p₁ p₂ : R[X]
⊢ ↑(algebraMap R A) (coeff (p₁ * p₂) k) =
    Finset.sum (Finset.Nat.antidiagonal k) fun x =>
      ↑(algebraMap R A) (coeff p₂ x.snd) * ↑(algebraMap R A) (coeff p₁ x.fst)
[PROOFSTEP]
simp_rw [Algebra.commutes (coeff p₂ _), coeff_mul, map_sum, RingHom.map_mul]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a₁ a₂ : A
p₁ p₂ : R[X]
⊢ ↑(toFunLinear R A) ((a₁ * a₂) ⊗ₜ[R] (p₁ * p₂)) = ↑(toFunLinear R A) (a₁ ⊗ₜ[R] p₁) * ↑(toFunLinear R A) (a₂ ⊗ₜ[R] p₂)
[PROOFSTEP]
classical
simp only [toFunLinear_tmul_apply, toFunBilinear_apply_eq_sum]
ext k
simp_rw [coeff_sum, coeff_monomial, sum_def, Finset.sum_ite_eq', mem_support_iff, Ne.def]
conv_rhs => rw [coeff_mul]
simp_rw [finset_sum_coeff, coeff_monomial, Finset.sum_ite_eq', mem_support_iff, Ne.def, mul_ite, mul_zero, ite_mul,
  zero_mul]
simp_rw [ite_mul_zero_left (¬coeff p₁ _ = 0) (a₁ * (algebraMap R A) (coeff p₁ _))]
simp_rw [ite_mul_zero_right (¬coeff p₂ _ = 0) _ (_ * _)]
simp_rw [toFunLinear_mul_tmul_mul_aux_1, toFunLinear_mul_tmul_mul_aux_2]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a₁ a₂ : A
p₁ p₂ : R[X]
⊢ ↑(toFunLinear R A) ((a₁ * a₂) ⊗ₜ[R] (p₁ * p₂)) = ↑(toFunLinear R A) (a₁ ⊗ₜ[R] p₁) * ↑(toFunLinear R A) (a₂ ⊗ₜ[R] p₂)
[PROOFSTEP]
simp only [toFunLinear_tmul_apply, toFunBilinear_apply_eq_sum]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a₁ a₂ : A
p₁ p₂ : R[X]
⊢ (sum (p₁ * p₂) fun n r => ↑(monomial n) (a₁ * a₂ * ↑(algebraMap R A) r)) =
    (sum p₁ fun n r => ↑(monomial n) (a₁ * ↑(algebraMap R A) r)) *
      sum p₂ fun n r => ↑(monomial n) (a₂ * ↑(algebraMap R A) r)
[PROOFSTEP]
ext k
[GOAL]
case a
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a₁ a₂ : A
p₁ p₂ : R[X]
k : ℕ
⊢ coeff (sum (p₁ * p₂) fun n r => ↑(monomial n) (a₁ * a₂ * ↑(algebraMap R A) r)) k =
    coeff
      ((sum p₁ fun n r => ↑(monomial n) (a₁ * ↑(algebraMap R A) r)) *
        sum p₂ fun n r => ↑(monomial n) (a₂ * ↑(algebraMap R A) r))
      k
[PROOFSTEP]
simp_rw [coeff_sum, coeff_monomial, sum_def, Finset.sum_ite_eq', mem_support_iff, Ne.def]
[GOAL]
case a
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a₁ a₂ : A
p₁ p₂ : R[X]
k : ℕ
⊢ (if ¬coeff (p₁ * p₂) k = 0 then a₁ * a₂ * ↑(algebraMap R A) (coeff (p₁ * p₂) k) else 0) =
    coeff
      ((Finset.sum (support p₁) fun n => ↑(monomial n) (a₁ * ↑(algebraMap R A) (coeff p₁ n))) *
        Finset.sum (support p₂) fun n => ↑(monomial n) (a₂ * ↑(algebraMap R A) (coeff p₂ n)))
      k
[PROOFSTEP]
conv_rhs => rw [coeff_mul]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a₁ a₂ : A
p₁ p₂ : R[X]
k : ℕ
| coeff
    ((Finset.sum (support p₁) fun n => ↑(monomial n) (a₁ * ↑(algebraMap R A) (coeff p₁ n))) *
      Finset.sum (support p₂) fun n => ↑(monomial n) (a₂ * ↑(algebraMap R A) (coeff p₂ n)))
    k
[PROOFSTEP]
rw [coeff_mul]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a₁ a₂ : A
p₁ p₂ : R[X]
k : ℕ
| coeff
    ((Finset.sum (support p₁) fun n => ↑(monomial n) (a₁ * ↑(algebraMap R A) (coeff p₁ n))) *
      Finset.sum (support p₂) fun n => ↑(monomial n) (a₂ * ↑(algebraMap R A) (coeff p₂ n)))
    k
[PROOFSTEP]
rw [coeff_mul]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a₁ a₂ : A
p₁ p₂ : R[X]
k : ℕ
| coeff
    ((Finset.sum (support p₁) fun n => ↑(monomial n) (a₁ * ↑(algebraMap R A) (coeff p₁ n))) *
      Finset.sum (support p₂) fun n => ↑(monomial n) (a₂ * ↑(algebraMap R A) (coeff p₂ n)))
    k
[PROOFSTEP]
rw [coeff_mul]
[GOAL]
case a
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a₁ a₂ : A
p₁ p₂ : R[X]
k : ℕ
⊢ (if ¬coeff (p₁ * p₂) k = 0 then a₁ * a₂ * ↑(algebraMap R A) (coeff (p₁ * p₂) k) else 0) =
    Finset.sum (Finset.Nat.antidiagonal k) fun x =>
      coeff (Finset.sum (support p₁) fun n => ↑(monomial n) (a₁ * ↑(algebraMap R A) (coeff p₁ n))) x.fst *
        coeff (Finset.sum (support p₂) fun n => ↑(monomial n) (a₂ * ↑(algebraMap R A) (coeff p₂ n))) x.snd
[PROOFSTEP]
simp_rw [finset_sum_coeff, coeff_monomial, Finset.sum_ite_eq', mem_support_iff, Ne.def, mul_ite, mul_zero, ite_mul,
  zero_mul]
[GOAL]
case a
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a₁ a₂ : A
p₁ p₂ : R[X]
k : ℕ
⊢ (if ¬coeff (p₁ * p₂) k = 0 then a₁ * a₂ * ↑(algebraMap R A) (coeff (p₁ * p₂) k) else 0) =
    Finset.sum (Finset.Nat.antidiagonal k) fun x =>
      if ¬coeff p₂ x.snd = 0 then
        if ¬coeff p₁ x.fst = 0 then a₁ * ↑(algebraMap R A) (coeff p₁ x.fst) * (a₂ * ↑(algebraMap R A) (coeff p₂ x.snd))
        else 0
      else 0
[PROOFSTEP]
simp_rw [ite_mul_zero_left (¬coeff p₁ _ = 0) (a₁ * (algebraMap R A) (coeff p₁ _))]
[GOAL]
case a
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a₁ a₂ : A
p₁ p₂ : R[X]
k : ℕ
⊢ (if ¬coeff (p₁ * p₂) k = 0 then a₁ * a₂ * ↑(algebraMap R A) (coeff (p₁ * p₂) k) else 0) =
    Finset.sum (Finset.Nat.antidiagonal k) fun x =>
      if ¬coeff p₂ x.snd = 0 then
        (if ¬coeff p₁ x.fst = 0 then a₁ * ↑(algebraMap R A) (coeff p₁ x.fst) else 0) *
          (a₂ * ↑(algebraMap R A) (coeff p₂ x.snd))
      else 0
[PROOFSTEP]
simp_rw [ite_mul_zero_right (¬coeff p₂ _ = 0) _ (_ * _)]
[GOAL]
case a
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
a₁ a₂ : A
p₁ p₂ : R[X]
k : ℕ
⊢ (if ¬coeff (p₁ * p₂) k = 0 then a₁ * a₂ * ↑(algebraMap R A) (coeff (p₁ * p₂) k) else 0) =
    Finset.sum (Finset.Nat.antidiagonal k) fun x =>
      (if ¬coeff p₁ x.fst = 0 then a₁ * ↑(algebraMap R A) (coeff p₁ x.fst) else 0) *
        if ¬coeff p₂ x.snd = 0 then a₂ * ↑(algebraMap R A) (coeff p₂ x.snd) else 0
[PROOFSTEP]
simp_rw [toFunLinear_mul_tmul_mul_aux_1, toFunLinear_mul_tmul_mul_aux_2]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
r : R
⊢ ↑(toFunLinear R A) (↑(algebraMap R A) r ⊗ₜ[R] 1) = ↑(algebraMap R A[X]) r
[PROOFSTEP]
rw [toFunLinear_tmul_apply, toFunBilinear_apply_apply, Polynomial.aeval_one, algebraMap_smul,
  Algebra.algebraMap_eq_smul_one, Algebra.algebraMap_eq_smul_one]
  -- porting note: had to
    -- add extra `Algebra.algebraMap_eq_smul_one`
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p q : A[X]
⊢ invFun R A (p + q) = invFun R A p + invFun R A q
[PROOFSTEP]
simp only [invFun, eval₂_add]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
⊢ invFun R A (↑(toFunAlgHom R A) x) = x
[PROOFSTEP]
refine TensorProduct.induction_on x ?_ ?_ ?_
[GOAL]
case refine_1
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
⊢ invFun R A (↑(toFunAlgHom R A) 0) = 0
[PROOFSTEP]
simp [invFun]
[GOAL]
case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
⊢ ∀ (x : A) (y : R[X]), invFun R A (↑(toFunAlgHom R A) (x ⊗ₜ[R] y)) = x ⊗ₜ[R] y
[PROOFSTEP]
intro a p
[GOAL]
case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
⊢ invFun R A (↑(toFunAlgHom R A) (a ⊗ₜ[R] p)) = a ⊗ₜ[R] p
[PROOFSTEP]
dsimp only [invFun]
[GOAL]
case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
⊢ eval₂ (↑includeLeft) (1 ⊗ₜ[R] X) (↑(toFunAlgHom R A) (a ⊗ₜ[R] p)) = a ⊗ₜ[R] p
[PROOFSTEP]
rw [toFunAlgHom_apply_tmul, eval₂_sum]
[GOAL]
case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
⊢ (sum p fun n a_1 => eval₂ (↑includeLeft) (1 ⊗ₜ[R] X) (↑(monomial n) (a * ↑(algebraMap R A) a_1))) = a ⊗ₜ[R] p
[PROOFSTEP]
simp_rw [eval₂_monomial, AlgHom.coe_toRingHom, Algebra.TensorProduct.tmul_pow, one_pow,
  Algebra.TensorProduct.includeLeft_apply, Algebra.TensorProduct.tmul_mul_tmul, mul_one, one_mul, ← Algebra.commutes, ←
  Algebra.smul_def, smul_tmul, sum_def, ← tmul_sum]
[GOAL]
case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
⊢ (a ⊗ₜ[R] Finset.sum (support p) fun a => coeff p a • X ^ a) = a ⊗ₜ[R] p
[PROOFSTEP]
conv_rhs => rw [← sum_C_mul_X_pow_eq p]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
| a ⊗ₜ[R] p
[PROOFSTEP]
rw [← sum_C_mul_X_pow_eq p]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
| a ⊗ₜ[R] p
[PROOFSTEP]
rw [← sum_C_mul_X_pow_eq p]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
| a ⊗ₜ[R] p
[PROOFSTEP]
rw [← sum_C_mul_X_pow_eq p]
[GOAL]
case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
⊢ (a ⊗ₜ[R] Finset.sum (support p) fun a => coeff p a • X ^ a) = a ⊗ₜ[R] sum p fun n a => ↑C a * X ^ n
[PROOFSTEP]
simp only [Algebra.smul_def]
[GOAL]
case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
a : A
p : R[X]
⊢ (a ⊗ₜ[R] Finset.sum (support p) fun x => ↑(algebraMap R R[X]) (coeff p x) * X ^ x) =
    a ⊗ₜ[R] sum p fun n a => ↑C a * X ^ n
[PROOFSTEP]
rfl
[GOAL]
case refine_3
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A ⊗[R] R[X]
⊢ ∀ (x y : A ⊗[R] R[X]),
    invFun R A (↑(toFunAlgHom R A) x) = x →
      invFun R A (↑(toFunAlgHom R A) y) = y → invFun R A (↑(toFunAlgHom R A) (x + y)) = x + y
[PROOFSTEP]
intro p q hp hq
[GOAL]
case refine_3
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x p q : A ⊗[R] R[X]
hp : invFun R A (↑(toFunAlgHom R A) p) = p
hq : invFun R A (↑(toFunAlgHom R A) q) = q
⊢ invFun R A (↑(toFunAlgHom R A) (p + q)) = p + q
[PROOFSTEP]
simp only [AlgHom.map_add, invFun_add, hp, hq]
[GOAL]
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A[X]
⊢ ↑(toFunAlgHom R A) (invFun R A x) = x
[PROOFSTEP]
refine Polynomial.induction_on' x ?_ ?_
[GOAL]
case refine_1
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A[X]
⊢ ∀ (p q : A[X]),
    ↑(toFunAlgHom R A) (invFun R A p) = p →
      ↑(toFunAlgHom R A) (invFun R A q) = q → ↑(toFunAlgHom R A) (invFun R A (p + q)) = p + q
[PROOFSTEP]
intro p q hp hq
[GOAL]
case refine_1
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x p q : A[X]
hp : ↑(toFunAlgHom R A) (invFun R A p) = p
hq : ↑(toFunAlgHom R A) (invFun R A q) = q
⊢ ↑(toFunAlgHom R A) (invFun R A (p + q)) = p + q
[PROOFSTEP]
simp only [invFun_add, AlgHom.map_add, hp, hq]
[GOAL]
case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A[X]
⊢ ∀ (n : ℕ) (a : A), ↑(toFunAlgHom R A) (invFun R A (↑(monomial n) a)) = ↑(monomial n) a
[PROOFSTEP]
intro n a
[GOAL]
case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A[X]
n : ℕ
a : A
⊢ ↑(toFunAlgHom R A) (invFun R A (↑(monomial n) a)) = ↑(monomial n) a
[PROOFSTEP]
rw [invFun_monomial, Algebra.TensorProduct.tmul_pow, one_pow, Algebra.TensorProduct.tmul_mul_tmul, mul_one, one_mul,
  toFunAlgHom_apply_tmul, X_pow_eq_monomial, sum_monomial_index]
[GOAL]
case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A[X]
n : ℕ
a : A
⊢ ↑(monomial n) (a * ↑(algebraMap R A) 1) = ↑(monomial n) a
[PROOFSTEP]
simp
[GOAL]
case refine_2.hf
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A[X]
n : ℕ
a : A
⊢ ↑(monomial n) (a * ↑(algebraMap R A) 0) = 0
[PROOFSTEP]
simp
[GOAL]
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
k : ℕ
x : R
⊢ ↑matPolyEquiv (stdBasisMatrix i j (↑(monomial k) x)) = ↑(monomial k) (stdBasisMatrix i j x)
[PROOFSTEP]
simp only [matPolyEquiv, AlgEquiv.trans_apply, matrixEquivTensor_apply_std_basis]
[GOAL]
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
k : ℕ
x : R
⊢ ↑(AlgEquiv.symm (polyEquivTensor R (Matrix n n R)))
      (↑(Algebra.TensorProduct.comm R R[X] (Matrix n n R)) (↑(monomial k) x ⊗ₜ[R] stdBasisMatrix i j 1)) =
    ↑(monomial k) (stdBasisMatrix i j x)
[PROOFSTEP]
apply (polyEquivTensor R (Matrix n n R)).injective
[GOAL]
case 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
k : ℕ
x : R
⊢ ↑(polyEquivTensor R (Matrix n n R))
      (↑(AlgEquiv.symm (polyEquivTensor R (Matrix n n R)))
        (↑(Algebra.TensorProduct.comm R R[X] (Matrix n n R)) (↑(monomial k) x ⊗ₜ[R] stdBasisMatrix i j 1))) =
    ↑(polyEquivTensor R (Matrix n n R)) (↑(monomial k) (stdBasisMatrix i j x))
[PROOFSTEP]
simp only [AlgEquiv.apply_symm_apply, Algebra.TensorProduct.comm_tmul, polyEquivTensor_apply, eval₂_monomial]
[GOAL]
case 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
k : ℕ
x : R
⊢ stdBasisMatrix i j 1 ⊗ₜ[R] ↑(monomial k) x = ↑↑includeLeft (stdBasisMatrix i j x) * 1 ⊗ₜ[R] X ^ k
[PROOFSTEP]
simp only [Algebra.TensorProduct.tmul_mul_tmul, one_pow, one_mul, Matrix.mul_one, Algebra.TensorProduct.tmul_pow,
  Algebra.TensorProduct.includeLeft_apply]
[GOAL]
case 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
k : ℕ
x : R
⊢ stdBasisMatrix i j 1 ⊗ₜ[R] ↑(monomial k) x = ↑↑includeLeft (stdBasisMatrix i j x) * 1 ⊗ₜ[R] (X ^ k)
[PROOFSTEP]
rw [← smul_X_eq_monomial, ← TensorProduct.smul_tmul]
[GOAL]
case 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
k : ℕ
x : R
⊢ (x • stdBasisMatrix i j 1) ⊗ₜ[R] (X ^ k) = ↑↑includeLeft (stdBasisMatrix i j x) * 1 ⊗ₜ[R] (X ^ k)
[PROOFSTEP]
congr with i'
[GOAL]
case a.e_m.a.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
k : ℕ
x : R
i' x✝ : n
⊢ (x • stdBasisMatrix i j 1) i' x✝ = ↑(LinearMap.mulLeft R (stdBasisMatrix i j x, 1).fst) (1, X ^ k).fst i' x✝
[PROOFSTEP]
simp [stdBasisMatrix]
[GOAL]
case a.e_n.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
k : ℕ
x : R
i' : ℕ
⊢ coeff (X ^ k) i' = coeff (↑(LinearMap.mulLeft R (stdBasisMatrix i j x, 1).snd) (1, X ^ k).snd) i'
[PROOFSTEP]
simp [stdBasisMatrix]
[GOAL]
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 : ℕ
⊢ coeff (↑matPolyEquiv (stdBasisMatrix i j p)) k = stdBasisMatrix i j (coeff p k)
[PROOFSTEP]
refine Polynomial.induction_on' p ?_ ?_
[GOAL]
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]),
    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)
[PROOFSTEP]
intro p q hp hq
[GOAL]
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 : 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)
[PROOFSTEP]
ext
[GOAL]
case refine_1.a.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 : ℕ
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✝
[PROOFSTEP]
simp [hp, hq, coeff_add, DMatrix.add_apply, stdBasisMatrix_add]
[GOAL]
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),
    coeff (↑matPolyEquiv (stdBasisMatrix i j (↑(monomial n_1) a))) k = stdBasisMatrix i j (coeff (↑(monomial n_1) a) k)
[PROOFSTEP]
intro k x
[GOAL]
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
⊢ coeff (↑matPolyEquiv (stdBasisMatrix i j (↑(monomial k) x))) k✝ = stdBasisMatrix i j (coeff (↑(monomial k) x) k✝)
[PROOFSTEP]
simp only [matPolyEquiv_coeff_apply_aux_1, coeff_monomial]
[GOAL]
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)
[PROOFSTEP]
split_ifs
[GOAL]
case pos
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✝
⊢ stdBasisMatrix i j x = stdBasisMatrix i j x
[PROOFSTEP]
funext
[GOAL]
case pos.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
⊢ stdBasisMatrix i j x x✝¹ x✝ = stdBasisMatrix i j x x✝¹ x✝
[PROOFSTEP]
simp
[GOAL]
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
[PROOFSTEP]
funext
[GOAL]
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
⊢ OfNat.ofNat 0 x✝¹ x✝ = stdBasisMatrix i j 0 x✝¹ x✝
[PROOFSTEP]
simp
[GOAL]
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
m : Matrix n n R[X]
k : ℕ
i j : n
⊢ coeff (↑matPolyEquiv m) k i j = coeff (m i j) k
[PROOFSTEP]
refine Matrix.induction_on' m ?_ ?_ ?_
[GOAL]
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
m : Matrix n n R[X]
k : ℕ
i j : n
⊢ coeff (↑matPolyEquiv 0) k i j = coeff (OfNat.ofNat 0 i j) k
[PROOFSTEP]
simp
[GOAL]
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
m : Matrix n n R[X]
k : ℕ
i j : n
⊢ ∀ (p q : Matrix n n R[X]),
    coeff (↑matPolyEquiv p) k i j = coeff (p i j) k →
      coeff (↑matPolyEquiv q) k i j = coeff (q i j) k → coeff (↑matPolyEquiv (p + q)) k i j = coeff ((p + q) i j) k
[PROOFSTEP]
intro p q hp hq
[GOAL]
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
m : Matrix n n R[X]
k : ℕ
i j : n
p q : Matrix n n R[X]
hp : coeff (↑matPolyEquiv p) k i j = coeff (p i j) k
hq : coeff (↑matPolyEquiv q) k i j = coeff (q i j) k
⊢ coeff (↑matPolyEquiv (p + q)) k i j = coeff ((p + q) i j) k
[PROOFSTEP]
simp [hp, hq]
[GOAL]
case refine_3
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
m : Matrix n n R[X]
k : ℕ
i j : n
⊢ ∀ (i_1 j_1 : n) (x : R[X]),
    coeff (↑matPolyEquiv (stdBasisMatrix i_1 j_1 x)) k i j = coeff (stdBasisMatrix i_1 j_1 x i j) k
[PROOFSTEP]
intro i' j' x
[GOAL]
case refine_3
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
m : Matrix n n R[X]
k : ℕ
i j i' j' : n
x : R[X]
⊢ coeff (↑matPolyEquiv (stdBasisMatrix i' j' x)) k i j = coeff (stdBasisMatrix i' j' x i j) k
[PROOFSTEP]
erw [matPolyEquiv_coeff_apply_aux_2]
[GOAL]
case refine_3
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
m : Matrix n n R[X]
k : ℕ
i j i' j' : n
x : R[X]
⊢ stdBasisMatrix i' j' (coeff x k) i j = coeff (stdBasisMatrix i' j' x i j) k
[PROOFSTEP]
dsimp [stdBasisMatrix]
[GOAL]
case refine_3
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
m : Matrix n n R[X]
k : ℕ
i j i' j' : n
x : R[X]
⊢ (if i' = i ∧ j' = j then coeff x k else 0) = coeff (if i' = i ∧ j' = j then x else 0) k
[PROOFSTEP]
split_ifs
[GOAL]
case pos
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
m : Matrix n n R[X]
k : ℕ
i j i' j' : n
x : R[X]
h✝ : i' = i ∧ j' = j
⊢ coeff x k = coeff x k
[PROOFSTEP]
rename_i h
[GOAL]
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
m : Matrix n n R[X]
k : ℕ
i j i' j' : n
x : R[X]
h✝ : ¬(i' = i ∧ j' = j)
⊢ 0 = coeff 0 k
[PROOFSTEP]
rename_i h
[GOAL]
case pos
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
m : Matrix n n R[X]
k : ℕ
i j i' j' : n
x : R[X]
h : i' = i ∧ j' = j
⊢ coeff x k = coeff x k
[PROOFSTEP]
rcases h with ⟨rfl, rfl⟩
[GOAL]
case pos.intro
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
m : Matrix n n R[X]
k : ℕ
i' j' : n
x : R[X]
⊢ coeff x k = coeff x k
[PROOFSTEP]
simp [stdBasisMatrix]
[GOAL]
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
m : Matrix n n R[X]
k : ℕ
i j i' j' : n
x : R[X]
h : ¬(i' = i ∧ j' = j)
⊢ 0 = coeff 0 k
[PROOFSTEP]
simp [stdBasisMatrix, h]
[GOAL]
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
p : (Matrix n n R)[X]
i j : n
k : ℕ
⊢ coeff (↑(AlgEquiv.symm matPolyEquiv) p i j) k = coeff p k i j
[PROOFSTEP]
have t : p = matPolyEquiv (matPolyEquiv.symm p) := by simp
[GOAL]
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
p : (Matrix n n R)[X]
i j : n
k : ℕ
⊢ p = ↑matPolyEquiv (↑(AlgEquiv.symm matPolyEquiv) p)
[PROOFSTEP]
simp
[GOAL]
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
p : (Matrix n n R)[X]
i j : n
k : ℕ
t : p = ↑matPolyEquiv (↑(AlgEquiv.symm matPolyEquiv) p)
⊢ coeff (↑(AlgEquiv.symm matPolyEquiv) p i j) k = coeff p k i j
[PROOFSTEP]
conv_rhs => rw [t]
[GOAL]
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
p : (Matrix n n R)[X]
i j : n
k : ℕ
t : p = ↑matPolyEquiv (↑(AlgEquiv.symm matPolyEquiv) p)
| coeff p k i j
[PROOFSTEP]
rw [t]
[GOAL]
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
p : (Matrix n n R)[X]
i j : n
k : ℕ
t : p = ↑matPolyEquiv (↑(AlgEquiv.symm matPolyEquiv) p)
| coeff p k i j
[PROOFSTEP]
rw [t]
[GOAL]
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
p : (Matrix n n R)[X]
i j : n
k : ℕ
t : p = ↑matPolyEquiv (↑(AlgEquiv.symm matPolyEquiv) p)
| coeff p k i j
[PROOFSTEP]
rw [t]
[GOAL]
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
p : (Matrix n n R)[X]
i j : n
k : ℕ
t : p = ↑matPolyEquiv (↑(AlgEquiv.symm matPolyEquiv) p)
⊢ coeff (↑(AlgEquiv.symm matPolyEquiv) p i j) k = coeff (↑matPolyEquiv (↑(AlgEquiv.symm matPolyEquiv) p)) k i j
[PROOFSTEP]
simp only [matPolyEquiv_coeff_apply]
[GOAL]
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
p : R[X]
⊢ ↑matPolyEquiv (p • 1) = Polynomial.map (algebraMap R (Matrix n n R)) p
[PROOFSTEP]
ext m i j
[GOAL]
case a.a.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
p : R[X]
m : ℕ
i j : n
⊢ coeff (↑matPolyEquiv (p • 1)) m i j = coeff (Polynomial.map (algebraMap R (Matrix n n R)) p) m i j
[PROOFSTEP]
simp only [coeff_map, one_apply, algebraMap_matrix_apply, mul_boole, Pi.smul_apply, matPolyEquiv_coeff_apply]
[GOAL]
case a.a.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
p : R[X]
m : ℕ
i j : n
⊢ coeff ((p • 1) i j) m = if i = j then ↑(algebraMap R R) (coeff p m) else 0
[PROOFSTEP]
split_ifs
[GOAL]
case pos
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
p : R[X]
m : ℕ
i j : n
h✝ : i = j
⊢ coeff ((p • 1) i j) m = ↑(algebraMap R R) (coeff p m)
[PROOFSTEP]
simp
[GOAL]
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
p : R[X]
m : ℕ
i j : n
h✝ : ¬i = j
⊢ coeff ((p • 1) i j) m = 0
[PROOFSTEP]
simp
[GOAL]
case pos
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
p : R[X]
m : ℕ
i j : n
h✝ : i = j
⊢ coeff (p * OfNat.ofNat 1 i j) m = coeff p m
[PROOFSTEP]
rename_i h
[GOAL]
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
p : R[X]
m : ℕ
i j : n
h✝ : ¬i = j
⊢ coeff (p * OfNat.ofNat 1 i j) m = 0
[PROOFSTEP]
rename_i h
[GOAL]
case pos
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
p : R[X]
m : ℕ
i j : n
h : i = j
⊢ coeff (p * OfNat.ofNat 1 i j) m = coeff p m
[PROOFSTEP]
simp [h]
[GOAL]
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
p : R[X]
m : ℕ
i j : n
h : ¬i = j
⊢ coeff (p * OfNat.ofNat 1 i j) m = 0
[PROOFSTEP]
simp [h]
[GOAL]
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
m : Matrix n n R[X]
i j : n
⊢ support (m i j) ⊆ support (↑matPolyEquiv m)
[PROOFSTEP]
intro k
[GOAL]
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
m : Matrix n n R[X]
i j : n
k : ℕ
⊢ k ∈ support (m i j) → k ∈ support (↑matPolyEquiv m)
[PROOFSTEP]
contrapose
[GOAL]
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
m : Matrix n n R[X]
i j : n
k : ℕ
⊢ ¬k ∈ support (↑matPolyEquiv m) → ¬k ∈ support (m i j)
[PROOFSTEP]
simp only [not_mem_support_iff]
[GOAL]
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
m : Matrix n n R[X]
i j : n
k : ℕ
⊢ coeff (↑matPolyEquiv m) k = 0 → coeff (m i j) k = 0
[PROOFSTEP]
intro hk
[GOAL]
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
m : Matrix n n R[X]
i j : n
k : ℕ
hk : coeff (↑matPolyEquiv m) k = 0
⊢ coeff (m i j) k = 0
[PROOFSTEP]
rw [← matPolyEquiv_coeff_apply, hk]
[GOAL]
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
m : Matrix n n R[X]
i j : n
k : ℕ
hk : coeff (↑matPolyEquiv m) k = 0
⊢ OfNat.ofNat 0 i j = 0
[PROOFSTEP]
rfl
