Small light limits fit the target machine width
ProvedThreeSum1960614.Machine.Light.fits_of_small3sum-1960614algorithmsformal-verification
Let program , decision flag , parameter list , limits , width , and natural envelope constants be given. If is small with parameters , is admissible at width , , and the compiler slope is at most , then the compiled dispatcher and required stack cells satisfy the compiler fit predicate at width .
This fit theorem discharges the finite machine-width obligations when compiling a complete light-language solver.
Preamble
/- Copyright (c) 2026 Anthropic, PBC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ import Definitions.Def_APSPSource_PaperStatements import Definitions.Def_APSPSource_RemainingDefinitions import Definitions.Def_APSPSource_ThreeSumApsp_Lang_Compiler_Cells import Definitions.Def_APSPSource_ThreeSumApsp_Lang_Compiler_StatementCode import Definitions.Def_APSPSource_ThreeSumApsp_Lang_Syntax import Definitions.Def_APSPSource_ThreeSumApsp_Lang_WordSize import Definitions.Def_APSPSource_ThreeSumApsp_Machine_Solving import Definitions.Def_APSPSource_ThreeSumApsp_Machine_Steps import Definitions.Def_APSPSource_ThreeSumApsp_Util_List import Definitions.Def_ThreeSum1960614_Machine_Bundle002 import Definitions.Def_ThreeSum1960614_Machine_Bundle003 import Definitions.Def_ThreeSum1960614_Machine_Bundle004 import Definitions.Def_ThreeSum1960614_Machine_Bundle005 import Definitions.Def_ThreeSum1960614_Machine_Bundle006 import Definitions.Def_ThreeSum1960614_Machine_Bundle007 import Definitions.Def_ThreeSum1960614_Machine_Bundle008 import Definitions.Def_ThreeSum1960614_Machine_Bundle009 import Definitions.Def_ThreeSum1962Source_Bundle01 import Definitions.Def_TrulySubcubicAPSP_SourceSpecification import Lean import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.BigOperators.Group.Finset.Basic import Mathlib.Algebra.Group.Int.Defs import Mathlib.Algebra.GroupWithZero.Nat import Mathlib.Algebra.MvPolynomial.Basic import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Algebra.Order.BigOperators.Group.List import Mathlib.Algebra.Order.BigOperators.Group.Multiset import Mathlib.Algebra.Order.BigOperators.GroupWithZero.List import Mathlib.Algebra.Order.Floor.Semiring import Mathlib.Algebra.Order.Group.Abs import Mathlib.Algebra.Order.Group.Int import Mathlib.Algebra.Order.Group.Nat import Mathlib.Algebra.Order.Group.Unbundled.Abs import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Analysis.Asymptotics.Lemmas import Mathlib.Analysis.Normed.Field.Basic import Mathlib.Analysis.SpecialFunctions.Log.Base import Mathlib.Analysis.SpecialFunctions.Log.Basic import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Combinatorics.SimpleGraph.Basic import Mathlib.Data.Finset.Sort import Mathlib.Data.List.GetD import Mathlib.Data.Nat.Count import Mathlib.Data.Nat.Digits.Defs import Mathlib.Data.Nat.Size import Mathlib.Data.Nat.SuccPred import Mathlib.Data.Real.Basic import Mathlib.Data.Set.Function import Mathlib.LinearAlgebra.Matrix.Notation import Mathlib.MeasureTheory.Integral.Bochner.Basic import Mathlib.NumberTheory.PrimeCounting import Mathlib.Order.ConditionallyCompleteLattice.Basic import Mathlib.Order.Filter.AtTopBot.Basic import Mathlib.Probability.Independence.Basic import Mathlib.Tactic.DeriveFintype import Mathlib.Tactic.GCongr import Mathlib.Tactic.Linarith import Mathlib.Tactic.NormNum import Mathlib.Tactic.Positivity import Mathlib.Tactic.Ring import Mathlib.Tactic.SplitIfs import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Order.Ring.Int import Mathlib.Data.Int.Cast.Lemmas import Mathlib.Data.Nat.Cast.Order.Ring import Mathlib.Tactic.GCongr import Mathlib.Tactic.Linarith import Mathlib.Tactic.NormNum import Mathlib.Tactic.Positivity import Mathlib.Tactic.Ring namespace ThreeSum1960614.Machine.Light end ThreeSum1960614.Machine.Light namespace Light end Light namespace Light.Compiler end Light.Compiler namespace ThreeSum1960614.Machine.Light end ThreeSum1960614.Machine.Light namespace ThreeSum1960614.Machine.Light.Compiler end ThreeSum1960614.Machine.Light.Compiler namespace ThreeSum1960614.Machine.ThreeSumApsp end ThreeSum1960614.Machine.ThreeSumApsp namespace ThreeSum1960614.Machine.ThreeSumApsp.WordRam end ThreeSum1960614.Machine.ThreeSumApsp.WordRam namespace ThreeSumApsp end ThreeSumApsp namespace ThreeSumApsp.WordRam end ThreeSumApsp.WordRam open _root_.ThreeSumApsp.WordRam open _root_.ThreeSum1960614.Machine.ThreeSumApsp.WordRam open _root_.Light open _root_.ThreeSum1960614.Machine.Light open _root_.ThreeSumApsp open _root_.ThreeSum1960614.Machine.ThreeSumApsp open _root_.Light.Compiler open _root_.ThreeSum1960614.Machine.Light.Compiler open _root_.EndStatement renaming exec -> exec open _root_.EndStatement renaming loadWords -> loadWords
Formal statement
theorem ThreeSum1960614.Machine.Light.fits_of_small {W s k r b : ℕ} {params : List ℕ} {lim : _root_.ThreeSum1960614.Machine.Light.Limits} (P : _root_.ThreeSum1960614.Machine.Light.Program) (dec : Bool)
(h : _root_.ThreeSum1960614.Machine.Light.Small s k params lim) (hadm : _root_.ThreeSumApsp.WordRam.Admissible b params W) (hr : params.length ≤ r)
(hb : _root_.ThreeSum1960614.Machine.Light.slopeOf P dec s k r ≤ b) : _root_.ThreeSum1960614.Machine.Light.Compiler.Fits W lim (_root_.ThreeSum1960614.Machine.Light.Compiler.dispPos P dec) (_root_.ThreeSum1960614.Machine.Light.Compiler.stackCells P lim) := by sorrySource