Bilinear forms attached to matrices #
Mathlib's Matrix.toBilin' reads a square matrix M over a commutative semiring R as the
bilinear form (x, y) ↦ xᵀ M y on n → R. This file records facts about these forms that
Mathlib lacks. The identity matrix gives the standard form ∑ i, x i * y i, which takes the value
1 on every standard basis vector, so over a nontrivial R it is alternating only when the index
type is empty (over the trivial semiring 1 = 0 and every form is alternating). Since the identity
matrix is symmetric and invertible, the standard form over a nontrivial R is in every positive
dimension a nondegenerate symmetric form that is not alternating, the model for the orthonormal
normal form of such forms.
In the other direction, LinearMap.BilinForm.toMatrix reads a bilinear form in a basis as its
Gram matrix. For a nondegenerate form, the Gram matrix in the B-dual basis is the inverse
transpose of the Gram matrix in the original basis; for a symmetric form it is the inverse Gram
matrix, which is how the dual of a lattice is described in coordinates.
Main results #
Matrix.isAlt_toBilin'_one_iff: forRnontrivial, the standard form onn → Ris alternating exactly whennis empty.LinearMap.BilinForm.toMatrix_dualBasis: the Gram matrix of a nondegenerate form in aB-dual basis is the inverse transpose of its Gram matrix in the original basis.
Over a nontrivial commutative semiring R, the standard form ∑ i, x i * y i on n → R is
alternating only when n is empty: it takes the value 1 ≠ 0 on every standard basis vector.
The Gram matrix of a nondegenerate bilinear form in the B-dual basis of b is the inverse of
the transpose of its Gram matrix in b. For a symmetric form this is the inverse Gram matrix.