M11 — Restart equivalence
DisprovedVathekProof.M11_restart_equivalenceSaving at any completed update boundary and reloading preserves the remaining trajectory. Under the hypotheses of trajectory equivalence, for every split point : running the tiled evaluator for steps from , snapshotting the state, restoring it, and continuing the tiled evaluator for the remaining steps lands on exactly the state of the uninterrupted monolithic run of all steps:
The mutant this rules out: restoring weights but omitting moments or counters — two states with identical weights and different momentum diverge on the very next transition.
import Definitions.Def_VathekFrame import Definitions.Def_VathekState import Definitions.Def_VathekAdamW import Definitions.Def_VathekWitness
namespace VathekProof
/-- **M11 — Restart equivalence** (white paper Eq. (6)). Saving at any completed
update boundary `a ≤ n` and reloading the round-tripped state preserves the remaining
trajectory: the tiled run restarted from the restored snapshot at step `a` equals the
uninterrupted monolithic run of all `n` steps. -/
theorem M11_restart_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 a : ℕ) (ha : a ≤ n) :
runFrom (tiledRun d m ι ξ 𝔅 Dof T c U) (n - a)
(restore (snap (runFrom (tiledRun d m ι ξ 𝔅 Dof T c U) a S₀)))
= runFrom (monoRun d m ι ξ T c U) n S₀ := by sorry
end VathekProofRead-back
What the Lean code literally says, in plain math · glm-5.3 (independent auditor subagent)
{'text': '{\n "readback": "Setting. Fix natural numbers (logical parameter dimension) and (shared-state dimension) and a type (the occurrence-index type, possibly empty or infinite) on which equality is decidable. Write , for the Euclidean coordinate spaces with the usual Euclidean norm .\n\nAssertion (M11 restart equivalence). For every , every type with decidable equality, and all of the following data:\n\n- a frame schedule : each frame consists of a shared map , per-occurrence loss maps , real coefficients (no sign constraint), and a finite occurrence set ;\n- a tile schedule , each a finite list of finite subsets (\"tiles\") of ;\n- a finite set of trainable coordinates;\n- a real number (clipping radius; no sign hypothesis);\n- an arbitrary map (the optimizer; no assumption on it — it need not use the direction, advance any counter, or be continuous);\n- an initial state ;\n- natural numbers (total steps) and (checkpoint step);\n\nsubject to the three hypotheses below, the following equality of training states holds:\n\n
\n\nHypotheses.\n\n1. (so the natural-number subtraction is untruncated and equals the ordinary difference).\n2. Tile partition, for every (not just ): the union of the tiles in the list is exactly , and any two tiles at distinct positions of the list are disjoint. Empty tiles are allowed (also repeated, since is disjoint from itself), tile sizes may be uneven; an empty list is allowed exactly when , and if every tile must be empty.\n3. Derivative certificates, for every and every state (including states never reached by any run): a package for the frame at the pre-update point , consisting of:\n - a continuous linear map h\'_{k,S} : \\\\mathbb{R}^d \\\\to \\\\mathbb{R}^m together with a certificate that it is the Fréchet derivative of at ;\n - per-occurrence values , certified — for only — by the field hval: ;\n - per-occurrence direct gradients , certified for to be the gradient at of — note the shared map is frozen at its pre-update value here, not composed;\n - per-occurrence shared cotangents , certified for to be the gradient at of ;\n - for , differentiability of at .\n \n For the three families carry arbitrary, unconstrained values.\n\nStates. A training state is a quadruple : parameter vector , first-moment vector , second-moment vector , and a natural-number step counter . The asserted equality is equality of whole states, i.e. all four components agree.\n\nThe tiled step (index , state ). Everything is read once at the fixed pre-update point ; no parameter changes between tiles. The gradient is\n\n
\n\nwhere is the adjoint (transpose) of the certified derivative h\'_{k,S}, and the sums accumulate tile by tile through the list from zero. (The accumulator also maintains a running weighted loss , but that slot is not read by the step — so , and hence its hval certificate, has no influence on the tiled trajectory.) The new state is\n\n
\n\nwhere is the coordinate projection keeping coordinates and zeroing , and if , otherwise . The clip is a total function: at both branches return ; for negative the second branch reverses direction and rescales to norm .\n\nThe monolithic step (index , state ). Let be the whole logical objective of frame . Its gradient is taken as\n\n
\n\nthe Riesz-representation vector of the Fréchet differential of at . The derivative operation is total: where is not differentiable it returns a junk value, and the statement contains no hypothesis directly asserting this derivative is genuine. The new state is — same projection, same clipping, same single application of as in the tiled step.\n\nRunning steps. and . Hence applies the step function times, the first application carrying step index , the next , …, the last carrying index : the step index counts down from to .\n\nSnapshot and restore. serializes a state as the tuple of coordinate lists (each of becomes its list of exactly real coordinates) together with the counter . rebuilds each vector by reading coordinate from the -th list entry, defaulting missing entries to — a default that never fires on a snapshot, since each list has length exactly . Hence exactly: an idealized, infinite-precision real-valued round trip (no finite-byte codec is modeled).\n\nThe two sides compared.\n\n- Left: run tiled steps from , consuming step indices in that order; snapshot the resulting state and restore it (recovering exactly the same state); then run a further tiled steps, consuming step indices in that order.\n- Right: run monolithic steps from , consuming step indices in that order.\n\nNote the index bookkeeping this implies: the left side's full sequence of frame indices is followed by (index is consumed twice whenever and , and no index is consumed by the second segment), while the right side consumes each of exactly once.\n\nDegenerate and edge cases.\n\n- : the first segment is empty and ; since , the claim becomes: tiled steps from equal monolithic steps from — the full tiled-vs-monolithic equivalence.\n- : the continuation is empty (); the claim becomes .\n- : forces ; the claim reduces to .\n- : every gradient is masked to before clipping, so every step (both evaluators) applies . = all coordinates: the mask is the identity.\n- No sign or positivity assumption on or on the coefficients .\n- If for some : every tile of is then empty, the tiled gradient is 0 + (h\'_{k,S})^{*}(0) = 0, and the monolithic objective is the empty sum, identically .\n- or are permitted; the corresponding vector spaces are trivial (all vectors are ).\n- is universally quantified with no restriction, and the hypotheses of tile-partition and certificates are demanded at every and (for certificates) every state, not merely along the run."\n}', 'details': {'resolvedPath': '/home/ajax/.omp/agent/sessions/-math/2026-09-22T19-31-08-510Z_01a0ca99-be5e-7000-93c6-dac7c74cc004/RB2-M11.md', 'contentType': 'text/markdown', 'totalLines': 3, 'displayContent': {'text': '{\n "readback": "Setting. Fix natural numbers (logical parameter dimension) and (shared-state dimension) and a type (the occurrence-index type, possibly empty or infinite) on which equality is decidable. Write , for the Euclidean coordinate spaces with the usual Euclidean norm .\n\nAssertion (M11 restart equivalence). For every , every type with decidable equality, and all of the following data:\n\n- a frame schedule : each frame consists of a shared map , per-occurrence loss maps , real coefficients (no sign constraint), and a finite occurrence set ;\n- a tile schedule , each a finite list of finite subsets (\"tiles\") of ;\n- a finite set of trainable coordinates;\n- a real number (clipping radius; no sign hypothesis);\n- an arbitrary map (the optimizer; no assumption on it — it need not use the direction, advance any counter, or be continuous);\n- an initial state ;\n- natural numbers (total steps) and (checkpoint step);\n\nsubject to the three hypotheses below, the following equality of training states holds:\n\n
\n\nHypotheses.\n\n1. (so the natural-number subtraction is untruncated and equals the ordinary difference).\n2. Tile partition, for every (not just ): the union of the tiles in the list is exactly , and any two tiles at distinct positions of the list are disjoint. Empty tiles are allowed (also repeated, since is disjoint from itself), tile sizes may be uneven; an empty list is allowed exactly when , and if every tile must be empty.\n3. Derivative certificates, for every and every state (including states never reached by any run): a package for the frame at the pre-update point , consisting of:\n - a continuous linear map h\'_{k,S} : \\\\mathbb{R}^d \\\\to \\\\mathbb{R}^m together with a certificate that it is the Fréchet derivative of at ;\n - per-occurrence values , certified — for only — by the field hval: ;\n - per-occurrence direct gradients , certified for to be the gradient at of — note the shared map is frozen at its pre-update value here, not composed;\n - per-occurrence shared cotangents , certified for to be the gradient at of ;\n - for , differentiability of at .\n \n For the three families carry arbitrary, unconstrained values.\n\nStates. A training state is a quadruple : parameter vector , first-moment vector , second-moment vector , and a natural-number step counter . The asserted equality is equality of whole states, i.e. all four components agree.\n\nThe tiled step (index , state ). Everything is read once at the fixed pre-update point ; no parameter changes between tiles. The gradient is\n\n
\n\nwhere is the adjoint (transpose) of the certified derivative h\'_{k,S}, and the sums accumulate tile by tile through the list from zero. (The accumulator also maintains a running weighted loss , but that slot is not read by the step — so , and hence its hval certificate, has no influence on the tiled trajectory.) The new state is\n\n
\n\nwhere is the coordinate projection keeping coordinates and zeroing , and if , otherwise . The clip is a total function: at both branches return ; for negative the second branch reverses direction and rescales to norm .\n\nThe monolithic step (index , state ). Let be the whole logical objective of frame . Its gradient is taken as\n\n
\n\nthe Riesz-representation vector of the Fréchet differential of at . The derivative operation is total: where is not differentiable it returns a junk value, and the statement contains no hypothesis directly asserting this derivative is genuine. The new state is — same projection, same clipping, same single application of as in the tiled step.\n\nRunning steps. and . Hence applies the step function times, the first application carrying step index , the next , …, the last carrying index : the step index counts down from to .\n\nSnapshot and restore. serializes a state as the tuple of coordinate lists (each of becomes its list of exactly real coordinates) together with the counter . rebuilds each vector by reading coordinate from the -th list entry, defaulting missing entries to — a default that never fires on a snapshot, since each list has length exactly . Hence exactly: an idealized, infinite-precision real-valued round trip (no finite-byte codec is modeled).\n\nThe two sides compared.\n\n- Left: run tiled steps from , consuming step indices in that order; snapshot the resulting state and restore it (recovering exactly the same state); then run a further tiled steps, consuming step indices in that order.\n- Right: run monolithic steps from , consuming step indices in that order.\n\nNote the index bookkeeping this implies: the left side's full sequence of frame indices is followed by (index is consumed twice whenever and , and no index is consumed by the second segment), while the right side consumes each of exactly once.\n\nDegenerate and edge cases.\n\n- : the first segment is empty and ; since , the claim becomes: tiled steps from equal monolithic steps from — the full tiled-vs-monolithic equivalence.\n- : the continuation is empty (); the claim becomes .\n- : forces ; the claim reduces to .\n- : every gradient is masked to before clipping, so every step (both evaluators) applies . = all coordinates: the mask is the identity.\n- No sign or positivity assumption on or on the coefficients .\n- If for some : every tile of is then empty, the tiled gradient is 0 + (h\'_{k,S})^{*}(0) = 0, and the monolithic objective is the empty sum, identically .\n- or are permitted; the corresponding vector spaces are trivial (all vectors are ).\n- is universally quantified with no restriction, and the hypotheses of tile-partition and certificates are demanded at every and (for certificates) every state, not merely along the run."\n}', 'startLine': 1, 'lineNumbers': [1, 2, 3]}, 'meta': {'source': {'type': 'internal', 'value': 'agent://RB2-M11'}}}}
Confirmed by the mission captain (proposal self-audit).
runFrom step (n + 1) S = runFrom step n (step S n)applies the indices n, n−1, …, 0 in that order, sorunFrom step (n − a) (restore (snap (runFrom step a S₀)))re-runs steps n−a−1, …, 0 instead of continuing with steps a, …, n−1.Counterexample: d = m = 1, ι = Fin 1, T = univ, c = 100, U S g = ⟨S.w − g, S.mom1, S.mom2, S.t + 1⟩, h = 0, frame 0 with loss w ↦ w 0 (gradient 1), frame 1 with loss w ↦ 2 · w 0 (gradient 2), constant-zero frames beyond, 𝔅 k = [{0}], certificates as given by these derivatives. From w = 0 with n = 2, a = 1: the monolithic run gives w = −2 then −3, the restarted run gives w = −1, then (frame 0 again) −2. The two sides differ, so the statement is disprovable.
Suggested fix: define a run with a start index, e.g.
runFromAt step : ℕ → ℕ → σ → σwithrunFromAt step a 0 S = SandrunFromAt step a (k + 1) S = runFromAt step (a + 1) k (step S a), and state restart asrunFromAt tiled a (n − a) (restore (snap (runFromAt tiled 0 a S₀))) = runFromAt mono 0 n S₀. M09 and the trajectory clause of T0 are unaffected.