The all-edges Exact Triangle host at the middle dimension, assembled as a solver from a Lop-AE-SparseTri solver
ProvedLight.Sec3.mid_solvesLet be a program of the light language in which procedure solves Lop-AE-SparseTri (Definition 13 of Alman and Vassilevska Williams, the detection version) within the time under the need , and in which the procedures and compute the parameter functions and : called on , returns within steps, changes no cell and forms only numbers up to , and likewise with , in every extension of . Assume for .
Append to the procedures of the all-edges host at the middle dimension, . Then procedure number of the resulting program solves All-Edges Exact Triangle within the time
under the need , and so does it in every extension of the program. Here All-Edges Exact Triangle on vertices per part with weight bound asks, given stored in memory, to write to the output cells the flag of every pair , which is exactly if some has , changing no other cell below the free pointer.
The core time is the time of computing , and the tests, plus either the brute force (if , , or ) or the reduction of Theorem 17: the choice of the prime, the residues, classes and chunks, and at most calls of the solver at the middle dimension () with at most query pairs each, plus the scans. The need adds to the need of the host of Theorem 17 the need of the solver at the middle dimension, and room for the flags.
"Procedure solves the task within under the need " means: for every extension of the program, all limits, every depth and every instance in memory satisfying the task's precondition, if the limits meet , the body of ends within steps in a state satisfying the task's postcondition.
Formalization Note The statement is Solves aeTask (P₀ ++ midProcs pS pD pG P₀.length) (P₀.length + 33) (midHostTime Dfun Gfun tD tG Tn) (midHostNeed Dfun Gfun wD wG need) under SolvesN lopDetectTask P₀ pS Tn need, ∀ R, ParamProc (P₀ ++ R) pD Dfun tD wD, ∀ R, ParamProc (P₀ ++ R) pG Gfun tG wG and ∀ n, 1 ≤ n → 1 ≤ Dfun n.
/-
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.Sec3
open ThreeSumApsp ThreeSumApsp.Spec
variable {P₀ R : Program} {ν : Et17Nums} {pAEBrute pAELoop pScanPairsAE pCore pFill : ℕ}
{Tn : List ℕ → ℕ} {need : List ℕ → Need} {Dfun Gfun tD tG wD wG : ℕ → ℕ}
theorem Light.Sec3.mid_solves {P₀ : Program} {pS pD pG : ℕ} {Tn : List ℕ → ℕ} {need : List ℕ → Light.Need}
{Dfun Gfun tD tG wD wG : ℕ → ℕ} (hsol : SolvesN lopDetectTask P₀ pS Tn need)
(hD : ∀ R, ParamProc (P₀ ++ R) pD Dfun tD wD) (hG : ∀ R, ParamProc (P₀ ++ R) pG Gfun tG wG)
(hpos : ∀ n, 1 ≤ n → 1 ≤ Dfun n) :
Solves aeTask (P₀ ++ midProcs pS pD pG P₀.length) (P₀.length + 33)
(midHostTime Dfun Gfun tD tG Tn) (midHostNeed Dfun Gfun wD wG need) := by sorry