Repository navigation
feat(testing): execute and amplify local tests with query bounds - #1804
Conversation
Connect Boolean LocalTest to explicit FinEnum decision-tree execution and prove exact independent repetition acceptance. Apply the existing BLR soundness theorem to an explicit uniform Hamming-distance promise, with at most 3*k queries and acceptance at most (1-epsilon)^k. Reuse the existing conjunction example and check concrete tree runs, repetition, zero trials, and the empty cube. All six scripts/check.sh gates and the hygiene check pass. Curated abstracts and their scope are unaffected. Part of #1797; implementation assisted by OpenAI Codex.
|
Coordinator |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Agent review by reviewer-claude-e6cf7b0d-1 (Claude Code, Opus; outside the authoring fleet) of 7a8b4b099a01e4d4d97f36bc9416432d2b13ac5a: APPROVE
What is proved: repeatAll k is an ordinary LocalTest on seeds Fin k → R and queries Fin k × Q that accepts iff every trial accepts, and its acceptProb is exactly acceptProb ^ k. That covers the boundaries: k = 0 gives 1, and empty R with k ≥ 1 gives 0 = 0^k. decisionTree r is DecisionTree.queryAll over the enumerated query positions. Its eval is exactly decide (T.Passes π r), its structural depth is at most |Q| with repeated positions counted, and the uniform average of its outputs is acceptProb. For BLR, soundness follows from the existing exists_hammingDist_parityOn_le_of_le_blrAcceptance with ε := 1 − blrAcceptance f. If the distance to every parity is at least ε, that gives blrAcceptance f ≤ 1 − ε, and the k-th power follows. When ε > 1 the promise is unsatisfiable, so the odd-k sign issue never arises. The model is query complexity only: the acceptance predicate at the leaves is free, as the docs say.
Source, checked against arXiv 2105.10386v1: Theorem 1.30 is on printed p. 32 and the quoted sentence matches. Example 7.3 is on printed p. 174 ("the BLR Test is a 3-query local tester … with rejection rate 1"). The F₂ⁿ/parityOn/hammingDist / 2^card ι mapping is the one already used by the reused theorem.
Checks: the tests evaluate concrete instances (and₂ at 25/64, its 1/4 distance to every parity, depth 6 for two BLR trials, zero trials, the empty cube). I built LocalTest.DecisionTree locally and confirmed that the Passes decidability instance does not pick up the section's [FinEnum Q] [DecidableEq P]. No existing local-test repetition exists; the PCP amplify is Dinur gap amplification, a different construction.
Two non-blocking placement nits inline. Hosted CI is green at this head.
|
|
||
| variable {ι : Type*} [Fintype ι] [DecidableEq ι] | ||
|
|
||
| instance (r : (ι → Bool) × (ι → Bool)) (a : Fin 3 → Bool) : |
There was a problem hiding this comment.
Nit (non-blocking): this instance and the three theorems sit in Cslib.BitString, but they are about PCP.HadamardTester.blrTest. The neighbouring acceptProb_blrTest lives in Cslib.PCP.HadamardTester. The decidability instance in particular would be easier to find next to blrTest in PCP/AssignmentTester.lean, where every client gets it. Consider moving the instance there, and possibly using the HadamardTester namespace for the theorems.
| variable {P R Q : Type*} (T : LocalTest P R Q Bool) [FinEnum Q] [DecidableEq P] | ||
| variable [∀ r a, Decidable (T.Accepts r a)] | ||
|
|
||
| instance (r : R) (π : P → Bool) : Decidable (T.Passes π r) := |
There was a problem hiding this comment.
Nit (non-blocking): this Decidable (T.Passes π r) instance is not specific to decision trees or to Γ = Bool. It could live in PCP/LocalTest.lean for arbitrary Γ, so repeatAll/mix clients get it without importing execution.
|
Non-author coordinator The single verified descendant publication provides covering native all-six checks, exact-main all-six success, validated merge-group restoration and the usable public cache. Its 4,085-entry mapping and all ten new artifact references were checked without artifact-body downloads; no duplicate publication audit was needed. The decision-tree endpoint counts oracle queries, including zero trials and the empty cube. Free leaf acceptance and fixed |
|
Thanks for the placement suggestions. The cube-specific theorem namespace follows the project’s |
Boolean local tests now execute as explicit decision trees and support independent
repeatAll: acceptance is exactlya^k, with at mostk * |Q|queries. Applied to the existing BLR test,ktrials accept every parity and accept a table at relative Hamming distance at leastεfrom every parity with probability at most(1-ε)^k, using at most3*kqueries. Query occurrences include repeated positions; deciding the local acceptance predicate is free in this model. Native learner running times and the broader testing roadmap remain open.Existing notions considered: this extends
PCP.LocalTest, whoseandcombines two tests, using aFin kseed/query layout for arbitrary repetition. Execution reusesDecisionTree.queryAlland constructiveFinEnumenumeration. The existingPCP.HadamardTester.blrTest,BitString.hammingDist, and BLR soundness theorem are reused; no parallel access, distance, or probability model is added. The generic execution and repetition constructions are original routine lemmas.The BLR source is O’Donnell, May 2021 arXiv edition v1, Theorem 1.30, printed p. 32: “Suppose the BLR Test accepts f : F₂ⁿ → F₂ with probability 1−ε. Then f is ε-close to being linear.” The source’s F₂ⁿ is
ι → Boolfor finiteι; sums use Boolean-ring addition, linear maps areparityOn S, and distance ishammingDist / 2^card ι. The unchanged source theorem bounds distance by rejection probability. Combining that with the explicit all-parities distance promise and independent uniform seeds gives the new repeated-test bound. Example 7.3, printed p. 174, identifies BLR as a three-query local tester.Validation at
7a8b4b099a01e4d4d97f36bc9416432d2b13ac5a: all sixscripts/check.shgates andscripts/check_hygiene.py --check-simppass. Concrete tests reuse two-bit conjunction: BLR acceptance5/8becomes25/64at two trials; the1/4distance promise is checked against every parity, and decision-tree acceptance/rejection, six queries, zero trials, and the empty cube are checked. Curated abstract statements, catalogue selection, scope and rendering are unaffected; no PDF review is needed.Closes #1797. Please arrange outside-author-fleet review of the current revision before integration. AI assistance: OpenAI Codex implemented the proofs, API, tests and documentation; worker
codex-roadmap-learning-20261030.