The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V07. Linear algebra

Mathlib.LinearAlgebra.Matrix.MvPolynomial

7 declarations. Mathlib docs · Source

Matrices of multivariate polynomials

In this file, we prove results about matrices over an MvPolynomial ring. In particular, we provide Matrix.mvPolynomialX which associates every entry of a matrix with a unique variable.

Tags

matrix determinant, multivariate polynomial

def Matrix.mvPolynomialX E1 #

(m : Type u_1) → (n : Type u_2) → (R : Type u_3) → [inst : CommSemiring R] → Matrix m n (MvPolynomial (m × n) R)

The matrix with variable X (i,j) at location (i,j).

theorem Matrix.mvPolynomialX_apply E0 #

∀ (m : Type u_1) (n : Type u_2) (R : Type u_3) [inst : CommSemiring R] (i : m) (j : n),
  Matrix.mvPolynomialX m n R i j = MvPolynomial.X (i, j)

theorem Matrix.mvPolynomialX_map_eval₂ E1 #

∀ {m : Type u_1} {n : Type u_2} {R : Type u_3} {S : Type u_4} [inst : CommSemiring R] [inst_1 : CommSemiring S]
  (f : R →+* S) (A : Matrix m n S), (Matrix.mvPolynomialX m n R).map (MvPolynomial.eval₂ f fun p ↦ A p.1 p.2) = A

Any matrix A can be expressed as the evaluation of Matrix.mvPolynomialX.

This is of particular use when MvPolynomial (m × n) R is an integral domain but S is not, as if the MvPolynomial.eval₂ can be pulled to the outside of a goal, it can be solved in under cancellative assumptions.

theorem Matrix.mvPolynomialX_mapMatrix_eval E1 #

∀ {m : Type u_1} {R : Type u_3} [inst : Fintype m] [inst_1 : DecidableEq m] [inst_2 : CommSemiring R]
  (A : Matrix m m R), (MvPolynomial.eval fun p ↦ A p.1 p.2).mapMatrix (Matrix.mvPolynomialX m m R) = A

A variant of Matrix.mvPolynomialX_map_eval₂ with a bundled RingHom on the LHS.

theorem Matrix.mvPolynomialX_mapMatrix_aeval E1 #

∀ {m : Type u_1} (R : Type u_3) {S : Type u_4} [inst : Fintype m] [inst_1 : DecidableEq m] [inst_2 : CommSemiring R]
  [inst_3 : CommSemiring S] [inst_4 : Algebra R S] (A : Matrix m m S),
  (MvPolynomial.aeval fun p ↦ A p.1 p.2).mapMatrix (Matrix.mvPolynomialX m m R) = A

A variant of Matrix.mvPolynomialX_map_eval₂ with a bundled AlgHom on the LHS.

theorem Matrix.det_mvPolynomialX_ne_zero E1 #

∀ (m : Type u_1) (R : Type u_3) [inst : DecidableEq m] [inst_1 : Fintype m] [inst_2 : CommRing R] [Nontrivial R],
  (Matrix.mvPolynomialX m m R).det ≠ 0

In a nontrivial ring, Matrix.mvPolynomialX m m R has non-zero determinant.

theorem Matrix.eval_det_mvPolynomialX E1 #

∀ (m : Type u_1) (R : Type u_3) [inst : DecidableEq m] [inst_1 : Fintype m] [inst_2 : CommRing R] (s : m × m → R),
  (MvPolynomial.eval s) (Matrix.mvPolynomialX m m R).det = (Matrix.of fun i j ↦ s (i, j)).det

Evaluating the generic determinant polynomial det (mvPolynomialX m m R) at a point s gives the determinant of the matrix obtained by substituting s.