The projection-updating theorem
ProvedVectorSpaceOpt.projection_updateWork in a Hilbert space of random variables, where the inner product of two variables is their correlation, .
Let and let be its orthogonal projection on a closed subspace — the best estimate of given the data generating . Let be an -vector of random variables generating a subspace , let be the vector of projections of the components of onto (the best estimates of from the old data), and set
Then the projection of onto is
that is, plus the best estimate of in the subspace generated by .
The mechanism is purely geometric: is orthogonal to by construction and generates a subspace with , and a projection onto a sum of orthogonal subspaces is the sum of the projections. The old estimate is never recomputed — only the part of the new data that could not be anticipated from the old contributes. This is the engine behind sequential estimation and, in particular, the Kalman recursion.
Formalization Note. As in the source, the statement is given for a single random variable ; the vector case is separate problems. The projection onto the enlarged subspace is characterized by membership plus orthogonality of the error, which determines it uniquely, rather than through a projection operator. G is the Gram matrix of the innovations, assumed invertible.
import Mathlib open Matrix open scoped RealInnerProductSpace
namespace VectorSpaceOpt
theorem projection_update {H : Type} [NormedAddCommGroup H]
[InnerProductSpace ℝ H] {m : ℕ}
(Y₁ : Submodule ℝ H) (β b₁ : H) (hb₁ : b₁ ∈ Y₁)
(hproj : ∀ s ∈ Y₁, ⟪β - b₁, s⟫ = 0)
(y₂ yh₂ yt : Fin m → H)
(hyh : ∀ i, yh₂ i ∈ Y₁)
(hyproj : ∀ i, ∀ s ∈ Y₁, ⟪y₂ i - yh₂ i, s⟫ = 0)
(hyt : ∀ i, yt i = y₂ i - yh₂ i)
(G : Matrix (Fin m) (Fin m) ℝ) (hG : ∀ i j, G i j = ⟪yt i, yt j⟫)
(hdet : IsUnit G.det)
(c : Fin m → ℝ) (hc : ∀ i, c i = ⟪β, yt i⟫)
(bh : H) (hbh : bh = b₁ + ∑ i, (G⁻¹.mulVec c) i • yt i) :
bh ∈ Y₁ ⊔ Submodule.span ℝ (Set.range y₂) ∧
(∀ s ∈ Y₁ ⊔ Submodule.span ℝ (Set.range y₂), ⟪β - bh, s⟫ = 0) := by sorry
end VectorSpaceOpt