The carrier of symmetric-matrix distributions #
The Wishart and related symmetric-matrix distributions live on Mathlib's
self-adjoint subspace selfAdjoint.submodule ℝ (Matrix (Fin p) (Fin p) ℝ). Over ℝ, star is
transpose, so this is exactly the subspace of symmetric matrices, and
Matrix.isHermitian_iff_isSelfAdjoint connects membership to the spectral API.
This file equips that subspace with the ambient Frobenius norm and inner product while keeping
the subtype topology and uniformity it already carries: the norm structure is induced from
Matrix.frobeniusNormedAddCommGroup, whose topology and uniformity are definitionally the
product ones, so the induced structures agree definitionally with the subtype instances. The
measurable structure is the Borel structure of the subtype topology, and volume is supplied by
measureSpaceOfInnerProductSpace.
It also fixes the upper-triangular coordinate system used to normalize Lebesgue measure on the
subspace: TauCeti.symmetricCoordinates reads off the entries above the diagonal.
Main declarations #
TauCeti.upperTriangle— the index type of upper-triangular positions.TauCeti.card_upperTriangle— there arep * (p + 1) / 2such positions.TauCeti.symmetricMatrixNormedAddCommGroup,TauCeti.symmetricMatrixInnerProductSpace— the Frobenius structure on the symmetric subspace.selfAdjoint.coe_inner— the subspace inner product is the ambient one on the coercions.TauCeti.symmetricCoordinates— the continuous linear equivalence withupperTriangle p → ℝ.TauCeti.symmetricCoordinatesMeasurableEquiv— its measurable-equivalence form.TauCeti.symmetricBasis— the basis dual to the upper-triangular coordinates.TauCeti.symmetricFinOneEquiv— the identification of1 × 1symmetric matrices withℝ.TauCeti.finrank_symmetricMatrix— the dimension isp * (p + 1) / 2.selfAdjoint.inner_eq_trace_mul— the Frobenius pairing is the trace pairing, andselfAdjoint.continuous_trace_mul_coe— that pairing is continuous in its second argument, as is its exponentialselfAdjoint.continuous_exp_trace_mul_coe.TauCeti.symmetricEntry— the symmetric matrix representing evaluation at an entry under the trace pairing, withTauCeti.trace_symmetricEntry_mulandTauCeti.trace_symmetricEntry_mul_mul_symmetricEntry_mul.
The index type for the on-or-above-diagonal positions of a p × p matrix. A symmetric
matrix is determined by these entries, and TauCeti.symmetricCoordinates reads them off.
Instances For
There are p * (p + 1) / 2 on-or-above-diagonal positions in a p × p matrix.
The Frobenius structure on the symmetric subspace #
The instances below install the Frobenius norm and inner product on the symmetric subspace: the
norm is induced from the ambient (scoped) Frobenius instances, and the inner product pairs the
underlying matrices. Because the Frobenius norm is definitionally compatible with the product
topology and uniformity of Matrix, the induced structures agree definitionally with the subtype
instances already present.
The symmetric subspace carries the Frobenius norm induced from the ambient matrices, with its metric rebuilt on the subtype uniformity so that the uniform and topological structures are the subtype ones on the nose.
Equations
- One or more equations did not get rendered due to their size.
The symmetric subspace carries the Frobenius inner product ⟪A, B⟫ = ∑ i, ∑ j, A i j * B i j
of the underlying matrices, which on this subspace is the trace pairing
selfAdjoint.inner_eq_trace_mul.
Equations
- One or more equations did not get rendered due to their size.
The measurable structure is the Borel structure of the subtype topology. Declared explicitly so that instance search finds it regardless of which (definitionally equal) route it takes to the topology.
The inner product of the symmetric subspace #
Symmetry of the entries #
An element of the symmetric subspace is a Hermitian matrix; over ℝ this says that it is
symmetric, as spelled out by selfAdjoint.coe_apply_comm.
Upper-triangular coordinates #
The continuous linear equivalence reading off the on-or-above-diagonal entries of a symmetric matrix. Its inverse reconstructs the matrix by reflecting them across the diagonal.
This coordinate system fixes the normalization of TauCeti.symmetricLebesgue.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The measurable equivalence induced by TauCeti.symmetricCoordinates.
Equations
Instances For
The symmetric subspace has dimension p * (p + 1) / 2.
The basis of the symmetric subspace dual to the upper-triangular coordinates: its vector at an on-or-above-diagonal position is the symmetric matrix carrying a one at that position and at its mirror image, and nothing else.
Equations
Instances For
The coordinates of a symmetric matrix in TauCeti.symmetricBasis are its
on-or-above-diagonal entries.
On the diagonal, the coordinate basis vector is a single matrix unit.
Off the diagonal, the coordinate basis vector is a symmetrized pair of matrix units.
The one-dimensional carrier #
In dimension one there is a single on-or-above-diagonal position.
Equations
- TauCeti.uniqueUpperTriangleOne = { default := ⟨(0, 0), TauCeti.uniqueUpperTriangleOne._proof_2⟩, uniq := TauCeti.uniqueUpperTriangleOne._proof_3 }
A 1 × 1 symmetric matrix is its single entry. This is the upper-triangular coordinate
system TauCeti.symmetricCoordinates in dimension one, with the single coordinate read as a real
number rather than as a function on a one-element index type. It is the identification under which
a one-dimensional symmetric-matrix law becomes a law on ℝ.
Equations
Instances For
The trace pairing #
On the symmetric subspace, the Frobenius inner product is the trace pairing. This makes
MeasureTheory.charFun on the subspace use the same pairing as the Wishart trace statistics.
Representers of the matrix entries #
The symmetric matrix (Eᵢⱼ + Eⱼᵢ) / 2, which represents evaluation at the (i, j) entry
under the trace pairing: trace (symmetricEntry i j * A) = A i j for every symmetric A.
Equations
- TauCeti.symmetricEntry i j = ⟨(1 / 2) • (Matrix.single i j 1 + Matrix.single j i 1), ⋯⟩
Instances For
Pairing a Hermitian matrix with TauCeti.symmetricEntry i j under the trace reads off its
(i, j) entry.
The trace pairing of TauCeti.symmetricEntry i j with an element of the symmetric subspace is
its (i, j) entry.
The bilinear map (M, N) ↦ trace (M * S * N * S) at two entry representers, for a Hermitian
S.