Stat.Nonparametric.Moment­Problems.Score­Program

Dual score-program tools for moment problems: projection residual functions, feasible score directions, quadratic objectives, and minimum-norm identities.

Score­Program 4 core · 3 supporting This file solves the optimization problem that uses the projection residual from the neighboring ProjectionResidual.lean file. ★ scoreCost_eq

Constrained quadratic score program dual to the L² projection residual

This file solves the optimization problem that uses the projection residual from the neighboring ProjectionResidual.lean file. For a probability measure μ on with finite fourth moment and positive variance, consider the constrained minimum-norm score program: among all scores s ∈ L²(μ) that are moment-orthogonal to 1 and y and carry a prescribed -moment x,

minimize ∫ s² dμ subject to ∫ s dμ = 0, ∫ y·s dμ = 0, ∫ y²·s dμ = x,

what is the least achievable L²(μ) norm² of s?

The answer is the duality identity

scoreCost μ x = x² / r, where r = l2ResidualQuadratic μ

is the (positive) L² residual of regressing on span{1, y} (ProjectionResidual.lean). This is the classic Lagrangian / minimum-norm-interpolation duality: the constrained least-norm value is (prescribed moment)² / (residual variance of the constrained direction).

Contents

* FeasibleScore μ x s — feasibility: s ∈ L²(μ) with the three moment constraints. * optScore μ x — the optimal score s*(y) = (x/r)·q(y), q the projection residual. * optScore_feasible, optScore_costs* is feasible and achieves cost x²/r (attainment). * feasibleScore_cost_lower_bound — every feasible s has ∫ s² ≥ x²/r (completing the square: ∫ (s − (x/r)q)² = ∫ s² − x²/r ≥ 0, using ∫ q·s = x and ∫ q² = r). * scoreCost, scoreCost_eq — the program value and the headline duality scoreCost μ x = x²/r.

Reuse

The identity is the reusable score-cost primitive for arm-specific moment problems: once an arm law has residual variance r_{a,ν}, a target moment displacement x has least score norm J_{a,ν}(x) = x² / r_{a,ν}.

structure FeasibleScore reviewed
Causalean.Stat.MomentProblems.ScoreProgram

Feasibility of a score. s : ℝ → ℝ is feasible for target x if it lies in L²(μ) and is moment-orthogonal to 1 and y while carrying prescribed -moment x: s ∈ L²(μ), ∫ s dμ = 0, ∫ y·s dμ = 0, ∫ y²·s dμ = x.

Definition (Lean source)
μ :
x :
s :
ℝ → ℝ
`s` is square-integrable: `s ∈ L²(μ)`.
memL2 :
MemLp s 2 μ
`s` is orthogonal to the constant `1`: `∫ s dμ = 0`.
mean_zero :
∫ y, s y ∂μ = 0
`s` is orthogonal to `y`: `∫ y·s dμ = 0`.
cov_id_zero :
∫ y, y * s y ∂μ = 0
`s` carries the prescribed `y²`-moment: `∫ y²·s dμ = x`.
cov_sq :
∫ y, y ^ 2 * s y ∂μ = x
Causalean.Stat.MomentProblems.ScoreProgram.FeasibleScore · Causalean/Stat/Nonparametric/MomentProblems/ScoreProgram/ScoreProgram.lean:53
def optScore reviewed
Causalean.Stat.MomentProblems.ScoreProgram

The optimal score s*(y) = (x / r)·q(y), where q is the L² projection residual of onto span{1, y} and r = l2ResidualQuadratic μ. This is the minimum-norm feasible score.

Definition (Lean source)
noncomputable def optScore (μ : Measure ℝ) (x : ℝ) : ℝ → ℝ := fun y => (x / l2ResidualQuadratic μ) * projResidual μ y
Causalean.Stat.MomentProblems.ScoreProgram.optScore · Causalean/Stat/Nonparametric/MomentProblems/ScoreProgram/ScoreProgram.lean:70
def scoreCost reviewed
Causalean.Stat.MomentProblems.ScoreProgram

The value of the score program: the infimum of ∫ s² dμ over all feasible scores s.

Definition (Lean source)
noncomputable def scoreCost (μ : Measure ℝ) (x : ℝ) : ℝ := sInf {c : ℝ | ∃ s, FeasibleScore μ x s ∧ c = ∫ y, s y ^ 2 ∂μ}
Causalean.Stat.MomentProblems.ScoreProgram.scoreCost · Causalean/Stat/Nonparametric/MomentProblems/ScoreProgram/ScoreProgram.lean:75
theorem scoreCost_eq reviewed
Causalean.Stat.MomentProblems.ScoreProgram

The score-program duality (headline). For a probability measure μ on with a finite fourth moment and first moment squared strictly below the second moment (positive variance), if moreover the closed-form residual l2ResidualQuadratic μ is positive, then for every target -moment x, the value of the constrained minimum-norm score program equals x² / l2ResidualQuadratic μ:

Formal statement
h :
hnd :
moment μ 1 ^ 2 < moment μ 2
hr :
x :
scoreCost μ x = x ^ 2 / l2ResidualQuadratic μ
Proof (Lean source)
theorem scoreCost_eq (μ : Measure ℝ) [IsProbabilityMeasure μ] (h : FiniteMoment4 μ) (hnd : moment μ 1 ^ 2 < moment μ 2) (hr : 0 < l2ResidualQuadratic μ) (x : ℝ) : scoreCost μ x = x ^ 2 / l2ResidualQuadratic μ := by have hmem : x ^ 2 / l2ResidualQuadratic μ ∈ {c : ℝ | ∃ s, FeasibleScore μ x s ∧ c = ∫ y, s y ^ 2 ∂μ} := ⟨optScore μ x, optScore_feasible μ h hnd hr x, (optScore_cost μ h hnd hr x).symm⟩ have hlb : x ^ 2 / l2ResidualQuadratic μ ∈ lowerBounds {c : ℝ | ∃ s, FeasibleScore μ x s ∧ c = ∫ y, s y ^ 2 ∂μ} := by rintro c ⟨s, hs, rfl⟩ exact feasibleScore_cost_lower_bound μ h hnd hr x hs exact IsLeast.csInf_eq ⟨hmem, hlb⟩
3 supporting declarations (lemmas, instances)