The standard sesquilinear form with a specified twist #
For a ring endomorphism σ, the form sesquilinearForm σ is linear in its first argument and
σ-semilinear in its second: h(x,y) = ∑ i, x i * σ (y i). It is nondegenerate when σ is
injective, and for an automorphism σ it identifies the second coordinate space semilinearly
with the dual of the first. When σ is involutive, the form has Hermitian symmetry. This
orientation is useful for Hermitian duals of codes over finite fields.
This identification with the dual gives a nondegenerate pairing for studying orthogonality in finite coordinate spaces.
The API is in RingHom: use σ.sesquilinearForm, or RingHom.sesquilinearForm σ. Results that
need an automorphism are in RingEquiv.
For a module with a finite basis b, Mathlib's Matrix.toLinearMapₛₗ₂ σ b b 1 is the
sesquilinear form, σ-semilinear in its first argument, for which b is orthonormal. In
coordinates it is ∑ i, σ (x i) * y i (Matrix.toLinearMapₛₗ₂_one_apply). For complex
conjugation, or any star ring, it is Hermitian (Matrix.star_toLinearMapₛₗ₂_one_apply), and over
a star-ordered ring without zero divisors it is positive definite
(Matrix.toLinearMapₛₗ₂_one_self_nonneg, Matrix.toLinearMapₛₗ₂_one_self_eq_zero_iff). This is
the Hermitian metric making a chosen basis orthonormal, for instance the increasing wedge basis of
an exterior algebra.
More generally, for a ring endomorphism σ and a Gram matrix Q, write
B(x, y) = σ(x)ᵀ Q y for the coordinate form (σ ∘ x) ⬝ᵥ (Q *ᵥ y). A matrix g with
σ(g)ᵀ Q g = Q preserves it (Matrix.comp_mulVec_dotProduct_mulVec_mulVec), and if σ is an
involution and σ(Q)ᵀ = ε Q, it is ε-Hermitian, σ(B(x, y)) = ε B(y, x)
(Matrix.apply_comp_dotProduct_mulVec). With ε * ε = 1, this gives B(y, x) = ε σ(B(x, y))
(Matrix.comp_dotProduct_mulVec_swap) and a formula for B(u + c x, u + c x) when x is
isotropic (Matrix.comp_add_smul_dotProduct_mulVec_add_smul).
Over a field, if the trace t ↦ t + ε σ(t) is onto the elements s with σ(s) = ε s, a vector
u with B(u, x) ≠ 0 corrects to an isotropic u + c x
(Matrix.exists_comp_add_smul_dotProduct_mulVec_add_smul_eq_zero). For invertible Q, any two
nonzero vectors pair nontrivially with a common vector
(Matrix.exists_comp_dotProduct_mulVec_ne_zero_pair). If moreover the trace has a nonzero kernel
element and some nonzero vector is isotropic, a matrix scaling every isotropic vector is scalar
(Matrix.exists_eq_scalar_of_forall_mulVec_eq_smul).
The standard sesquilinear form, linear in the first argument and twisted by σ
in the second. It is Hermitian when σ is involutive.
Instances For
The standard sesquilinear form evaluates as the coordinate sum ∑ i, x i * σ (y i).
For an involutive endomorphism, swapping the arguments conjugates the value.
The standard sesquilinear form is nondegenerate over any commutative semiring when the twist is injective.
Swapping the arguments and inverting the automorphism applies the inverse automorphism to the value of the standard sesquilinear form.
The second argument of the standard sesquilinear form identifies the coordinate space with its dual.
A matrix preserving the form preserves its values. For the σ-sesquilinear form
B(x, y) = σ(x)ᵀ Q y of Gram matrix Q, if σ(g)ᵀ Q g = Q, then B(g x, g y) = B(x, y).
An ε-Hermitian form. For the σ-sesquilinear form B(x, y) = σ(x)ᵀ Q y of Gram matrix
Q, if σ is an involution and σ(Q)ᵀ = ε Q, then σ(B(x, y)) = ε B(y, x).
With ε * ε = 1, the form is ε-Hermitian in the form B(y, x) = ε σ(B(x, y)).
The value of the form at u + c • x for an isotropic x.
If σ is an involution, Q is a nonzero ε-Hermitian matrix, and the trace t ↦ t + ε σ(t)
is onto the elements s with σ(s) = ε s, then ε * ε = 1.
Correcting a vector to an isotropic one. If the trace t ↦ t + ε σ(t) is onto the
elements s with σ(s) = ε s, then for isotropic x and B(u, x) ≠ 0 some u + c • x is
isotropic.
A matrix scaling every isotropic vector is scalar. Let σ be an involution and Q an
invertible ε-Hermitian matrix, and suppose that the trace t ↦ t + ε σ(t) is onto the
elements s with σ(s) = ε s and has a nonzero kernel element (surjectivity of the trace already
forces ε * ε = 1, Matrix.mul_self_eq_one_of_trace). If some nonzero vector
is isotropic and M maps every isotropic vector to a multiple of itself, then M is a scalar
matrix.
The sesquilinear form of the identity matrix in coordinates: for a basis b,
toLinearMapₛₗ₂ σ b b 1 x y = ∑ i, σ (x i) * y i, the form for which b is orthonormal.
For the form making a basis orthonormal, the functional attached to a basis vector is its coordinate functional.
The orthonormal-basis form is Hermitian: for complex conjugation, or the star of any star
ring, swapping the arguments of toLinearMapₛₗ₂ (starRingEnd R) b b 1 conjugates its value.
The orthonormal-basis form is positive semidefinite over a star-ordered ring.
The orthonormal-basis form is definite over a star-ordered ring without zero divisors:
toLinearMapₛₗ₂ (starRingEnd R) b b 1 x x = 0 only for x = 0.