File: Mathlib/RingTheory/PolynomialAlgebra.lean

full_name: PolyEquivTensor.toFunBilinear_apply_apply
code: /-- (Implementation detail).
The function underlying `A ⊗[R] R[X] →ₐ[R] A[X]`,
as a bilinear function of two arguments.
-/
-- Porting note: was  `@[simps apply_apply]`
@[simps! apply_apply]
def toFunBilinear : A →ₗ[A] R[X] →ₗ[R] A[X] 
goal: ((PolyEquivTensor.toFunBilinear R A) b) a = b • (Polynomial.aeval Polynomial.X) a

full_name: PolyEquivTensor.toFunBilinear
code: /-- (Implementation detail).
The function underlying `A ⊗[R] R[X] →ₐ[R] A[X]`,
as a bilinear function of two arguments.
-/
-- Porting note: was  `@[simps apply_apply]`
@[simps! apply_apply]
def toFunBilinear : A →ₗ[A] R[X] →ₗ[R] A[X] 
goal: A →ₗ[A] R[X] →ₗ[R] A[X]

full_name: PolyEquivTensor.toFunBilinear_apply_eq_sum
code: theorem toFunBilinear_apply_eq_sum (a : A) (p : R[X]) :
    toFunBilinear R A a p = p.sum fun n r => monomial n (a * algebraMap R A r) 
goal: ((PolyEquivTensor.toFunBilinear R A) a) p = p.sum fun n r => (Polynomial.monomial n) (a * (algebraMap R A) r)

full_name: PolyEquivTensor.toFunLinear
code: /-- (Implementation detail).
The function underlying `A ⊗[R] R[X] →ₐ[R] A[X]`,
as a linear map.
-/
def toFunLinear : A ⊗[R] R[X] →ₗ[R] A[X] 
goal: A ⊗[R] R[X] →ₗ[R] A[X]

full_name: PolyEquivTensor.toFunLinear_tmul_apply
code: @[simp]
theorem toFunLinear_tmul_apply (a : A) (p : R[X]) :
    toFunLinear R A (a ⊗ₜ[R] p) = toFunBilinear R A a p 
goal: (PolyEquivTensor.toFunLinear R A) (a ⊗ₜ[R] p) = ((PolyEquivTensor.toFunBilinear R A) a) p

full_name: PolyEquivTensor.toFunLinear_mul_tmul_mul_aux_1
code: theorem toFunLinear_mul_tmul_mul_aux_1 (p : R[X]) (k : ℕ) (h : Decidable ¬p.coeff k = 0) (a : A) :
    ite (¬coeff p k = 0) (a * (algebraMap R A) (coeff p k)) 0 =
    a * (algebraMap R A) (coeff p k) 
goal: (if ¬p.coeff k = 0 then a * (algebraMap R A) (p.coeff k) else 0) = a * (algebraMap R A) (p.coeff k)

full_name: PolyEquivTensor.toFunLinear_mul_tmul_mul_aux_2
code: theorem toFunLinear_mul_tmul_mul_aux_2 (k : ℕ) (a₁ a₂ : A) (p₁ p₂ : R[X]) :
    a₁ * a₂ * (algebraMap R A) ((p₁ * p₂).coeff k) =
      (Finset.antidiagonal k).sum fun x =>
        a₁ * (algebraMap R A) (coeff p₁ x.1) * (a₂ * (algebraMap R A) (coeff p₂ x.2)) 
goal: a₁ * a₂ * (algebraMap R A) ((p₁ * p₂).coeff k) =
  ∑ x ∈ Finset.antidiagonal k, a₁ * (algebraMap R A) (p₁.coeff x.1) * (a₂ * (algebraMap R A) (p₂.coeff x.2))

full_name: PolyEquivTensor.toFunLinear_mul_tmul_mul
code: theorem toFunLinear_mul_tmul_mul (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₂) 
goal: (PolyEquivTensor.toFunLinear R A) ((a₁ * a₂) ⊗ₜ[R] (p₁ * p₂)) =
  (PolyEquivTensor.toFunLinear R A) (a₁ ⊗ₜ[R] p₁) * (PolyEquivTensor.toFunLinear R A) (a₂ ⊗ₜ[R] p₂)

full_name: PolyEquivTensor.toFunLinear_one_tmul_one
code: theorem toFunLinear_one_tmul_one :
    toFunLinear R A (1 ⊗ₜ[R] 1) = 1 
goal: (PolyEquivTensor.toFunLinear R A) (1 ⊗ₜ[R] 1) = 1

full_name: PolyEquivTensor.toFunAlgHom
code: /-- (Implementation detail).
The algebra homomorphism `A ⊗[R] R[X] →ₐ[R] A[X]`.
-/
def toFunAlgHom : A ⊗[R] R[X] →ₐ[R] A[X] 
goal: A ⊗[R] R[X] →ₐ[R] A[X]

full_name: PolyEquivTensor.toFunAlgHom_apply_tmul
code: @[simp]
theorem toFunAlgHom_apply_tmul (a : A) (p : R[X]) :
    toFunAlgHom R A (a ⊗ₜ[R] p) = p.sum fun n r => monomial n (a * (algebraMap R A) r) 
goal: (PolyEquivTensor.toFunAlgHom R A) (a ⊗ₜ[R] p) = p.sum fun n r => (Polynomial.monomial n) (a * (algebraMap R A) r)

full_name: PolyEquivTensor.invFun
code: /-- (Implementation detail.)

The bare function `A[X] → A ⊗[R] R[X]`.
(We don't need to show that it's an algebra map, thankfully --- just that it's an inverse.)
-/
def invFun (p : A[X]) : A ⊗[R] R[X] 
goal: A ⊗[R] R[X]

full_name: PolyEquivTensor.invFun_add
code: @[simp]
theorem invFun_add {p q} : invFun R A (p + q) = invFun R A p + invFun R A q 
goal: PolyEquivTensor.invFun R A (p + q) = PolyEquivTensor.invFun R A p + PolyEquivTensor.invFun R A q

full_name: PolyEquivTensor.invFun_monomial
code: theorem invFun_monomial (n : ℕ) (a : A) :
    invFun R A (monomial n a) = (a ⊗ₜ[R] 1) * 1 ⊗ₜ[R] X ^ n 
goal: PolyEquivTensor.invFun R A ((Polynomial.monomial n) a) = a ⊗ₜ[R] 1 * 1 ⊗ₜ[R] Polynomial.X ^ n

full_name: PolyEquivTensor.left_inv
code: theorem left_inv (x : A ⊗ R[X]) : invFun R A ((toFunAlgHom R A) x) = x 
goal: PolyEquivTensor.invFun R A ((PolyEquivTensor.toFunAlgHom R A) x) = x

full_name: PolyEquivTensor.right_inv
code: theorem right_inv (x : A[X]) : (toFunAlgHom R A) (invFun R A x) = x 
goal: (PolyEquivTensor.toFunAlgHom R A) (PolyEquivTensor.invFun R A x) = x

full_name: PolyEquivTensor.equiv
code: /-- (Implementation detail)

The equivalence, ignoring the algebra structure, `(A ⊗[R] R[X]) ≃ A[X]`.
-/
def equiv : A ⊗[R] R[X] ≃ A[X] 
goal: A ⊗[R] R[X] ≃ A[X]

full_name: polyEquivTensor
code: /-- The `R`-algebra isomorphism `A[X] ≃ₐ[R] (A ⊗[R] R[X])`.
-/
def polyEquivTensor : A[X] ≃ₐ[R] A ⊗[R] R[X] 
goal: A[X] ≃ₐ[R] A ⊗[R] R[X]

full_name: polyEquivTensor_apply
code: @[simp]
theorem polyEquivTensor_apply (p : A[X]) :
    polyEquivTensor R A p =
      p.eval₂ (includeLeft : A →ₐ[R] A ⊗[R] R[X]) ((1 : A) ⊗ₜ[R] (X : R[X])) 
goal: (polyEquivTensor R A) p = Polynomial.eval₂ (↑Algebra.TensorProduct.includeLeft) (1 ⊗ₜ[R] Polynomial.X) p

full_name: polyEquivTensor_symm_apply_tmul
code: @[simp]
theorem polyEquivTensor_symm_apply_tmul (a : A) (p : R[X]) :
    (polyEquivTensor R A).symm (a ⊗ₜ p) = p.sum fun n r => monomial n (a * algebraMap R A r) 
goal: (polyEquivTensor R A).symm (a ⊗ₜ[R] p) = p.sum fun n r => (Polynomial.monomial n) (a * (algebraMap R A) r)

full_name: matPolyEquiv
code: /--
The algebra isomorphism stating "matrices of polynomials are the same as polynomials of matrices".

(You probably shouldn't attempt to use this underlying definition ---
it's an algebra equivalence, and characterised extensionally by the lemma
`matPolyEquiv_coeff_apply` below.)
-/
noncomputable def matPolyEquiv : Matrix n n R[X] ≃ₐ[R] (Matrix n n R)[X] 
goal: Matrix n n R[X] ≃ₐ[R] (Matrix n n R)[X]

full_name: matPolyEquiv_symm_C
code: @[simp] theorem matPolyEquiv_symm_C (M : Matrix n n R) : matPolyEquiv.symm (C M) = M.map C 
goal: matPolyEquiv.symm (Polynomial.C M) = M.map ⇑Polynomial.C

full_name: matPolyEquiv_map_C
code: @[simp] theorem matPolyEquiv_map_C (M : Matrix n n R) : matPolyEquiv (M.map C) = C M 
goal: matPolyEquiv (M.map ⇑Polynomial.C) = Polynomial.C M

full_name: matPolyEquiv_symm_X
code: @[simp] theorem matPolyEquiv_symm_X :
    matPolyEquiv.symm X = diagonal fun _ : n => (X : R[X]) 
goal: matPolyEquiv.symm Polynomial.X = Matrix.diagonal fun x => Polynomial.X

full_name: matPolyEquiv_diagonal_X
code: @[simp] theorem matPolyEquiv_diagonal_X :
    matPolyEquiv (diagonal fun _ : n => (X : R[X])) = X 
goal: matPolyEquiv (Matrix.diagonal fun x => Polynomial.X) = Polynomial.X

full_name: matPolyEquiv_coeff_apply_aux_1
code: theorem matPolyEquiv_coeff_apply_aux_1 (i j : n) (k : ℕ) (x : R) :
    matPolyEquiv (stdBasisMatrix i j <| monomial k x) = monomial k (stdBasisMatrix i j x) 
goal: matPolyEquiv (Matrix.stdBasisMatrix i j ((Polynomial.monomial k) x)) =
  (Polynomial.monomial k) (Matrix.stdBasisMatrix i j x)

full_name: matPolyEquiv_coeff_apply_aux_2
code: theorem matPolyEquiv_coeff_apply_aux_2 (i j : n) (p : R[X]) (k : ℕ) :
    coeff (matPolyEquiv (stdBasisMatrix i j p)) k = stdBasisMatrix i j (coeff p k) 
goal: (matPolyEquiv (Matrix.stdBasisMatrix i j p)).coeff k = Matrix.stdBasisMatrix i j (p.coeff k)

full_name: matPolyEquiv_coeff_apply
code: @[simp]
theorem matPolyEquiv_coeff_apply (m : Matrix n n R[X]) (k : ℕ) (i j : n) :
    coeff (matPolyEquiv m) k i j = coeff (m i j) k 
goal: (matPolyEquiv m).coeff k i j = (m i j).coeff k

full_name: matPolyEquiv_symm_apply_coeff
code: @[simp]
theorem matPolyEquiv_symm_apply_coeff (p : (Matrix n n R)[X]) (i j : n) (k : ℕ) :
    coeff (matPolyEquiv.symm p i j) k = coeff p k i j 
goal: (matPolyEquiv.symm p i j).coeff k = p.coeff k i j

full_name: matPolyEquiv_smul_one
code: theorem matPolyEquiv_smul_one (p : R[X]) :
    matPolyEquiv (p • (1 : Matrix n n R[X])) = p.map (algebraMap R (Matrix n n R)) 
goal: matPolyEquiv (p • 1) = Polynomial.map (algebraMap R (Matrix n n R)) p

full_name: matPolyEquiv_map_smul
code: @[simp]
lemma matPolyEquiv_map_smul (p : R[X]) (M : Matrix n n R[X]) :
    matPolyEquiv (p • M) = p.map (algebraMap _ _) * matPolyEquiv M 
goal: matPolyEquiv (p • M) = Polynomial.map (algebraMap R (Matrix n n R)) p * matPolyEquiv M

full_name: support_subset_support_matPolyEquiv
code: theorem support_subset_support_matPolyEquiv (m : Matrix n n R[X]) (i j : n) :
    support (m i j) ⊆ support (matPolyEquiv m) 
goal: (m i j).support ⊆ (matPolyEquiv m).support