MindFormal v1.0.0One Mind

MindFormal.Tools.A705SharedDescriptions.Projection

MT1.2, MT1.3 and MT1.5. The actual risk of an implemented estimate in a closed available span of the actual record's square-integrable functions is the sum of three orthogonal errors; nested available spans gain the squared difference of their projections; and the exact linear gain of a partner's features from what the recipient cannot recover is bᵀ Γ† b, with Γ the (possibly singular) residualized feature covariance and Γ† its Moore-Penrose pseudoinverse, built here from the spectral theorem.

MT1.2: for an actual record m, a closed available span V of its square-integrable functions and an implemented estimate in V, the risk is the missing-information error, plus the unavailable-representation error, plus the execution error.

MT1.2 at a grown record with the same available span: the first two errors still sum to the span's own projection error.

MT1.3: for genuinely nested available spans the gain is the squared difference of the projections, nonnegative, strict exactly when the added projection is nonzero.

noncomputable def MindFormal.A705SharedDescriptions.symPinv {k : Type u_1} [Fintype k] [DecidableEq k] (A : Matrix k k ℝ) (hA : A.IsHermitian) :

The Moore-Penrose pseudoinverse of a symmetric real matrix, from its spectral decomposition: invert the nonzero eigenvalues, keep zero at zero.

Equations
Instances For
    theorem MindFormal.A705SharedDescriptions.symPinv_penrose {k : Type u_1} [Fintype k] [DecidableEq k] {A : Matrix k k ℝ} (hA : A.IsHermitian) :
    A * symPinv A hA * A = A ∧ symPinv A hA * A * symPinv A hA = symPinv A hA ∧ (A * symPinv A hA).transpose = A * symPinv A hA ∧ (symPinv A hA * A).transpose = symPinv A hA * A

    The four Penrose equations.

    noncomputable def MindFormal.A705SharedDescriptions.residFeature {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {k : Type u_2} (V : Submodule ℝ E) [V.HasOrthogonalProjection] (φ : k → E) (a : k) :
    E

    The recipient-residualized partner features h = (I - P_V) φ.

    Equations
    Instances For
      noncomputable def MindFormal.A705SharedDescriptions.targetCov {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {k : Type u_2} (V : Submodule ℝ E) [V.HasOrthogonalProjection] (φ : k → E) (Z : E) :
      k → ℝ

      b = E[h (Z - P_V Z)].

      Equations
      Instances For
        noncomputable def MindFormal.A705SharedDescriptions.linearGain {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {k : Type u_2} [Fintype k] [DecidableEq k] (V : Submodule ℝ E) [V.HasOrthogonalProjection] (φ : k → E) (Z : E) :

        MT1.5's exact linear gain bᵀ Γ† b.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          noncomputable def MindFormal.A705SharedDescriptions.gainCoeff {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {k : Type u_2} [Fintype k] [DecidableEq k] (V : Submodule ℝ E) [V.HasOrthogonalProjection] (φ : k → E) (Z : E) :
          k → ℝ

          The attaining coefficients Γ† b.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem MindFormal.A705SharedDescriptions.inner_sum_feature {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {k : Type u_2} [Fintype k] (V : Submodule ℝ E) [V.HasOrthogonalProjection] (φ : k → E) (d : k → ℝ) (a : k) :
            inner ℝ (residFeature V φ a) (∑ b : k, d b • residFeature V φ b) = (featureCov V φ).mulVec d a
            theorem MindFormal.A705SharedDescriptions.targetCov_range {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {k : Type u_2} [Fintype k] (V : Submodule ℝ E) [V.HasOrthogonalProjection] (φ : k → E) (Z : E) :
            ∃ (c : k → ℝ), (featureCov V φ).mulVec c = targetCov V φ Z

            b lies in the range of Γ, even when Γ is singular.

            theorem MindFormal.A705SharedDescriptions.linear_gain {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {k : Type u_2} [Fintype k] [DecidableEq k] (V : Submodule ℝ E) [V.HasOrthogonalProjection] (φ : k → E) (Z : E) :
            (∀ (d : k → ℝ), ‖Z - V.starProjection Z - ∑ a : k, d a • residFeature V φ a‖ ^ 2 = ‖Z - V.starProjection Z‖ ^ 2 - (2 * d ⬝ᵥ targetCov V φ Z - d ⬝ᵥ (featureCov V φ).mulVec d)) ∧ (featureCov V φ).mulVec (gainCoeff V φ Z) = targetCov V φ Z ∧ ‖Z - V.starProjection Z - ∑ a : k, gainCoeff V φ Z a • residFeature V φ a‖ ^ 2 = ‖Z - V.starProjection Z‖ ^ 2 - linearGain V φ Z ∧ (∀ (d : k → ℝ), ‖Z - V.starProjection Z - ∑ a : k, gainCoeff V φ Z a • residFeature V φ a‖ ^ 2 ≤ ‖Z - V.starProjection Z - ∑ a : k, d a • residFeature V φ a‖ ^ 2) ∧ 0 ≤ linearGain V φ Z ∧ (0 < linearGain V φ Z ↔ targetCov V φ Z ≠ 0) ∧ (∀ v ∈ V, ∀ (d : k → ℝ), ‖Z - V.starProjection Z‖ ^ 2 - linearGain V φ Z ≤ ‖Z - (v + ∑ a : k, d a • φ a)‖ ^ 2) ∧ ‖Z - (V.starProjection Z - ∑ a : k, gainCoeff V φ Z a • V.starProjection (φ a) + ∑ a : k, gainCoeff V φ Z a • φ a)‖ ^ 2 = ‖Z - V.starProjection Z‖ ^ 2 - linearGain V φ Z ∧ ∀ (a : k), φ a ∈ V → residFeature V φ a = 0

            MT1.5: the additional error of coefficients d on the residualized features, the attainment by Γ† b (which solves Γ d = b), the exact gain bᵀ Γ† b, its sign, and the optimum over the recipient's span enlarged by the partner's features. A feature already in the recipient's span has h = 0.

            theorem MindFormal.A705SharedDescriptions.no_gain_of_recoverable {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {k : Type u_2} [Fintype k] [DecidableEq k] (V : Submodule ℝ E) [V.HasOrthogonalProjection] (φ : k → E) {Z : E} (hZ : Z ∈ V) :
            targetCov V φ Z = 0 ∧ linearGain V φ Z = 0

            Private description difference alone supplies no positive gain: when the target is already recoverable by the recipient, every partner feature family, however different, has zero exact gain.