Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Common extremizer for Theorem B: hidden direction, first support, and the five-strategy outputs

Definition
CommonExtremizer

by Somehow · Oct 9, 2026 · Mathlib 0df444a (Lean v4.33.1)

rational-momentum-nag

This module sets up the single extremal function on which all five strategies are evaluated in Theorem B. It fixes the ambient space RD\mathbb R^{D}RD with D=2N+1D = 2N+1D=2N+1 (spelled GridSpace N), introduces the predicate HasFirstSupport N z, meaning that all coordinates of zzz with index ≥N\ge N≥N vanish — the vectors supported in the first NNN coordinate directions — and defines the sequence nagE with e0=0e_0 = 0e0​=0 and ek+1=dk+1e_{k+1} = d_k + 1ek+1​=dk​+1, recording the yyy-iterates of the rational-NAG run on the extremizer: the gradient step from xkx_kxk​ is −cu-cu−cu, hence yk+1=(dk+1)cuy_{k+1} = (d_k+1)cuyk+1​=(dk​+1)cu. The five strategy outputs are packaged by portfolioOutput, which maps gd and halfGD to their final iterates on oracleOf (liftedHuber u N), nag to the NAG output nagX (liftedHuber u N) 1 0 N, rand to the fixed-seed random-search output for the query list qqq, and grid to the grid-then-refine output.

Definition code
-- Generated from F:/20261008/FullFormalization\FullFormalization\CommonExtremizer.lean by skeleton subtraction (Phase 3-4):
-- every unselected declaration deleted, project imports rewritten.
/-
  FullFormalization.CommonExtremizer

  Source: `auditable_full_proof_nag_and_five_algorithm_cn.md`, sections 27-31:
  the common extremizer that gives the lower bound of Theorem B.

  The setting is section 23: `L = 1`, `R = 1`, `x_init = 0`, and the ambient
  space is `EuclideanSpace ℝ (Fin D)` with `D = 2N+1`.  Section 24 produces the
  unit *hidden direction* `u` (first `N` coordinates zero, orthogonal to every
  predetermined random-search query), and sections 25-26 build the extremal
  function

      f_N(z) = H_c(⟪u,z⟫ - 1) + (1/2)‖z - ⟪u,z⟫ u‖²,   c = 1/(2 d_N + 1),

  which is convex, differentiable, globally 1-smooth, with unique minimiser `u`
  and `f_N(u) = 0` (`LiftedHuber.lean`).  This file runs the five strategies on
  that one function:

  * (27) the rational-NAG iterates are `x_k = d_k c u` for `k ≤ N`, all in the
    Huber linear region `⟪u,x_k⟫ = d_k c ≤ d_N c < 1 - c`, and
    `q_{NAG,N}(f_N) = 1/(2(2 d_N+1)) = tau_N` — the *upper* bound is attained;
  * (28) GD with step `1/L = 1` outputs `N c u`, and
    `q_{GD,N} - tau_N = (d_N - N)/(2 d_N+1)²  ≥ 0`; half-GD outputs `(Nc/2) u`
    with `q_{halfGD,N} - tau_N = (d_N - N/2)/(2 d_N+1)² ≥ 0`;
  * (29) every fixed-seed query lies in `u^⊥`, so `f_N(q_i) = B_N + ½‖q_i‖² ≥ B_N`;
    the output is one of the queries, so `q_{rand,N} ≥ B_N > tau_N`;
  * (30) every grid-then-refine query touches only the first `N` coordinates,
    hence lies in `u^⊥`; `f_N(z) = B_N + ½‖z‖²` there, so the origin stays the
    incumbent through both phases — the decision logic is *proved*, not assumed —
    and `q_{grid,N} = B_N > tau_N`;
  * (31) the minimum of the five losses is therefore exactly `tau_N`: the
    portfolio value coincides with the NAG value on this single function.

  Everything is proved for an arbitrary unit `u` with vanishing first `N`
  coordinates and an arbitrary orthogonal query list, so the construction is
  uniform in `u`; `exists_extremizer` then produces such a `u` from
  `HiddenDirection.exists_unit_hidden_direction`, and `theoremB_sup_eq_tau`
  turns the result into the `sup = tau_N` statement given the universal upper
  bound of section 22 as a hypothesis.

  Nothing is postulated: no `sorry`, `admit`, `axiom` or `unsafe`.
-/

import Mathlib
import Mathlib.Analysis.Calculus.Deriv.MeanValue
import Mathlib.Analysis.Convex.Deriv
import Mathlib.Analysis.InnerProductSpace.Dual
import Definitions.Def_Certificate
import Definitions.Def_Coefficients
import Definitions.Def_FunctionClass
import Definitions.Def_GradientStrategies
import Definitions.Def_GridRefine
import Definitions.Def_HiddenDirection
import Definitions.Def_LiftedHuber
import Definitions.Def_PortfolioDefinitions
import Definitions.Def_RandomSearch
import Definitions.Def_RationalNAG

open scoped Gradient RealInnerProductSpace Topology
open Set

set_option linter.unusedSectionVars false

namespace FullFormalization

noncomputable section

/-! ### Scalars: the cutoff `c = 1/(2 d_N+1)` and the value `B_N` -/





















/-! ### The value of `f_N` on vectors orthogonal to `u`

`LiftedHuber.liftedHuber_eq` gives `f_N(z) = H_c(⟪u,z⟫-1) + ½‖z - ⟪u,z⟫u‖²`;
on `u^⊥` the first term is the constant `H_c(-1) = c - c²/2 = B_N` (26.5)-(26.6)
and the second is `½‖z‖²`. -/







/-! ### The hidden direction and the first-coordinate support

`HiddenDirection.exists_unit_hidden_direction` supplies `u` with `‖u‖ = 1`,
`u j = 0` for every coordinate `j` with `j < N`, and `⟪u, q i⟫ = 0` for every
predetermined query.  Vectors whose coordinates `≥ N` vanish are exactly the
vectors of the source's "first `N` coordinate directions", and they are all
orthogonal to `u`. -/

/-- A vector of `GridSpace N` whose coordinates `≥ N` vanish: its support lies in
the first `N` coordinate directions. -/
def HasFirstSupport (N : ℕ) (z : GridSpace N) : Prop :=
  ∀ j : Fin (gridDim N), N ≤ j.val → z j = 0













/-! ### Section 27: the NAG trajectory on the extremizer -/

/-- The `y`-sequence of the NAG run: `e_0 = 0` and `e_{k+1} = d_k + 1`.  The
gradient step from `x_k` is `-c u`, so `y_{k+1} = x_k + c u = (d_k+1) c u`. -/
def nagE : ℕ → ℝ
  | 0 => 0
  | k + 1 => d k + 1















/-! ### Section 28: the two gradient-descent strategies -/

























/-! ### Section 29: fixed-seed random search -/











/-! ### Section 30: grid-then-refine -/



























/-! ### Section 31: the five algorithms combined -/

/-- The five strategy outputs on the extremizer built from `u`, with the
predetermined random-search query list `q`. -/
noncomputable def portfolioOutput (N : ℕ) (u : GridSpace N) (q : Fin N → GridSpace N)
    (hN : 0 < N) : Strategy → GridSpace N
  | Strategy.gd => GD.out (oracleOf (liftedHuber u N)) 1 N
  | Strategy.halfGD => halfGD.out (oracleOf (liftedHuber u N)) 1 N
  | Strategy.nag => nagX (liftedHuber u N) 1 0 N
  | Strategy.rand => RandomSearch.out (oracleOf (liftedHuber u N)) q hN
  | Strategy.grid => GridRefine.out N (oracleOf (liftedHuber u N))





















end

end FullFormalization
Source
《有理动量 Nesterov 紧界与半径归一化五算法共同最坏情形 — 可审计完整证明稿》 (manuscript, 2026-10-08), §27-31 (with the dimension (23.1) of §23 and the conditions (24.1)-(24.2) of §24); Lean: FullFormalization.CommonExtremizer lines 1-252

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, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me