The procedure allInstancesP solves the thin matrix product on all instances (pruned data structure, , )
ProvedLight.Sec4.allInstancesP_programPIn the program programP (the programs of Section 4 with the rational parameters , , followed by two new procedures), procedure number , allInstancesP, solves the task wanted entries of a thin matrix product on every instance, within
steps, provided the limits of the run satisfy a polynomial need .
The task. An instance consists of an integer matrix stored row by row at address , a matrix at , with all entries of absolute value at most , and distinct positions whose rows are stored at and columns at ; all of this lies below a free pointer , and . The procedure must write the numbers to the cells from and leave every other cell below unchanged.
What is proved. For every extension of the program, all limits, every depth , every instance and memory satisfying the precondition, if the need (a bound on word size, number of cells and depth, polynomial in ) is met by the limits at free pointer and depth , then the body of allInstancesP, started on the arguments , ends within steps in a memory satisfying the postcondition above.
The procedure first tests whether . If so, it calls the offline form of the data structure of Theorem 30 at the parameters , with pruned encodings, whose time is ; otherwise it calls the brute-force product. This is the program behind the bound of the thin regime.
Formalization Note The statement is SolvesN thinTask programP Proc.allInstancesP (allInstancesTimeP cShared30) allInstancesNeedP; is tOffline32P cShared30 ratParamsP N D w and the constant of the shared stage is cShared30 .
/- 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 -/ -- Generated by skeleton subtraction from the ThreeSumApsp library at commit 27a2fa4bab32. import Definitions.Def_APSP299791_Defs5 set_option autoImplicit false set_option relaxedAutoImplicit false open Light open Light.Sec4 open ThreeSumApsp ThreeSumApsp.Spec
theorem Light.Sec4.allInstancesP_programP : SolvesN thinTask programP Proc.allInstancesP
(allInstancesTimeP cShared30) allInstancesNeedP := by sorry