Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

M09 — Trajectory equivalence

Proved
VathekProof.M09_trajectory_equivalence

by ajax · Sep 22, 2026 · Mathlib 0df444a (Lean v4.33.1)

formal-verificationgradient-descentmachine-learning

Iterating the one-step equivalence preserves trajectories. Given one deterministic sequence of frames ξk\xi_kξk​, a valid tile partition Bk\mathcal{B}_kBk​ per step (the tile decomposition may change from step to step), and derivative certificates available at every pre-update point along the run, the tiled evaluator and the monolithic evaluator produce the same training state after any number nnn of logical steps from the same initial state:

Run⁡tile(n)=Run⁡mono(n).\operatorname{Run}_{\mathrm{tile}}(n) = \operatorname{Run}_{\mathrm{mono}}(n).Runtile​(n)=Runmono​(n).

The proof is induction on nnn, using the one-step equality at whatever state the run has reached; no convergence, learning, or stability claim is made or needed.

Preamble
import Definitions.Def_VathekFrame
import Definitions.Def_VathekState
import Definitions.Def_VathekAdamW
import Definitions.Def_VathekWitness
Formal statement
namespace VathekProof

/-- **M09 — Trajectory equivalence.**  With one deterministic frame sequence, per-step
valid tile partitions, and derivative certificates available at every reachable
pre-update point, the tiled and monolithic evaluators produce the same state
trajectory over any number of logical steps — the tile decomposition may differ from
step to step and the equality of every one-step transition is preserved by
induction. -/
theorem M09_trajectory_equivalence (d m : ℕ) (ι : Type*) [DecidableEq ι]
    (ξ : ℕ → Frame d m ι) (𝔅 : ℕ → List (Finset ι))
    (hpart : ∀ k, IsTilePartition (ξ k).I (𝔅 k))
    (Dof : ∀ (k : ℕ) (S : TrainState d), FrameDeriv d m ι (ξ k) S.w)
    (T : Finset (Fin d)) (c : ℝ)
    (U : TrainState d → EuclideanSpace ℝ (Fin d) → TrainState d)
    (S₀ : TrainState d) (n : ℕ) :
    runFrom (tiledRun d m ι ξ 𝔅 Dof T c U) n S₀
      = runFrom (monoRun d m ι ξ T c U) n S₀ := by sorry

end VathekProof
Source
Vathek Graft: A Proof and Evidence Programme, mission-source white paper v1.0, 22 September 2026 (Thomas Davis). Section 5, Theorem T0 (trajectory clause of Eq. 5); milestone M09.
Read-back

What the Lean code literally says, in plain math · glm-5.3 (independent auditor subagent)

{'text': '{\n "readback": "Theorem M09_trajectory_equivalence. Fix arbitrary natural numbers ddd and mmm, and write W=mathbbRdW = \\\\mathbb{R}^dW=mathbbRd and V=mathbbRmV = \\\\mathbb{R}^mV=mathbbRm for the corresponding Euclidean spaces. Fix an arbitrary type iota\\\\iotaiota (an index type for \"occurrences\"; it may be finite, infinite, or empty), assumed to carry decidable equality. The theorem asserts, for every choice of:\n\n- a frame schedule xi=(xik)kinmathbbN\\\\xi = (\\\\xi_k)_{k \\\\in \\\\mathbb{N}}xi=(xik​)kinmathbbN​, where each frame xik\\\\xi_kxik​ is a quadruple big(hk,,fk,,alphak,,Ikbig)\\\\big(h_k,\\\\, f_k,\\\\, \\\\alpha_k,\\\\, I_k\\\\big)big(hk​,,fk​,,alphak​,,Ik​big) consisting of an arbitrary map hk:WtoVh_k : W \\\\to Vhk​:WtoV (the shared computation; no regularity is part of the data), per-occurrence loss maps fk,i:WtimesVtomathbbRf_{k,i} : W \\\\times V \\\\to \\\\mathbb{R}fk,i​:WtimesVtomathbbR, coefficients alphak:iotatomathbbR\\\\alpha_k : \\\\iota \\\\to \\\\mathbb{R}alphak​:iotatomathbbR, and a finite occurrence set IksubseteqiotaI_k \\\\subseteq \\\\iotaIk​subseteqiota;\n- a tile-partition schedule mathfrakB=(mathfrakBk)kinmathbbN\\\\mathfrak{B} = (\\\\mathfrak{B}_k)_{k \\\\in \\\\mathbb{N}}mathfrakB=(mathfrakBk​)kinmathbbN​, each mathfrakBk\\\\mathfrak{B}_kmathfrakBk​ being a finite list of finite subsets (\"tiles\") of iota\\\\iotaiota;\n- the hypothesis hmathrmparth_{\\\\mathrm{part}}hmathrmpart​: for every kkk, the tiles of mathfrakBk\\\\mathfrak{B}_kmathfrakBk​ are pairwise disjoint and their union is exactly IkI_kIk​ (so every tile is a subset of IkI_kIk​; tiles may be empty, and the empty list is permitted only in that its union is varnothing\\\\varnothingvarnothing, which forces Ik=varnothingI_k = \\\\varnothingIk​=varnothing);\n- the hypothesis DmathrmofD_{\\\\mathrm{of}}Dmathrmof​: for every step index kinmathbbNk \\\\in \\\\mathbb{N}kinmathbbN and every training state SSS, a derivative-certificate bundle for the frame xik\\\\xi_kxik​ at the point S.wS.wS.w (its contents are listed in full below);\n- a finite set Tsubseteq0,dots,d−1T \\\\subseteq \\\\{0, \\\\dots, d-1\\\\}Tsubseteq0,dots,d−1 of \"trainable\" coordinates;\n- a real number ccc (no sign hypothesis);\n- an arbitrary deterministic optimizer U:textStatetoWtotextStateU : \\\\text{State} \\\\to W \\\\to \\\\text{State}U:textStatetoWtotextState;\n- an initial state S0S_0S0​ and a step count ninmathbbNn \\\\in \\\\mathbb{N}ninmathbbN;\n\nthat\n\n

operatornamerunFrom(texttiled,,n,,S0);=;operatornamerunFrom(textmono,,n,,S0),\\\\operatorname{runFrom}(\\\\text{tiled},\\\\, n,\\\\, S_0) \\\\;=\\\\; \\\\operatorname{runFrom}(\\\\text{mono},\\\\, n,\\\\, S_0),operatornamerunFrom(texttiled,,n,,S0​);=;operatornamerunFrom(textmono,,n,,S0​),

\n\nan equality of complete training states, where \"tiled\" and \"mono\" are the two transition systems defined below. Both sides use the same xi\\\\xixi, TTT, ccc, UUU, S0S_0S0​ and nnn; only the tiled side additionally depends on mathfrakB\\\\mathfrak{B}mathfrakB and DmathrmofD_{\\\\mathrm{of}}Dmathrmof​.\n\nTraining states. A state SintextStateS \\\\in \\\\text{State}SintextState is a quadruple (w,mu1,mu2,t)(w, \\\\mu_1, \\\\mu_2, t)(w,mu1​,mu2​,t) with w,mu1,mu2inmathbbRdw, \\\\mu_1, \\\\mu_2 \\\\in \\\\mathbb{R}^dw,mu1​,mu2​inmathbbRd (logical parameters, first-moment slots, second-moment slots) and a step counter tinmathbbNt \\\\in \\\\mathbb{N}tinmathbbN. The asserted equality is equality of the entire state after nnn steps — parameters, both moment vectors, and the counter — not just of the parameters.\n\nWhat operatornamerunFrom(textstep,n,S0)\\\\operatorname{runFrom}(\\\\text{step}, n, S_0)operatornamerunFrom(textstep,n,S0​) asserts. For a transition operatornamestep:textStatetomathbbNtotextState\\\\operatorname{step} : \\\\text{State} \\\\to \\\\mathbb{N} \\\\to \\\\text{State}operatornamestep:textStatetomathbbNtotextState,\n\n

operatornamerunFrom(operatornamestep,0,S)=S,qquadoperatornamerunFrom(operatornamestep,n+1,S)=operatornamerunFrom(operatornamestep,n,,operatornamestep(S,n)).\\\\operatorname{runFrom}(\\\\operatorname{step}, 0, S) = S, \\\\qquad \\\\operatorname{runFrom}(\\\\operatorname{step}, n+1, S) = \\\\operatorname{runFrom}(\\\\operatorname{step}, n,\\\\, \\\\operatorname{step}(S, n)).operatornamerunFrom(operatornamestep,0,S)=S,qquadoperatornamerunFrom(operatornamestep,n+1,S)=operatornamerunFrom(operatornamestep,n,,operatornamestep(S,n)).

\n\nUnrolling, nnn transitions are applied, consuming the schedule index n−1n-1n−1 first and index 000 last: operatornamerunFrom(operatornamestep,n,S0)=operatornamestep(cdotsoperatornamestep(operatornamestep(S0,,n−1),,n−2)cdots,,0)\\\\operatorname{runFrom}(\\\\operatorname{step}, n, S_0) = \\\\operatorname{step}(\\\\cdots \\\\operatorname{step}(\\\\operatorname{step}(S_0,\\\\, n-1),\\\\, n-2) \\\\cdots,\\\\, 0)operatornamerunFrom(operatornamestep,n,S0​)=operatornamestep(cdotsoperatornamestep(operatornamestep(S0​,,n−1),,n−2)cdots,,0). Only the frames, partitions, and certificates at indices 0,dots,n−10, \\\\dots, n-10,dots,n−1 are ever read; the hypotheses hmathrmparth_{\\\\mathrm{part}}hmathrmpart​ and DmathrmofD_{\\\\mathrm{of}}Dmathrmof​ are nonetheless demanded at every index kinmathbbNk \\\\in \\\\mathbb{N}kinmathbbN, including indices no nnn-step run reaches. At n=0n = 0n=0 both sides of the theorem are literally S0S_0S0​, so the statement includes the degenerate case n=0n = 0n=0 in which it reduces to S0=S0S_0 = S_0S0​=S0​.\n\nThe two transitions. Both take a current state SSS and a schedule index kkk, compute a gradient vector ginmathbbRdg \\\\in \\\\mathbb{R}^dginmathbbRd, and return Ubig(S,,operatornameclipc(PT,g)big)U\\\\big(S,\\\\, \\\\operatorname{clip}_c(P_T\\\\, g)\\\\big)Ubig(S,,operatornameclipc​(PT​,g)big) — the optimizer UUU is applied exactly once per step, to the pre-update state SSS. Here PTP_TPT​ is the coordinate mask (PT,g)j=gj(P_T\\\\, g)_j = g_j(PT​,g)j​=gj​ if jinTj \\\\in TjinT and 000 otherwise, and\n\n

\\\\operatorname{clip}_c(g) = \\\\begin{cases} g & \\\\text{if } \\\\|g\\\\| \\\\le c, \\\\\\\\\\\\\\\\ \\\\dfrac{c}{\\\\|g\\\\|}\\\\, g & \\\\text{otherwise}, \\\\end{cases}

\n\ntaken verbatim as a total function: no sign is assumed on ccc, and division is total, so both branches are defined for every ggg (including g=0g = 0g=0). The two transitions differ only in how ggg is produced:\n\n- Monolithic gradient. g=gkmathrmmono(S)g = g^{\\\\mathrm{mono}}_k(S)g=gkmathrmmono​(S) is the vector representing the derivative of the logical objective\n

Lk(w);=;sumiinIkalphak(i)cdotfk,ibig(w,,hk(w)big)L_k(w) \\\\;=\\\\; \\\\sum_{i \\\\in I_k} \\\\alpha_k(i) \\\\cdot f_{k,i}\\\\big(w,\\\\, h_k(w)\\\\big)Lk​(w);=;sumiinIk​​alphak​(i)cdotfk,i​big(w,,hk​(w)big)

\nat S.wS.wS.w — literally, the image of 1inmathbbR1 \\\\in \\\\mathbb{R}1inmathbbR under the adjoint of the Fréchet derivative DLk(S.w)D L_k(S.w)DLk​(S.w), i.e. its Riesz vector. The derivative operator is total: at a point where LkL_kLk​ fails to be differentiable it is defined to be the zero map, so gkmathrmmono(S)=0g^{\\\\mathrm{mono}}_k(S) = 0gkmathrmmono​(S)=0 there; the monolithic transition is thus defined for completely arbitrary frames, with no differentiability assumed.\n\n- Tiled gradient. g = g^{\\\\mathrm{tile}}_k(S) = A + (h\'_k)^{*}(C), where h\'_k is the continuous linear map supplied by the certificate bundle Dmathrmof(k,S)D_{\\\\mathrm{of}}(k, S)Dmathrmof​(k,S), (h\'_k)^{*} : V \\\\to W is its adjoint, and\n$$A \\;=\\; \\sum_{B \\in \\mathfrak{B}k}\\, \\sum{i \\in B} \\alpha_k(i)\\, \\mathbf{a}i \\;\\in\\; W, \\qquad C \\;=\\; \\sum{B \\in \\mathfrak{B}k}\\, \\sum{i \\in B} \\alpha_k(i)\\, \\mathbf{c}i \\;\\in\\; V,n\\nn\\mathbf{a}andandand\\mathbf{c}beingthedirect/sharedtablesofbeing the direct/shared tables ofbeingthedirect/sharedtablesofD{\\mathrm{of}}(k, S);thisiscomputedbyfoldingthetilelistleft−to−rightfromazeroaccumulator,eachtile; this is computed by folding the tile list left-to-right from a zero accumulator, each tile ;thisiscomputedbyfoldingthetilelistleft−to−rightfromazeroaccumulator,eachtileBaddingaddingadding\\sum_{i \\in B} \\alpha_k(i)\\,\\mathbf{a}itothedirectslotandto the direct slot andtothedirectslotand\\sum{i \\in B} \\alpha_k(i)\\,\\mathbf{c}itothesharedslot.(Thefoldalsomaintainsarunninglossto the shared slot. (The fold also maintains a running losstothesharedslot.(Thefoldalsomaintainsarunningloss\\sum \\alpha_k(i)\\,\\mathrm{val}(i),whichthetiledgradientdiscards:thevaluetable—andhenceitscertificate—doesnotenter, which the tiled gradient discards: the value table — and hence its certificate — does not enter ,whichthetiledgradientdiscards:thevaluetable—andhenceitscertificate—doesnotenterg^{\\mathrm{tile}}k.)nn∗∗Thecertificatebundle.)\\n\\n**The certificate bundle .)nn∗∗ThecertificatebundleD{\\mathrm{of}}(k, S)(at(at(atw_0 = S.w,fortheframe, for the frame ,fortheframe\\xi_k).∗∗Thehypothesissuppliesallofthefollowing:nn−acontinuouslinearmap).** The hypothesis supplies all of the following:\\n\\n- a continuous linear map ).∗∗Thehypothesissuppliesallofthefollowing:nn−acontinuouslinearmaph'k : W \\to V,certifiedtobetheFreˊchetderivativeof, certified to be the Fréchet derivative of ,certifiedtobetheFreˊchetderivativeofh_katatatw_0;n−avaluetable;\\n- a value table ;n−avaluetable\\mathrm{val} : \\iota \\to \\mathbb{R},certifiedby:, certified by: ,certifiedby:\\mathrm{val}(i) = f{k,i}\\big(w_0,\\, h_k(w_0)\\big)foreveryoccurrencefor every occurrenceforeveryoccurrencei \\in I_k;n−adirecttable;\\n- a direct table ;n−adirecttable\\mathbf{a} : \\iota \\to W,certifiedby:, certified by: ,certifiedby:\\mathbf{a}(i)isthegradientatis the gradient atisthegradientatw_0ofthemapof the mapofthemapw \\mapsto f{k,i}\\big(w,\\, h_k(w_0)\\big)(sharedslotfrozenatitspre−updatevalue)forevery(shared slot frozen at its pre-update value) for every(sharedslotfrozenatitspre−updatevalue)foreveryi \\in I_k;n−asharedtable;\\n- a shared table ;n−asharedtable\\mathbf{c} : \\iota \\to V,certifiedby:, certified by: ,certifiedby:\\mathbf{c}(i)isthegradientatis the gradient atisthegradientath_k(w_0)ofthemapof the mapofthemapv \\mapsto f_{k,i}(w_0, v)foreveryfor everyforeveryi \\in I_k;n−differentiabilityof;\\n- differentiability of ;n−differentiabilityoff_{k,i}atthepointat the pointatthepoint\\big(w_0, h_k(w_0)\\big)foreveryfor everyforeveryi \\in I_k.nn(Gradientofareal−valuedfunctiononEuclideanspace.\\n\\n(Gradient of a real-valued function on Euclidean space .nn(Gradientofareal−valuedfunctiononEuclideanspace=thevectorrepresentingitsderivative.)Allper−occurrencecertificatesaredemandedonlyforthe vector representing its derivative.) All per-occurrence certificates are demanded only forthevectorrepresentingitsderivative.)Allper−occurrencecertificatesaredemandedonlyfori \\in I_k;if; if ;ifI_k = \\varnothingtheyarevacuous.Thederivativecertificateforthey are vacuous. The derivative certificate fortheyarevacuous.Thederivativecertificateforh_katatatw_0,however,isdemandedunconditionally.nn∗∗Fineprintonthequantifiersanddegeneratecases.∗∗nn−, however, is demanded unconditionally.\\n\\n**Fine print on the quantifiers and degenerate cases.**\\n\\n- ,however,isdemandedunconditionally.nn∗∗Fineprintonthequantifiersanddegeneratecases.∗∗nn−D_{\\mathrm{of}}rangesover∗∗all∗∗statesranges over **all** statesrangesover∗∗all∗∗statesS,notonlystatesreachablefrom, not only states reachable from ,notonlystatesreachablefromS_0;sinceevery; since every ;sinceeveryw \\in \\mathbb{R}^disisisS.wforsomestate,thehypothesisineffectrequireseachfor some state, the hypothesis in effect requires eachforsomestate,thehypothesisineffectrequireseachh_ktoadmitaFreˊchetderivativeat∗∗every∗∗pointofto admit a Fréchet derivative at **every** point oftoadmitaFreˊchetderivativeat∗∗every∗∗pointof\\mathbb{R}^d,andtheoccurrence−wisevalue/gradient/differentiabilitydatatoexistatevery, and the occurrence-wise value/gradient/differentiability data to exist at every ,andtheoccurrence−wisevalue/gradient/differentiabilitydatatoexistateveryw_0(atthepoints(at the points(atthepoints(w_0, h_k(w_0))).Aschedulecontainingaframewhose). A schedule containing a frame whose ).Aschedulecontainingaframewhoseh_kisnoteverywheredifferentiablemakesthehypothesisunsatisfiable,andthetheoremisvacuousforthatschedule.n−is not everywhere differentiable makes the hypothesis unsatisfiable, and the theorem is vacuous for that schedule.\\n-isnoteverywheredifferentiablemakesthehypothesisunsatisfiable,andthetheoremisvacuousforthatschedule.n−nrangesoverallofranges over all ofrangesoverallof\\mathbb{N}includingincludingincludingn = 0(bothsidesthenequal(both sides then equal(bothsidesthenequalS_0).n−).\\n- ).n−Tmaybeempty:thenmay be empty: thenmaybeempty:thenP_Tsendseverygradienttosends every gradient tosendseverygradientto0,andbothtransitionsreducetothesamemap, and both transitions reduce to the same map ,andbothtransitionsreducetothesamemapS \\mapsto U\\big(S, \\operatorname{clip}c(0)\\big),identicalonthetwosidesregardlessof, identical on the two sides regardless of ,identicalonthetwosidesregardlessof\\xi,, ,\\mathfrak{B},, ,D{\\mathrm{of}}.(Likewise. (Likewise .(Likewised = 0forcesforcesforcesT = \\varnothing,, ,\\mathbb{R}^dbeingthetrivialspace.)n−Ifbeing the trivial space.)\\n- Ifbeingthetrivialspace.)n−IfI_k = \\varnothingforsomefor someforsomek(inparticularif(in particular if(inparticularif\\iotaisempty),thenis empty), thenisempty),thenA = 0andandandC = 0whilewhilewhileL_k \\equiv 0,sobothgradientformulasyield, so both gradient formulas yield ,sobothgradientformulasyield0ateverystateforthatindex.n−at every state for that index.\\n-ateverystateforthatindex.n−cisanarbitraryreal;foris an arbitrary real; forisanarbitraryreal;forc < 0thebranchthe branchthebranch\\|g\\| \\le cnever applies and the second branch, with its negative scalar, is used.\\n"\n}', 'details': {'resolvedPath': '/home/ajax/.omp/agent/sessions/-math/2026-09-22T19-31-08-510Z_01a0ca99-be5e-7000-93c6-dac7c74cc004/RB2-M09.md', 'contentType': 'text/markdown', 'totalLines': 3, 'displayContent': {'text': '{\n "readback": "**Theorem `M09_trajectory_equivalence`.** Fix arbitrary natural numbersdandandandm,andwrite, and write ,andwriteW = \\mathbb{R}^dandandandV = \\mathbb{R}^mforthecorrespondingEuclideanspaces.Fixanarbitrarytypefor the corresponding Euclidean spaces. Fix an arbitrary typeforthecorrespondingEuclideanspaces.Fixanarbitrarytype\\iota(anindextypefor"occurrences";itmaybefinite,infinite,orempty),assumedtocarrydecidableequality.Thetheoremasserts,for∗∗every∗∗choiceof:nn−a∗∗frameschedule∗∗(an index type for \\"occurrences\\"; it may be finite, infinite, or empty), assumed to carry decidable equality. The theorem asserts, for **every** choice of:\\n\\n- a **frame schedule**(anindextypefor"occurrences";itmaybefinite,infinite,orempty),assumedtocarrydecidableequality.Thetheoremasserts,for∗∗every∗∗choiceof:nn−a∗∗frameschedule∗∗\\xi = (\\xi_k){k \\in \\mathbb{N}},whereeachframe, where each frame ,whereeachframe\\xi_kisaquadrupleis a quadrupleisaquadruple\\big(h_k,\\, f_k,\\, \\alpha_k,\\, I_k\\big)consistingofanarbitrarymapconsisting of an arbitrary mapconsistingofanarbitrarymaph_k : W \\to V(thesharedcomputation;noregularityispartofthedata),per−occurrencelossmaps(the shared computation; no regularity is part of the data), per-occurrence loss maps(thesharedcomputation;noregularityispartofthedata),per−occurrencelossmapsf{k,i} : W \\times V \\to \\mathbb{R},coefficients, coefficients ,coefficients\\alpha_k : \\iota \\to \\mathbb{R},andafiniteoccurrenceset, and a finite occurrence set ,andafiniteoccurrencesetI_k \\subseteq \\iota;n−a∗∗tile−partitionschedule∗∗;\\n- a **tile-partition schedule** ;n−a∗∗tile−partitionschedule∗∗\\mathfrak{B} = (\\mathfrak{B}k){k \\in \\mathbb{N}},each, each ,each\\mathfrak{B}kbeingafinitelistoffinitesubsets("tiles")ofbeing a finite list of finite subsets (\\"tiles\\") ofbeingafinitelistoffinitesubsets("tiles")of\\iota;n−thehypothesis;\\n- the hypothesis ;n−thehypothesish{\\mathrm{part}}:for∗∗every∗∗: for **every** :for∗∗every∗∗k,thetilesof, the tiles of ,thetilesof\\mathfrak{B}karepairwisedisjointandtheirunionisexactlyare pairwise disjoint and their union is exactlyarepairwisedisjointandtheirunionisexactlyI_k(soeverytileisasubsetof(so every tile is a subset of(soeverytileisasubsetofI_k;tilesmaybeempty,andtheemptylistispermittedonlyinthatitsunionis; tiles may be empty, and the empty list is permitted only in that its union is ;tilesmaybeempty,andtheemptylistispermittedonlyinthatitsunionis\\varnothing,whichforces, which forces ,whichforcesI_k = \\varnothing);n−thehypothesis);\\n- the hypothesis );n−thehypothesisD{\\mathrm{of}}:for∗∗every∗∗stepindex: for **every** step index :for∗∗every∗∗stepindexk \\in \\mathbb{N}and∗∗every∗∗trainingstateand **every** training stateand∗∗every∗∗trainingstateS,aderivative−certificatebundlefortheframe, a derivative-certificate bundle for the frame ,aderivative−certificatebundlefortheframe\\xi_katthepointat the pointatthepointS.w(itscontentsarelistedinfullbelow);n−afiniteset(its contents are listed in full below);\\n- a finite set(itscontentsarelistedinfullbelow);n−afinitesetT \\subseteq \\{0, \\dots, d-1\\}of"trainable"coordinates;n−arealnumberof \\"trainable\\" coordinates;\\n- a real numberof"trainable"coordinates;n−arealnumberc(nosignhypothesis);n−anarbitrarydeterministicoptimizer(no sign hypothesis);\\n- an arbitrary deterministic optimizer(nosignhypothesis);n−anarbitrarydeterministicoptimizerU : \\text{State} \\to W \\to \\text{State};n−aninitialstate;\\n- an initial state ;n−aninitialstateS_0andastepcountand a step countandastepcountn \\in \\mathbb{N}$;\n\nthat\n\n

operatornamerunFrom(texttiled,,n,,S0);=;operatornamerunFrom(textmono,,n,,S0),\\\\operatorname{runFrom}(\\\\text{tiled},\\\\, n,\\\\, S_0) \\\\;=\\\\; \\\\operatorname{runFrom}(\\\\text{mono},\\\\, n,\\\\, S_0),operatornamerunFrom(texttiled,,n,,S0​);=;operatornamerunFrom(textmono,,n,,S0​),

\n\nan equality of complete training states, where \"tiled\" and \"mono\" are the two transition systems defined below. Both sides use the same xi\\\\xixi, TTT, ccc, UUU, S0S_0S0​ and nnn; only the tiled side additionally depends on mathfrakB\\\\mathfrak{B}mathfrakB and DmathrmofD_{\\\\mathrm{of}}Dmathrmof​.\n\nTraining states. A state SintextStateS \\\\in \\\\text{State}SintextState is a quadruple (w,mu1,mu2,t)(w, \\\\mu_1, \\\\mu_2, t)(w,mu1​,mu2​,t) with w,mu1,mu2inmathbbRdw, \\\\mu_1, \\\\mu_2 \\\\in \\\\mathbb{R}^dw,mu1​,mu2​inmathbbRd (logical parameters, first-moment slots, second-moment slots) and a step counter tinmathbbNt \\\\in \\\\mathbb{N}tinmathbbN. The asserted equality is equality of the entire state after nnn steps — parameters, both moment vectors, and the counter — not just of the parameters.\n\nWhat operatornamerunFrom(textstep,n,S0)\\\\operatorname{runFrom}(\\\\text{step}, n, S_0)operatornamerunFrom(textstep,n,S0​) asserts. For a transition operatornamestep:textStatetomathbbNtotextState\\\\operatorname{step} : \\\\text{State} \\\\to \\\\mathbb{N} \\\\to \\\\text{State}operatornamestep:textStatetomathbbNtotextState,\n\n

operatornamerunFrom(operatornamestep,0,S)=S,qquadoperatornamerunFrom(operatornamestep,n+1,S)=operatornamerunFrom(operatornamestep,n,,operatornamestep(S,n)).\\\\operatorname{runFrom}(\\\\operatorname{step}, 0, S) = S, \\\\qquad \\\\operatorname{runFrom}(\\\\operatorname{step}, n+1, S) = \\\\operatorname{runFrom}(\\\\operatorname{step}, n,\\\\, \\\\operatorname{step}(S, n)).operatornamerunFrom(operatornamestep,0,S)=S,qquadoperatornamerunFrom(operatornamestep,n+1,S)=operatornamerunFrom(operatornamestep,n,,operatornamestep(S,n)).

\n\nUnrolling, nnn transitions are applied, consuming the schedule index n−1n-1n−1 first and index 000 last: operatornamerunFrom(operatornamestep,n,S0)=operatornamestep(cdotsoperatornamestep(operatornamestep(S0,,n−1),,n−2)cdots,,0)\\\\operatorname{runFrom}(\\\\operatorname{step}, n, S_0) = \\\\operatorname{step}(\\\\cdots \\\\operatorname{step}(\\\\operatorname{step}(S_0,\\\\, n-1),\\\\, n-2) \\\\cdots,\\\\, 0)operatornamerunFrom(operatornamestep,n,S0​)=operatornamestep(cdotsoperatornamestep(operatornamestep(S0​,,n−1),,n−2)cdots,,0). Only the frames, partitions, and certificates at indices 0,dots,n−10, \\\\dots, n-10,dots,n−1 are ever read; the hypotheses hmathrmparth_{\\\\mathrm{part}}hmathrmpart​ and DmathrmofD_{\\\\mathrm{of}}Dmathrmof​ are nonetheless demanded at every index kinmathbbNk \\\\in \\\\mathbb{N}kinmathbbN, including indices no nnn-step run reaches. At n=0n = 0n=0 both sides of the theorem are literally S0S_0S0​, so the statement includes the degenerate case n=0n = 0n=0 in which it reduces to S0=S0S_0 = S_0S0​=S0​.\n\nThe two transitions. Both take a current state SSS and a schedule index kkk, compute a gradient vector ginmathbbRdg \\\\in \\\\mathbb{R}^dginmathbbRd, and return Ubig(S,,operatornameclipc(PT,g)big)U\\\\big(S,\\\\, \\\\operatorname{clip}_c(P_T\\\\, g)\\\\big)Ubig(S,,operatornameclipc​(PT​,g)big) — the optimizer UUU is applied exactly once per step, to the pre-update state SSS. Here PTP_TPT​ is the coordinate mask (PT,g)j=gj(P_T\\\\, g)_j = g_j(PT​,g)j​=gj​ if jinTj \\\\in TjinT and 000 otherwise, and\n\n

\\\\operatorname{clip}_c(g) = \\\\begin{cases} g & \\\\text{if } \\\\|g\\\\| \\\\le c, \\\\\\\\\\\\\\\\ \\\\dfrac{c}{\\\\|g\\\\|}\\\\, g & \\\\text{otherwise}, \\\\end{cases}

\n\ntaken verbatim as a total function: no sign is assumed on ccc, and division is total, so both branches are defined for every ggg (including g=0g = 0g=0). The two transitions differ only in how ggg is produced:\n\n- Monolithic gradient. g=gkmathrmmono(S)g = g^{\\\\mathrm{mono}}_k(S)g=gkmathrmmono​(S) is the vector representing the derivative of the logical objective\n

Lk(w);=;sumiinIkalphak(i)cdotfk,ibig(w,,hk(w)big)L_k(w) \\\\;=\\\\; \\\\sum_{i \\\\in I_k} \\\\alpha_k(i) \\\\cdot f_{k,i}\\\\big(w,\\\\, h_k(w)\\\\big)Lk​(w);=;sumiinIk​​alphak​(i)cdotfk,i​big(w,,hk​(w)big)

\nat S.wS.wS.w — literally, the image of 1inmathbbR1 \\\\in \\\\mathbb{R}1inmathbbR under the adjoint of the Fréchet derivative DLk(S.w)D L_k(S.w)DLk​(S.w), i.e. its Riesz vector. The derivative operator is total: at a point where LkL_kLk​ fails to be differentiable it is defined to be the zero map, so gkmathrmmono(S)=0g^{\\\\mathrm{mono}}_k(S) = 0gkmathrmmono​(S)=0 there; the monolithic transition is thus defined for completely arbitrary frames, with no differentiability assumed.\n\n- Tiled gradient. g = g^{\\\\mathrm{tile}}_k(S) = A + (h\'_k)^{*}(C), where h\'_k is the continuous linear map supplied by the certificate bundle Dmathrmof(k,S)D_{\\\\mathrm{of}}(k, S)Dmathrmof​(k,S), (h\'_k)^{*} : V \\\\to W is its adjoint, and\n$$A \\;=\\; \\sum_{B \\in \\mathfrak{B}k}\\, \\sum{i \\in B} \\alpha_k(i)\\, \\mathbf{a}i \\;\\in\\; W, \\qquad C \\;=\\; \\sum{B \\in \\mathfrak{B}k}\\, \\sum{i \\in B} \\alpha_k(i)\\, \\mathbf{c}i \\;\\in\\; V,n\\nn\\mathbf{a}andandand\\mathbf{c}beingthedirect/sharedtablesofbeing the direct/shared tables ofbeingthedirect/sharedtablesofD{\\mathrm{of}}(k, S);thisiscomputedbyfoldingthetilelistleft−to−rightfromazeroaccumulator,eachtile; this is computed by folding the tile list left-to-right from a zero accumulator, each tile ;thisiscomputedbyfoldingthetilelistleft−to−rightfromazeroaccumulator,eachtileBaddingaddingadding\\sum_{i \\in B} \\alpha_k(i)\\,\\mathbf{a}itothedirectslotandto the direct slot andtothedirectslotand\\sum{i \\in B} \\alpha_k(i)\\,\\mathbf{c}itothesharedslot.(Thefoldalsomaintainsarunninglossto the shared slot. (The fold also maintains a running losstothesharedslot.(Thefoldalsomaintainsarunningloss\\sum \\alpha_k(i)\\,\\mathrm{val}(i),whichthetiledgradientdiscards:thevaluetable—andhenceitscertificate—doesnotenter, which the tiled gradient discards: the value table — and hence its certificate — does not enter ,whichthetiledgradientdiscards:thevaluetable—andhenceitscertificate—doesnotenterg^{\\mathrm{tile}}k.)nn∗∗Thecertificatebundle.)\\n\\n**The certificate bundle .)nn∗∗ThecertificatebundleD{\\mathrm{of}}(k, S)(at(at(atw_0 = S.w,fortheframe, for the frame ,fortheframe\\xi_k).∗∗Thehypothesissuppliesallofthefollowing:nn−acontinuouslinearmap).** The hypothesis supplies all of the following:\\n\\n- a continuous linear map ).∗∗Thehypothesissuppliesallofthefollowing:nn−acontinuouslinearmaph'k : W \\to V,certifiedtobetheFreˊchetderivativeof, certified to be the Fréchet derivative of ,certifiedtobetheFreˊchetderivativeofh_katatatw_0;n−avaluetable;\\n- a value table ;n−avaluetable\\mathrm{val} : \\iota \\to \\mathbb{R},certifiedby:, certified by: ,certifiedby:\\mathrm{val}(i) = f{k,i}\\big(w_0,\\, h_k(w_0)\\big)foreveryoccurrencefor every occurrenceforeveryoccurrencei \\in I_k;n−adirecttable;\\n- a direct table ;n−adirecttable\\mathbf{a} : \\iota \\to W,certifiedby:, certified by: ,certifiedby:\\mathbf{a}(i)isthegradientatis the gradient atisthegradientatw_0ofthemapof the mapofthemapw \\mapsto f{k,i}\\big(w,\\, h_k(w_0)\\big)(sharedslotfrozenatitspre−updatevalue)forevery(shared slot frozen at its pre-update value) for every(sharedslotfrozenatitspre−updatevalue)foreveryi \\in I_k;n−asharedtable;\\n- a shared table ;n−asharedtable\\mathbf{c} : \\iota \\to V,certifiedby:, certified by: ,certifiedby:\\mathbf{c}(i)isthegradientatis the gradient atisthegradientath_k(w_0)ofthemapof the mapofthemapv \\mapsto f_{k,i}(w_0, v)foreveryfor everyforeveryi \\in I_k;n−differentiabilityof;\\n- differentiability of ;n−differentiabilityoff_{k,i}atthepointat the pointatthepoint\\big(w_0, h_k(w_0)\\big)foreveryfor everyforeveryi \\in I_k.nn(Gradientofareal−valuedfunctiononEuclideanspace.\\n\\n(Gradient of a real-valued function on Euclidean space .nn(Gradientofareal−valuedfunctiononEuclideanspace=thevectorrepresentingitsderivative.)Allper−occurrencecertificatesaredemandedonlyforthe vector representing its derivative.) All per-occurrence certificates are demanded only forthevectorrepresentingitsderivative.)Allper−occurrencecertificatesaredemandedonlyfori \\in I_k;if; if ;ifI_k = \\varnothingtheyarevacuous.Thederivativecertificateforthey are vacuous. The derivative certificate fortheyarevacuous.Thederivativecertificateforh_katatatw_0,however,isdemandedunconditionally.nn∗∗Fineprintonthequantifiersanddegeneratecases.∗∗nn−, however, is demanded unconditionally.\\n\\n**Fine print on the quantifiers and degenerate cases.**\\n\\n- ,however,isdemandedunconditionally.nn∗∗Fineprintonthequantifiersanddegeneratecases.∗∗nn−D_{\\mathrm{of}}rangesover∗∗all∗∗statesranges over **all** statesrangesover∗∗all∗∗statesS,notonlystatesreachablefrom, not only states reachable from ,notonlystatesreachablefromS_0;sinceevery; since every ;sinceeveryw \\in \\mathbb{R}^disisisS.wforsomestate,thehypothesisineffectrequireseachfor some state, the hypothesis in effect requires eachforsomestate,thehypothesisineffectrequireseachh_ktoadmitaFreˊchetderivativeat∗∗every∗∗pointofto admit a Fréchet derivative at **every** point oftoadmitaFreˊchetderivativeat∗∗every∗∗pointof\\mathbb{R}^d,andtheoccurrence−wisevalue/gradient/differentiabilitydatatoexistatevery, and the occurrence-wise value/gradient/differentiability data to exist at every ,andtheoccurrence−wisevalue/gradient/differentiabilitydatatoexistateveryw_0(atthepoints(at the points(atthepoints(w_0, h_k(w_0))).Aschedulecontainingaframewhose). A schedule containing a frame whose ).Aschedulecontainingaframewhoseh_kisnoteverywheredifferentiablemakesthehypothesisunsatisfiable,andthetheoremisvacuousforthatschedule.n−is not everywhere differentiable makes the hypothesis unsatisfiable, and the theorem is vacuous for that schedule.\\n-isnoteverywheredifferentiablemakesthehypothesisunsatisfiable,andthetheoremisvacuousforthatschedule.n−nrangesoverallofranges over all ofrangesoverallof\\mathbb{N}includingincludingincludingn = 0(bothsidesthenequal(both sides then equal(bothsidesthenequalS_0).n−).\\n- ).n−Tmaybeempty:thenmay be empty: thenmaybeempty:thenP_Tsendseverygradienttosends every gradient tosendseverygradientto0,andbothtransitionsreducetothesamemap, and both transitions reduce to the same map ,andbothtransitionsreducetothesamemapS \\mapsto U\\big(S, \\operatorname{clip}c(0)\\big),identicalonthetwosidesregardlessof, identical on the two sides regardless of ,identicalonthetwosidesregardlessof\\xi,, ,\\mathfrak{B},, ,D{\\mathrm{of}}.(Likewise. (Likewise .(Likewised = 0forcesforcesforcesT = \\varnothing,, ,\\mathbb{R}^dbeingthetrivialspace.)n−Ifbeing the trivial space.)\\n- Ifbeingthetrivialspace.)n−IfI_k = \\varnothingforsomefor someforsomek(inparticularif(in particular if(inparticularif\\iotaisempty),thenis empty), thenisempty),thenA = 0andandandC = 0whilewhilewhileL_k \\equiv 0,sobothgradientformulasyield, so both gradient formulas yield ,sobothgradientformulasyield0ateverystateforthatindex.n−at every state for that index.\\n-ateverystateforthatindex.n−cisanarbitraryreal;foris an arbitrary real; forisanarbitraryreal;forc < 0thebranchthe branchthebranch\\|g\\| \\le c$ never applies and the second branch, with its negative scalar, is used.\n"\n}', 'startLine': 1, 'lineNumbers': [1, 2, 3]}, 'meta': {'source': {'type': 'internal', 'value': 'agent://RB2-M09'}}}}

Human review
  • Endorsed by Shuze Chen · Sep 25, 2026

  • Endorsed by ajax · Sep 25, 2026

    Confirmed by the mission captain (proposal self-audit).

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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me