Documentation

TauCeti.MeasureTheory.Measure.SymmetricMatrix.Basic

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 #

@[reducible, inline]

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.

Equations
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.

    @[instance_reducible]

    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.
    @[instance_reducible]

    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 #

    @[simp]
    theorem selfAdjoint.coe_inner {p : ℕ} (A B : ↥(submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) :
    inner ℝ A B = inner ℝ ↑A ↑B

    The inner product of the symmetric subspace is the Frobenius inner product of the underlying matrices.

    Symmetry of the entries #

    theorem selfAdjoint.isHermitian_coe {p : ℕ} (A : ↥(submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) :

    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.

    theorem selfAdjoint.coe_apply_comm {p : ℕ} (A : ↥(submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) (i j : Fin p) :
    ↑A i j = ↑A j i

    The entries of a symmetric matrix are unchanged by swapping the two indices.

    @[simp]
    theorem selfAdjoint.transpose_coe {p : ℕ} (A : ↥(submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) :
    (↑A).transpose = ↑A

    An element of the symmetric subspace is fixed by transposition.

    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
      @[simp]
      theorem TauCeti.symmetricCoordinates_apply (p : ℕ) (A : ↥(selfAdjoint.submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) (ij : upperTriangle p) :
      (symmetricCoordinates p) A ij = ↑A (↑ij).1 (↑ij).2
      @[simp]
      theorem TauCeti.coe_symmetricCoordinates_symm_apply_of_le (p : ℕ) (x : upperTriangle p → ℝ) {i j : Fin p} (h : i ≤ j) :
      ↑((symmetricCoordinates p).symm x) i j = x ⟨(i, j), h⟩
      @[simp]
      theorem TauCeti.coe_symmetricCoordinates_symm_apply_of_ge (p : ℕ) (x : upperTriangle p → ℝ) {i j : Fin p} (h : j ≤ i) :
      ↑((symmetricCoordinates p).symm x) i j = x ⟨(j, i), h⟩

      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
        @[simp]
        theorem TauCeti.symmetricBasis_repr (p : ℕ) (x : ↥(selfAdjoint.submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) (ij : upperTriangle p) :
        ((symmetricBasis p).repr x) ij = ↑x (↑ij).1 (↑ij).2

        The coordinates of a symmetric matrix in TauCeti.symmetricBasis are its on-or-above-diagonal entries.

        theorem TauCeti.coe_symmetricBasis_apply_of_le (p : ℕ) (ij : upperTriangle p) {k l : Fin p} (h : k ≤ l) :
        ↑((symmetricBasis p) ij) k l = if ij = ⟨(k, l), h⟩ then 1 else 0
        theorem TauCeti.coe_symmetricBasis_apply_of_ge (p : ℕ) (ij : upperTriangle p) {k l : Fin p} (h : l ≤ k) :
        ↑((symmetricBasis p) ij) k l = if ij = ⟨(l, k), h⟩ then 1 else 0
        theorem TauCeti.coe_symmetricBasis_diag (p : ℕ) (i : Fin p) :
        ↑((symmetricBasis p) ⟨(i, i), ⋯⟩) = Matrix.single i i 1

        On the diagonal, the coordinate basis vector is a single matrix unit.

        theorem TauCeti.coe_symmetricBasis_offDiag (p : ℕ) {i j : Fin p} (hij : i ≤ j) (hne : i ≠ j) :
        ↑((symmetricBasis p) ⟨(i, j), hij⟩) = Matrix.single i j 1 + Matrix.single j i 1

        Off the diagonal, the coordinate basis vector is a symmetrized pair of matrix units.

        The one-dimensional carrier #

        @[instance_reducible]

        In dimension one there is a single on-or-above-diagonal position.

        Equations

        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 #

          theorem selfAdjoint.inner_eq_trace_mul {p : ℕ} (A Θ : ↥(submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) :
          inner ℝ A Θ = (↑Θ * ↑A).trace

          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.

          theorem selfAdjoint.continuous_trace_mul_coe {p : ℕ} (Θ : ↥(submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) :
          Continuous fun (A : ↥(submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) => (↑Θ * ↑A).trace

          The trace pairing against a fixed symmetric matrix is continuous, being the Frobenius inner product with that matrix.

          theorem selfAdjoint.continuous_coe_apply {p : ℕ} (i j : Fin p) :
          Continuous fun (A : ↥(submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) => ↑A i j

          Reading off an entry of a symmetric matrix is continuous.

          theorem selfAdjoint.measurable_coe_apply {p : ℕ} (i j : Fin p) :
          Measurable fun (A : ↥(submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) => ↑A i j

          Reading off an entry of a symmetric matrix is measurable.

          theorem selfAdjoint.continuous_exp_trace_mul_coe {p : ℕ} (Θ : ↥(submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) (t : ℝ) :
          Continuous fun (A : ↥(submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) => Real.exp (t * (↑Θ * ↑A).trace)

          The exponential of a scalar multiple of the trace pairing is continuous. This is the measurability side condition of the exponential-moment computations on the symmetric subspace.

          Representers of the matrix entries #

          noncomputable def TauCeti.symmetricEntry {p : ℕ} (i j : Fin p) :

          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
          Instances For
            theorem TauCeti.coe_symmetricEntry {p : ℕ} (i j : Fin p) :
            ↑(symmetricEntry i j) = (1 / 2) • (Matrix.single i j 1 + Matrix.single j i 1)
            theorem TauCeti.trace_symmetricEntry_mul {p : ℕ} (i j : Fin p) {A : Matrix (Fin p) (Fin p) ℝ} (hA : A.IsHermitian) :
            (↑(symmetricEntry i j) * A).trace = A i j

            Pairing a Hermitian matrix with TauCeti.symmetricEntry i j under the trace reads off its (i, j) entry.

            @[simp]
            theorem TauCeti.trace_symmetricEntry_mul_coe {p : ℕ} (i j : Fin p) (A : ↥(selfAdjoint.submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) :
            (↑(symmetricEntry i j) * ↑A).trace = ↑A i j

            The trace pairing of TauCeti.symmetricEntry i j with an element of the symmetric subspace is its (i, j) entry.

            theorem TauCeti.trace_symmetricEntry_mul_mul_symmetricEntry_mul {p : ℕ} (i j k l : Fin p) {S : Matrix (Fin p) (Fin p) ℝ} (hS : S.IsHermitian) :
            (↑(symmetricEntry i j) * S * ↑(symmetricEntry k l) * S).trace = (S i k * S j l + S i l * S j k) / 2

            The bilinear map (M, N) ↦ trace (M * S * N * S) at two entry representers, for a Hermitian S.