Documentation

TauCeti.Analysis.InnerProductSpace.Orthonormal.Overlap

The overlap operator of two finite families and their principal cosines #

For finite families u : ι → E and v : κ → E in an inner product space, the overlap operator TauCeti.overlapOperator (defined with the frame operators in TauCeti.Analysis.InnerProductSpace.Frame) is analysis by u after synthesis by v,

EuclideanSpace 𝕜 κ → EuclideanSpace 𝕜 ι, a ↦ (⟪uᵢ, ∑ⱼ aⱼ vⱼ⟫)ᵢ,

whose matrix in the standard coordinates is (⟪uᵢ, vⱼ⟫)ᵢⱼ. When E is finite-dimensional it is S_u† S_v for the synthesis maps S_u, S_v; for orthonormal families these are the coordinate isometries Orthonormal.synthesisMapIsometry, and the overlap operator records the relative position of the two spanned subspaces in coordinates. On the diagonal it is the Gram operator.

For orthonormal families the singular values of the overlap operator are the principal cosines cos θ₀ ≥ cos θ₁ ≥ ⋯ of the two spans (Björck–Golub): writing S_u, S_v for the coordinate isometries, the cosine map of the spans U and V is P_V P_U = S_v (S_v† S_u) S_u†, and the outer isometric factors do not change singular values. So these family-level cosines are the subspace-level Submodule.principalCosines U V; for two unit vectors the single principal cosine of the lines they span is ‖⟪u, v⟫‖. Defining them as singular values makes nonnegativity, ordering and symmetry instances of the singular-value API rather than separate arguments; the bound cos θₖ ≤ 1 comes from the overlap operator being a contraction. The sum of their squares is the squared Frobenius norm ∑ⱼ ∑ᵢ ‖⟪uᵢ, vⱼ⟫‖² of the overlap matrix, which gives the squared Frobenius sine sin²_F Θ = ∑ₖ (1 - cos² θₖ) of two families of the same size as d - ∑ⱼ ∑ᵢ ‖⟪uᵢ, vⱼ⟫‖². Equivalently, sin²_F Θ = ∑ⱼ ‖P_{Uᗮ} vⱼ‖² is the total squared distance of the vⱼ from the span U of the uᵢ. When the uᵢ are the members of an orthonormal basis (bₖ) indexed by a coordinate block s, P_{Uᗮ} is the projection onto the span of the complementary block, which gives the cross-block form sin²_F Θ = ∑ⱼ ∑_{k ∉ s} ‖⟪bₖ, vⱼ⟫‖². For two eigenbases of symmetric operators and a common index block, this expresses the Frobenius sine between corresponding eigenspaces through the overlaps of eigenvectors across the blocks.

The overlap operator and its Frobenius identity make sense for arbitrary finite families; the principal cosines and the squared Frobenius sine are defined only for orthonormal families.

Main declarations #

Provenance #

The cross-block Frobenius sine identity is adapted from the AIQ-Kitware DKPS formalization (Kitware, Inc.; Apache-2.0) and the canonical eigenblock bridge. The remaining overlap identities are TauCeti developments.

References #

Contraction and Frobenius identity #

theorem TauCeti.norm_overlapOperator_apply_le {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} {κ : Type u_4} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] [Fintype κ] {u : ι → E} {v : κ → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) (a : EuclideanSpace 𝕜 κ) :

The overlap operator of two orthonormal families is a contraction.

theorem TauCeti.sum_sq_singularValues_overlapOperator {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} {κ : Type u_4} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] [Fintype κ] (u : ι → E) (v : κ → E) :
((overlapOperator 𝕜 u v).singularValues.sum fun (x : ℕ) (s : ℝ) => s ^ 2) = ∑ j : κ, ∑ i : ι, ‖inner 𝕜 (u i) (v j)‖ ^ 2

Frobenius identity for the overlap operator: the squared singular values of the overlap operator sum to the squared Frobenius norm ∑ⱼ ∑ᵢ ‖⟪uᵢ, vⱼ⟫‖² of its matrix.

Principal cosines #

noncomputable def TauCeti.cosPrincipalAngles {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} {κ : Type u_4} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] [Fintype κ] {u : ι → E} {v : κ → E} (_hu : Orthonormal 𝕜 u) (_hv : Orthonormal 𝕜 v) :

The principal cosines of orthonormal finite families u and v: the singular values of their overlap operator, in nonincreasing order and padded by zeros. These are the cosines of the principal angles between the two spans. For arbitrary families, the singular values of the overlap operator are (overlapOperator 𝕜 u v).singularValues.

Instances For
    theorem TauCeti.cosPrincipalAngles_def {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} {κ : Type u_4} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] [Fintype κ] {u : ι → E} {v : κ → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) :
    theorem TauCeti.cosPrincipalAngles_nonneg {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} {κ : Type u_4} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] [Fintype κ] {u : ι → E} {v : κ → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) (k : ℕ) :

    The principal cosines are nonnegative.

    theorem TauCeti.cosPrincipalAngles_antitone {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} {κ : Type u_4} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] [Fintype κ] {u : ι → E} {v : κ → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) :

    The principal cosines form a nonincreasing sequence cos θ₀ ≥ cos θ₁ ≥ ⋯.

    theorem TauCeti.cosPrincipalAngles_comm {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} {κ : Type u_4} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] [Fintype κ] {u : ι → E} {v : κ → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) :

    Swapping the two families leaves the principal cosines unchanged.

    theorem TauCeti.cosPrincipalAngles_of_card_le_right {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} {κ : Type u_4} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] [Fintype κ] {u : ι → E} {v : κ → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) {k : ℕ} (hk : Fintype.card κ ≤ k) :
    (cosPrincipalAngles hu hv) k = 0

    There are at most as many nonzero principal cosines as members of the second family.

    theorem TauCeti.cosPrincipalAngles_of_card_le_left {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} {κ : Type u_4} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] [Fintype κ] {u : ι → E} {v : κ → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) {k : ℕ} (hk : Fintype.card ι ≤ k) :
    (cosPrincipalAngles hu hv) k = 0

    There are at most as many nonzero principal cosines as members of the first family.

    theorem TauCeti.cosPrincipalAngles_le_one {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} {κ : Type u_4} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] [Fintype κ] {u : ι → E} {v : κ → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) (k : ℕ) :

    The principal cosines are at most 1.

    theorem TauCeti.sq_cosPrincipalAngles_le_one {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} {κ : Type u_4} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] [Fintype κ] {u : ι → E} {v : κ → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) (k : ℕ) :
    (cosPrincipalAngles hu hv) k ^ 2 ≤ 1

    The squared principal cosines are at most 1, so each term 1 - cos² θₖ of the squared Frobenius sine is nonnegative.

    theorem TauCeti.sum_range_sq_cosPrincipalAngles {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} {κ : Type u_4} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] [Fintype κ] {u : ι → E} {v : κ → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) :
    ∑ k ∈ Finset.range (Fintype.card κ), (cosPrincipalAngles hu hv) k ^ 2 = ∑ j : κ, ∑ i : ι, ‖inner 𝕜 (u i) (v j)‖ ^ 2

    The squares of the principal cosines sum to the squared Frobenius norm ∑ⱼ ∑ᵢ ‖⟪uᵢ, vⱼ⟫‖² of the overlap matrix.

    theorem TauCeti.sum_range_cosPrincipalAngles_eq_kyFanSum {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} {κ : Type u_4} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] [Fintype κ] {u : ι → E} {v : κ → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) (n : ℕ) :
    ∑ k ∈ Finset.range n, (cosPrincipalAngles hu hv) k = (overlapOperator 𝕜 u v).kyFanSum n

    The sum of the first n principal cosines is the n-th Ky Fan sum of the overlap operator.

    The squared Frobenius sine #

    noncomputable def TauCeti.sinThetaSq {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] {u v : ι → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) :

    The squared Frobenius sine sin²_F Θ = ∑ₖ (1 - cos² θₖ) between the spans of two orthonormal families of the same size d, summed over their first d principal cosines.

    Instances For
      theorem TauCeti.sinThetaSq_def {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] {u v : ι → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) :
      sinThetaSq hu hv = ∑ k ∈ Finset.range (Fintype.card ι), (1 - (cosPrincipalAngles hu hv) k ^ 2)
      theorem TauCeti.sinThetaSq_eq_card_sub_sum_sq {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] {u v : ι → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) :
      sinThetaSq hu hv = ↑(Fintype.card ι) - ∑ k ∈ Finset.range (Fintype.card ι), (cosPrincipalAngles hu hv) k ^ 2

      For orthonormal families of size d, sin²_F Θ = d - ∑ₖ cos² θₖ.

      theorem TauCeti.sinThetaSq_eq_card_sub_sum_norm_inner_sq {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] {u v : ι → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) :
      sinThetaSq hu hv = ↑(Fintype.card ι) - ∑ j : ι, ∑ i : ι, ‖inner 𝕜 (u i) (v j)‖ ^ 2

      For orthonormal families of size d, sin²_F Θ = d - ∑ⱼ ∑ᵢ ‖⟪uᵢ, vⱼ⟫‖², the size minus the squared Frobenius norm of the overlap matrix: the squared Frobenius sine between the spans, computed directly from the inner products.

      theorem TauCeti.sinThetaSq_comm {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] {u v : ι → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) :
      sinThetaSq hu hv = sinThetaSq hv hu

      Swapping the two families leaves the squared Frobenius sine unchanged.

      theorem TauCeti.sinThetaSq_nonneg {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] {u v : ι → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) :
      0 ≤ sinThetaSq hu hv

      The squared Frobenius sine is nonnegative.

      @[simp]
      theorem TauCeti.sinThetaSq_self {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] {v : ι → E} (hv : Orthonormal 𝕜 v) :
      sinThetaSq hv hv = 0

      An orthonormal family makes no angle with itself: its squared Frobenius sine vanishes.

      theorem TauCeti.cosPrincipalAngles_self_of_lt {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] {v : ι → E} (hv : Orthonormal 𝕜 v) {k : ℕ} (hk : k < Fintype.card ι) :
      (cosPrincipalAngles hv hv) k = 1

      All d principal cosines of an orthonormal family of size d with itself equal 1.

      The squared Frobenius sine through projections and coordinate blocks #

      theorem TauCeti.sinThetaSq_eq_sum_norm_starProjection_orthogonal_sq {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] {u v : ι → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) {U : Submodule 𝕜 E} [U.HasOrthogonalProjection] (hU : Submodule.span 𝕜 (Set.range u) = U) :
      sinThetaSq hu hv = ∑ j : ι, ‖Uᗮ.starProjection (v j)‖ ^ 2

      The squared Frobenius sine is the total squared distance of the second family from the span U of the first: sin²_F Θ = ∑ⱼ ‖P_{Uᗮ} vⱼ‖².

      theorem TauCeti.sinThetaSq_comp_subtypeVal_eq_sum_compl_norm_inner_sq {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] [DecidableEq ι] (b : OrthonormalBasis ι 𝕜 E) (s : Finset ι) {v : ↥s → E} (hv : Orthonormal 𝕜 v) :
      sinThetaSq ⋯ hv = ∑ j : ↥s, ∑ k ∈ sᶜ, ‖inner 𝕜 (b k) (v j)‖ ^ 2

      Cross-block form of the squared Frobenius sine. Let u be the members of an orthonormal basis b indexed by a coordinate block s, and let v be any orthonormal family indexed by s. Then sin²_F Θ = ∑ⱼ ∑_{k ∉ s} ‖⟪bₖ, vⱼ⟫‖²: the squared Frobenius sine is the energy of the vⱼ in the complementary coordinates.

      theorem TauCeti.sinThetaSq_comp_subtypeVal_comp_subtypeVal_eq_sum_compl_norm_inner_sq {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] [DecidableEq ι] (b c : OrthonormalBasis ι 𝕜 E) (s : Finset ι) :
      sinThetaSq ⋯ ⋯ = ∑ j ∈ s, ∑ k ∈ sᶜ, ‖inner 𝕜 (b k) (c j)‖ ^ 2

      Eigenblock sine formula. For two orthonormal bases b and c and a common coordinate block s, the squared Frobenius sine between the blocks (bᵢ)_{i ∈ s} and (cⱼ)_{j ∈ s} is the cross-block sum ∑_{j ∈ s} ∑_{k ∉ s} ‖⟪bₖ, cⱼ⟫‖². Applied to eigenbases of two symmetric operators, this compares the eigenspaces selected by the same eigenvalue indices.

      theorem Submodule.sq_sinThetaFrobenius_eq_sinThetaSq_of_orthonormal {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] [Fintype ι] (U V : Submodule 𝕜 E) [U.HasOrthogonalProjection] [V.HasOrthogonalProjection] {u v : ι → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) (hU : span 𝕜 (Set.range u) = U) (hV : span 𝕜 (Set.range v) = V) :

      The squared Frobenius sine of the spans of equally indexed orthonormal families is their family-level squared Frobenius sine TauCeti.sinThetaSq. The order reflects the directed projection P_{Uᗮ} P_V.

      theorem OrthonormalBasis.sq_sinThetaFrobenius_spanIndices {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} {κ : Type u_4} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [Fintype ι] [Fintype κ] [DecidableEq ι] (a : OrthonormalBasis ι 𝕜 E) (b : OrthonormalBasis κ 𝕜 E) (s : Finset ι) (t : Finset κ) :
      (b.spanIndices ↑t).sinThetaFrobenius (a.spanIndices ↑s) ^ 2 = ∑ j ∈ t, ∑ k ∈ sᶜ, ‖inner 𝕜 (a k) (b j)‖ ^ 2

      For independently indexed coordinate blocks of two orthonormal bases, the squared Frobenius sine is the cross-block overlap sum over the selected vectors of b and the complementary vectors of a. The two blocks need not have equal cardinality.

      Principal cosines of the spans #

      theorem Orthonormal.principalCosines_eq_cosPrincipalAngles {𝕜 : Type u_1} {E : Type u_2} {ι : Type u_3} {κ : Type u_4} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] [Fintype ι] [Fintype κ] {u : ι → E} {v : κ → E} (hu : Orthonormal 𝕜 u) (hv : Orthonormal 𝕜 v) {U V : Submodule 𝕜 E} [U.HasOrthogonalProjection] [V.HasOrthogonalProjection] (hU : Submodule.span 𝕜 (Set.range u) = U) (hV : Submodule.span 𝕜 (Set.range v) = V) :

      Family/subspace cosine bridge. The principal cosines of the spans U and V of two finite orthonormal families, the singular values of P_V P_U, are the principal cosines of the families, the singular values of their overlap operator.

      theorem Submodule.principalCosines_span_singleton {𝕜 : Type u_1} {E : Type u_2} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [FiniteDimensional 𝕜 E] {u v : E} (hu : ‖u‖ = 1) (hv : ‖v‖ = 1) :
      (𝕜 ∙ u).principalCosines (𝕜 ∙ v) = Finsupp.single 0 ‖inner 𝕜 u v‖

      One-dimensional cosine formula. For unit vectors u and v, the only principal cosine of the lines 𝕜 ∙ u and 𝕜 ∙ v is ‖⟪u, v⟫‖.