Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The batched counting oracle (digit lifting into tensor slots) solves the oracle task

Proved
Light.Batch.oracle_solves

by xuanji · Oct 7, 2026 · Mathlib 0df444a (Lean v4.33.1)

apsp-2995561apsp-exponentfine-grained-complexityword-ram

Procedure pOracle (number 84) of the program oProg solves the counting oracle task Light.Filter2.oracleTask within T(n,U,s,p)=T(n,U,s,p)=T(n,U,s,p)= oTimeF 3000000 n U s p steps with need oNeed.

The task: for an Exact Triangle instance (three n×nn\times nn×n weight matrices AB,BC,ACAB,BC,ACAB,BC,AC with entries bounded by UUU), a block size 1≤s≤n1\le s\le n1≤s≤n, a modulus p≥1p\ge1p≥1 and a place cnt, write the list cntList n s p AB BC AC of the ⌈n/s⌉n2\lceil n/s\rceil n^2⌈n/s⌉n2 counts at cnt: for the candidate i=jn2+an+bi=jn^2+an+bi=jn2+an+b, the number of ccc in [js,min⁡((j+1)s,n))[js,\min((j+1)s,n))[js,min((j+1)s,n)) with p∣w(a,b)+w(b,c)+w(a,c)p\mid w(a,b)+w(b,c)+w(a,c)p∣w(a,b)+w(b,c)+w(a,c); no other cell below the free pointer changes.

oProg is base58B, the procedures of Section 4.4 for c=20c=20c=20, θ=56569/500000\theta=56569/500000θ=56569/500000, and the oracle's procedures 74-84 (tables of residues and digits, writeSrc, the queries, the top procedure). oTimeF A is explicit: A(n2log⁡U+… )A(n^2\log U+\dots)A(n2logU+…) plus, per batch, one preprocessing tPreCoreP and the queries.

“Procedure ppp of program PPP solves the task within TTT steps with need ν\nuν” (SolvesN) means: in every program that begins with PPP, for every instance and every memory satisfying the task's precondition, and all limits (word size, cells, call depth) allowing ν\nuν of the instance's parameters, the call of ppp with the instance's arguments ends within TTT of the parameters steps and leaves a memory satisfying the postcondition.

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
-/
-- Generated by skeleton subtraction from the ThreeSumApsp library at commit 3b45b374640a.

import Definitions.Def_APSP2995561_Defs2

set_option autoImplicit false
set_option relaxedAutoImplicit false

open Light
open Light.Batch
open ThreeSumApsp ThreeSumApsp.Batch Light.Sec4 Light.Filter2
Formal statement
theorem Light.Batch.oracle_solves : SolvesN Light.Filter2.oracleTask oProg pOracle
    (fun ps => oTimeF 3000000 (ps.getD 0 0) (ps.getD 1 0) (ps.getD 2 0) (ps.getD 3 0)) oNeed := by sorry
Source
Developed for the prove2.me APSP exponent campaign (https://prove2.me/campaigns/apsp-exponent) on top of the Lean formalization anthropics/formal-math, folder 3sum-apsp, commit e1a4e65 (https://github.com/anthropics/formal-math/tree/e1a4e6508154ea59f030480661590a9fe3018011/3sum-apsp; Lean v4.33.1, Mathlib v4.33.1). The statement comes from the file 3sum-apsp/ThreeSumApsp/Batch/Final.lean of the campaign's modified copy of that library, which is not published; the new definitions it uses are in the platform definition bundles APSP2995561_Defs1 and APSP2995561_Defs2 (and APSP2996001_Defs1-2, APSP299791_Defs1-5 of the earlier entries). It follows the technical note "Deterministic APSP via thin products" (revised 7 October 2026) refining J. Alman and V. Vassilevska Williams, "Truly Subquadratic 3SUM and Truly Subcubic APSP via Triangles in Sparse Lopsided Graphs", arXiv:2610.06783v1 (https://arxiv.org/abs/2610.06783v1), Lemma 4.1 and Proposition 2.1.

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