GaussianAnalysisRocq library documentation
Main resultsGlossary
On this page
GaussianAnalysisconvexleast_squares

Constrained least squares with features, and regular features

GaussianAnalysis.convex.least_squareslibrary/convex/least_squares.v254 lines9 lemmas and theorems, 7 definitionssource
Imports 3 library modules and 17 external

External: HB.structures, mathcomp.classical.all_ssreflect_compat, mathcomp.algebra.algebraic_hierarchy.ssralg, mathcomp.algebra.numeric_hierarchy.ssrnum, mathcomp.algebra.matrix, mathcomp.algebra.sesquilinear, mathcomp.classical.boolp, mathcomp.classical.classical_sets, mathcomp.classical.functions, mathcomp.reals.reals, mathcomp.analysis.ereal, mathcomp.analysis.topology_theory.topology, mathcomp.analysis.normedtype_theory.normedtype, mathcomp.analysis.measure_theory.measure, mathcomp.analysis.lebesgue_measure, mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral, mathcomp.analysis.probability_theory.probability

Imported by 9
Required by 17 files of the paper proofs

The objects of the Lindeberg argument of Koehler and Sohn (Universality and sharp thresholds for ellipsoid fitting, arXiv 2608.27372, section 2.2): n features Z_1, ..., Z_n in 'rV[R]_N, the ridge-regularized least squares objective in (theta, b), its infimum over theta in a convex set D with an optional barrier B, and the regular features of their Definition 2.5. Features are n-tuples, so that their law is tuple_prod of probability/lindeberg.v; <x, y> is mxdot x y and |x|^2 is mxdot x x.

ls_objective Z lambda beta theta bF_Z(theta, b; beta), the average (2 n)^-1 sum_i (b - <Z_i, theta>)^2 plus the ridge term beta (lambda |theta|^2 + b^2)
ls_loss Z P theta bsum_(i in P) (b - <Z_i, theta>)^2
ls_ridge Z P s lambda beta theta bs ls_loss Z P theta b + beta (lambda |theta|^2 + b^2)
ls_barrier_objective Z P s lambda beta gamma B theta bls_ridge Z P s lambda beta theta b + gamma B theta; with P the indices other than i and s = (2 n)^-1, the leave-one-out objective F^(i) of the paper
ls_barrier_value Z lambda beta D gamma BPhi_Z(D, B; beta, gamma), the infimum of F_Z(theta, b; beta) + gamma B theta over theta in D and b real
ls_value Z lambda beta DPhi_Z(D; beta), the infimum of F_Z(theta, b; beta) over theta in D and b real; Phi_Z(D) is ls_value Z lambda 0 D, for any lambda
regular_feature K tau Sigma muthe law mu on 'rV[R]_N is a (K, tau)-regular feature with covariance Sigma: lambda = opnorm Sigma > 0, (F1) E <Z, theta>^4 <= K^4 lambda^2 |theta|^4, mean 0, E <Z, theta> <Z, theta'> = theta Sigma theta'^T and (F2) Var (Z T Z^T) <= tau^2 |T|_F^2 for T symmetric

The paper's lambda is the operator norm opnorm Sigma; the definitions take it as a parameter, so that they do not depend on a law.

Main results, for lambda, beta, gamma >= 0 and B >= 0 on D:

Over an empty D both values are 0 (ls_barrier_value_empty).

Elsewhere in the library. The values are measurable functions of the n-tuple Z when D is nonempty, convex and relatively open and B >= 0 is continuous on D (measurable_ls_barrier_value in barrier_lindeberg.v, measurable_ls_value in ridge_comparison.v), and so is the minimizer (measurable_ls_min, probability/measurable_minimizer.v). For a regular feature, the fourth moments of the linear forms are finite and every measurable g with |g z| <= a + b |z|^4 is integrable (reg_int4, reg_integrable in feature_moments.v); under the hypotheses of Theorem 2.9, Phi_Z(D, B; beta, gamma) is integrable for n independent regular features (int_Phi, barrier_lindeberg.v). Gaussian features are regular (gauss_regular_feature, gauss_feature.v).

Main results

ResultsStatement
The least squares objective with a selection P of the features and a weight s: s sum_(i in P) (b - <Z_i, theta>)^2 + beta (lambda |theta|^2 + b^2) + gamma B theta; with P the indices other than i and s = 1 / (2 n) it is the leave-one-out objective of the Lindeberg argument.

Declarations16 exported

lemma, theoremdefinitioninstancelocal
sectionleast_squares
Context {R : realType} {N : nat}.
Implicit Types (D : set 'rV[R]_N) (B : 'rV[R]_N -> R).
Type
forall {R : realType} {N : nat} [n : nat], n.-tuple 'rV_N -> R -> R -> 'rV_N -> R -> R
Definition
Definition ls_objective n (Z : n.-tuple 'rV[R]_N) (lambda beta : R)
    (theta : 'rV[R]_N) (b : R) : R :=
  (n%:R *+ 2)^-1 * \sum_(i < n) (b - mxdot (tnth Z i) theta) ^+ 2 +
  beta * (lambda * mxdot theta theta + b ^+ 2).
Used by 19 declarations in 5 files
definition ls_loss main result source, line 90
Type
forall {R : realType} {N : nat} [n : nat], n.-tuple 'rV_N -> pred 'I_n -> 'rV_N -> R -> R
Definition
Definition ls_loss n (Z : n.-tuple 'rV[R]_N) (P : pred 'I_n)
    (theta : 'rV[R]_N) (b : R) : R :=
  \sum_(i < n | P i) (b - mxdot (tnth Z i) theta) ^+ 2.
Main result, as the README states it

The least squares objective with a selection P of the features and a weight s: s sum_(i in P) (b - <Z_i, theta>)^2 + beta (lambda |theta|^2 + b^2) + gamma B theta; with P the indices other than i and s = 1 / (2 n) it is the leave-one-out objective of the Lindeberg argument.

Used by 9 declarations in 5 files
definition ls_ridge main result source, line 94
Type
forall {R : realType} {N : nat} [n : nat],
n.-tuple 'rV_N -> pred 'I_n -> R -> R -> R -> 'rV_N -> R -> R
Definition
Definition ls_ridge n (Z : n.-tuple 'rV[R]_N) (P : pred 'I_n)
    (s lambda beta : R) (theta : 'rV[R]_N) (b : R) : R :=
  s * ls_loss Z P theta b + beta * (lambda * mxdot theta theta + b ^+ 2).
Main result

Stated in the README together with ls_loss.

Used by 22 declarations in 5 files
definition ls_barrier_objective main result source, line 98
Type
forall {R : realType} {N : nat} [n : nat],
n.-tuple 'rV_N -> pred 'I_n -> R -> R -> R -> R -> ('rV_N -> R) -> 'rV_N -> R -> R
Definition
Definition ls_barrier_objective n (Z : n.-tuple 'rV[R]_N) (P : pred 'I_n)
    (s lambda beta gamma : R) B (theta : 'rV[R]_N) (b : R) : R :=
  ls_ridge Z P s lambda beta theta b + gamma * B theta.
Main result

Stated in the README together with ls_loss.

Used by 16 declarations in 4 files
Type
forall {R : realType} {N : nat} [n : nat],
n.-tuple 'rV_N -> R -> R -> set 'rV_N -> R -> ('rV_N -> R) -> R
Definition
Definition ls_barrier_value n (Z : n.-tuple 'rV[R]_N) (lambda beta : R) D
    (gamma : R) B : R :=
  inf [set ls_objective Z lambda beta theta b + gamma * B theta |
       theta in D & b in [set: R]].
Used by 23 declarations in 5 files
Type
forall {R : realType} {N : nat} [n : nat], n.-tuple 'rV_N -> R -> R -> set 'rV_N -> R
Definition
Definition ls_value n (Z : n.-tuple 'rV[R]_N) (lambda beta : R) D : R :=
  inf [set ls_objective Z lambda beta theta b | theta in D & b in [set: R]].
Used by 8 declarations in 3 files
sectionleast_squares_values
Context {R : realType} {N : nat}.
Implicit Types (D : set 'rV[R]_N) (B : 'rV[R]_N -> R).
forall {R : realType} {N : nat} [n : nat] (Z : n.-tuple 'rV_N) 
  [lambda beta : R] (th : 'rV_N) (b : R),
0 <= lambda -> 0 <= beta -> 0 <= ls_objective Z lambda beta th b
Statement as written in the source
Lemma ls_objective_ge0 n (Z : n.-tuple 'rV[R]_N) (lambda beta : R) th b :
  0 <= lambda -> 0 <= beta -> 0 <= ls_objective Z lambda beta th b.
Used by 5 declarations in 3 files
forall {R : realType} {N : nat} [n : nat] (Z : n.-tuple 'rV_N) 
  (lambda beta : R) (D : set 'rV_N) (B : 'rV_N -> R),
ls_value Z lambda beta D = ls_barrier_value Z lambda beta D 0 B

Phi_Z(D; beta) is the value with a barrier of weight 0.

Main result

Stated in the README together with measurable_ls_value.

Statement as written in the source
Lemma ls_value_barrierE n (Z : n.-tuple 'rV[R]_N) (lambda beta : R)
    (D : set 'rV[R]_N) (B : 'rV[R]_N -> R) :
  ls_value Z lambda beta D = ls_barrier_value Z lambda beta D 0 B.
Used by 4 declarations in 2 files
forall {R : realType} {N : nat} [n : nat] (Z : n.-tuple 'rV_N) 
  (lambda beta : R) [D : set 'rV_N] (gamma : R) (B : 'rV_N -> R),
~ (D !=set0) -> ls_barrier_value Z lambda beta D gamma B = 0
Statement as written in the source
Lemma ls_barrier_value_empty n (Z : n.-tuple 'rV[R]_N) (lambda beta : R) D
    (gamma : R) B :
  ~ (D !=set0) -> ls_barrier_value Z lambda beta D gamma B = 0.
Used by 2 declarations in 1 file
forall {R : realType} {N : nat} [n : nat] (Z : n.-tuple 'rV_N) 
  [lambda beta : R] [D : set 'rV_N] [gamma : R] [B : 'rV_N -> R] 
  [th : 'rV_N] (b : R),
0 <= lambda ->
0 <= beta ->
0 <= gamma ->
(forall z : 'rV_N, D z -> 0 <= B z) ->
D th ->
ls_barrier_value Z lambda beta D gamma B <= ls_objective Z lambda beta th b + gamma * B th
Statement as written in the source
Lemma ls_barrier_value_le n (Z : n.-tuple 'rV[R]_N) (lambda beta : R) D
    (gamma : R) B th b :
  0 <= lambda -> 0 <= beta -> 0 <= gamma -> (forall z, D z -> 0 <= B z) ->
  D th ->
  ls_barrier_value Z lambda beta D gamma B <=
    ls_objective Z lambda beta th b + gamma * B th.
Used by 1 declaration in 1 file
forall {R : realType} {N : nat} [n : nat] (Z : n.-tuple 'rV_N) 
  [lambda beta : R] [D : set 'rV_N] [gamma : R] [B : 'rV_N -> R],
0 <= lambda ->
0 <= beta ->
0 <= gamma ->
(forall z : 'rV_N, D z -> 0 <= B z) -> 0 <= ls_barrier_value Z lambda beta D gamma B
Statement as written in the source
Lemma ls_barrier_value_ge0 n (Z : n.-tuple 'rV[R]_N) (lambda beta : R) D
    (gamma : R) B :
  0 <= lambda -> 0 <= beta -> 0 <= gamma -> (forall z, D z -> 0 <= B z) ->
  0 <= ls_barrier_value Z lambda beta D gamma B.
Used by 1 declaration in 1 file
forall {R : realType} {N : nat} [n : nat] (Z : n.-tuple 'rV_N) 
  [lambda beta beta' : R] [D : set 'rV_N] [gamma : R] [B : 'rV_N -> R],
0 <= lambda ->
0 <= beta ->
beta <= beta' ->
0 <= gamma ->
(forall z : 'rV_N, D z -> 0 <= B z) ->
ls_barrier_value Z lambda beta D gamma B <= ls_barrier_value Z lambda beta' D gamma B
Statement as written in the source
Lemma ls_barrier_value_mono n (Z : n.-tuple 'rV[R]_N) (lambda beta beta' : R)
    D (gamma : R) B :
  0 <= lambda -> 0 <= beta -> beta <= beta' -> 0 <= gamma ->
  (forall z, D z -> 0 <= B z) ->
  ls_barrier_value Z lambda beta D gamma B <=
    ls_barrier_value Z lambda beta' D gamma B.
Used by 1 declaration in 1 file
forall {R : realType} {N : nat} [n : nat] (Z : n.-tuple 'rV_N) 
  [lambda beta : R] [D : set 'rV_N] [th : 'rV_N] (b : R),
0 <= lambda ->
0 <= beta -> D th -> ls_value Z lambda beta D <= ls_objective Z lambda beta th b
Statement as written in the source
Lemma ls_value_le n (Z : n.-tuple 'rV[R]_N) (lambda beta : R) D th b :
  0 <= lambda -> 0 <= beta -> D th ->
  ls_value Z lambda beta D <= ls_objective Z lambda beta th b.
forall {R : realType} {N : nat} [n : nat] (Z : n.-tuple 'rV_N) 
  [lambda beta : R] (D : set 'rV_N),
0 <= lambda -> 0 <= beta -> 0 <= ls_value Z lambda beta D
Statement as written in the source
Lemma ls_value_ge0 n (Z : n.-tuple 'rV[R]_N) (lambda beta : R) D :
  0 <= lambda -> 0 <= beta -> 0 <= ls_value Z lambda beta D.
forall {R : realType} {N : nat} [n : nat] (Z : n.-tuple 'rV_N) 
  [lambda beta beta' : R] (D : set 'rV_N),
0 <= lambda ->
0 <= beta -> beta <= beta' -> ls_value Z lambda beta D <= ls_value Z lambda beta' D
Statement as written in the source
Lemma ls_value_mono n (Z : n.-tuple 'rV[R]_N) (lambda beta beta' : R) D :
  0 <= lambda -> 0 <= beta -> beta <= beta' ->
  ls_value Z lambda beta D <= ls_value Z lambda beta' D.
sectionregular_feature
Context {R : realType} {N : nat}.
Local Open Scope ereal_scope.
Type
forall {R : realType} {N : nat}, R -> R -> 'M_N -> probability 'rV_N R -> Prop
Definition
Definition regular_feature (K tau : R) (Sigma : 'M[R]_N)
    (mu : probability 'rV[R]_N R) : Prop :=
  [/\ (0 < opnorm Sigma)%R,
      forall theta : 'rV[R]_N,
        'E_mu[fun z => (mxdot z theta ^+ 4)%R] <=
          (K ^+ 4 * opnorm Sigma ^+ 2 * mxdot theta theta ^+ 2)%:E,
      forall theta : 'rV[R]_N, 'E_mu[fun z => mxdot z theta] = 0,
      forall theta theta' : 'rV[R]_N,
        'E_mu[fun z => (mxdot z theta * mxdot z theta')%R] =
          (mxdot (theta *m Sigma) theta')%:E &
      forall T : 'M[R]_N, T \is symmetricmx ->
        'V_mu[fun z => mxdot z (z *m T)] <= (tau ^+ 2 * frobenius T ^+ 2)%:E].
Used by 12 declarations in 3 files
Generated from commit 9046883 (tag phase12) of the ellipsoid fitting repository. Signatures are printed by Rocq 9.1.1; links in the source statements come from the compiled .glob files. The source links open the files on GitHub at this commit, in the now-public repository.