Prove2Me
Navigate
MissionsFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The projection-updating theorem

Proved
VectorSpaceOpt.projection_update

by Shuze Chen · Aug 23, 2026 · Mathlib c5ea003 (Lean v4.30.0)

estimationhilbert-spacekalman-filter

Work in a Hilbert space HHH of random variables, where the inner product of two variables is their correlation, ⟨a,b⟩=E[ab]\langle a, b\rangle = E[ab]⟨a,b⟩=E[ab].

Let β∈H\beta \in Hβ∈H and let β^1\hat\beta_1β^​1​ be its orthogonal projection on a closed subspace Y1Y_1Y1​ — the best estimate of β\betaβ given the data generating Y1Y_1Y1​. Let y2y_2y2​ be an mmm-vector of random variables generating a subspace Y2Y_2Y2​, let y^2\hat y_2y^​2​ be the vector of projections of the components of y2y_2y2​ onto Y1Y_1Y1​ (the best estimates of y2y_2y2​ from the old data), and set

y~2=y2−y^2.\tilde y_2 = y_2 - \hat y_2 .y~​2​=y2​−y^​2​.

Then the projection of β\betaβ onto Y1+Y2Y_1 + Y_2Y1​+Y2​ is

β^=β^1+E[β y~2⊤] (E[y~2y~2⊤])−1y~2,\hat\beta = \hat\beta_1 + E[\beta\,\tilde y_2^\top]\,\big(E[\tilde y_2 \tilde y_2^\top]\big)^{-1} \tilde y_2 ,β^​=β^​1​+E[βy~​2⊤​](E[y~​2​y~​2⊤​])−1y~​2​,

that is, β^1\hat\beta_1β^​1​ plus the best estimate of β\betaβ in the subspace generated by y~2\tilde y_2y~​2​.

The mechanism is purely geometric: y~2\tilde y_2y~​2​ is orthogonal to Y1Y_1Y1​ by construction and generates a subspace Y~2\tilde Y_2Y~2​ with Y1+Y2=Y1⊕Y~2Y_1 + Y_2 = Y_1 \oplus \tilde Y_2Y1​+Y2​=Y1​⊕Y~2​, 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 β\betaβ; the vector case is nnn 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.

Preamble
import Mathlib
open Matrix
open scoped RealInnerProductSpace
Formal statement
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
Source
David G. Luenberger, Optimization by Vector Space Methods, John Wiley & Sons, 1969, §4.6, Theorem 3, p. 92

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me