Finite witness recovery from modular lopsided answers #
Correct finite answers are ordinary Set.EqOn premises on the actual lopsided graphs.
The recovery scans each accepted piece until it finds an exact zero. Distinct failed scans
contain distinct modular false positives. No solver, native program or time oracle is assumed.
Main definitions #
scanPiece,runScans: finite witness search and number of scans.AnswersCorrect,IsScanOrder: correctness on queried pairs and a duplicate-free scan order.
Main results #
recovery_correct: sound and complete recovery with at mostfalsePositiveCount + 1scans.card_failedScans_le: false-positive accounting.falsePositiveCount_add_one_mul_pieceSize_le: bound on the number of vertices scanned.
References #
Adapted from Witnesses.lean and the minimal scan definitions in
PaperStatements.lean at anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5.
Context: [AlmanWilliams2026, Section 3]. Quoted docstring fragments reproduce comments in the pinned
formal source; other prose describes the local Lean API.
Proof of Theorem 17: "scan the piece C_k of its instance for a c with S(a,b,c) = 0". The
vertices of the piece are tried in increasing order; the result is the first c found, or none if
the scan fails.
Instances For
Proof of Theorem 17: "For every query pair that the oracle accepts". ans ι is the oracle's
answer to the instance with index ι. The result is the set of all (instance, query pair of that
instance) that the oracle accepts; each of them calls for one scan.
Instances For
Proof of Theorem 17: the scans, one after the other, over a list of accepted pairs: "We stop as
soon as a zero triangle is found." The result is the triangle found (or none) together with the
number of scans that were carried out.
Instances For
Proof of Theorem 17: "For every query pair that the oracle accepts, scan [...]". The paper does
not say in which order. L is an order of the scans: a list in which every accepted pair occurs
exactly once.
Instances For
Scans and accepted pairs #
Proof of Theorem 17, "scan the piece C_k of its instance for a c with S(a,b,c) = 0": a c that
a scan returns lies in the piece and has S(a,b,c) = 0.
The scan that belongs to x = ((ϱ, j, k), (a, b)), a query pair (a, b) of the instance with
index (ϱ, j, k): the piece C_k is scanned for the pair (a, b).
Instances For
Proof of Theorem 17: a "failed scan, of a piece C_k for a pair (a,b)": the oracle accepted the
pair in the instance, and the piece contains no c with S(a,b,c) = 0.
Instances For
The accepted pairs: an index of an instance, a query pair of that instance, and the answer "yes".
The sentences of the paragraph "Witnesses" #
Proof of Theorem 17: "A zero triangle is always found, since its c lies in some piece and makes the oracle accept its pair."
Proof of Theorem 17: "A failed scan, of a piece C_k for a pair (a,b), contains a c ∈ C_k with S(a,b,c) ≡ 0 (mod p) but S(a,b,c) ≠ 0, that is, a false positive (a,b,c) of p".
Proof of Theorem 17: "distinct scans contain distinct false positives": a triple (a,b,c)
belongs to the scan of at most one accepted pair.
Proof of Theorem 17: "distinct scans contain distinct false positives, so there are at most F(p)
failed scans", for any finite family s of scans and any notion "the scan x contains the triple
t". This applies to the accepted-pair scans in card_failedScans_le.
Proof of Theorem 17: "so there are at most F(p) failed scans".
For 16 ≤ D ≤ n, 1 ≤ g ≤ sqrt D, κ ≥ 1 and edge weights bounded by n^κ, bound
(falsePositiveCount + 1) * pieceSize at any selected prime by
(2 * falsePositiveConst + 2) * κ * n^3 * log n / g.
This arithmetic estimate counts candidate vertices rather than native instructions.
The output of the reduction #
Theorem 17, correctness. Given any correct answers of an oracle for
Lop-AE-SparseTri to the instances of the reduction, and whatever the order L of the scans, the
reduction's output is correct: it is a zero triangle if one exists, and none otherwise. It
carries out at most F(p) + 1 scans ("We stop as soon as a zero triangle is found").
Every finite set of accepted queries admits a duplicate-free scan order.
Correct finite answer tables exist. This is a finite specification, with no solver or complexity claim. Values outside the queried edges remain unconstrained.
Correct finite common-neighbor counts supply the Boolean answers used by recovery. This connects directly to the lopsided matrix/counting interface.
The recovery scan examines at most the uniform false-positive bound times the piece size. This counts candidate vertices only; it is not a charged native running-time theorem.
Finite reduction equivalence: scanning all accepted queries returns none exactly when the
original three matrices have no zero triangle. Any duplicate-free scan order works.