Skip to content

feat(testing): prove the adaptive one-sided linearity query lower bound - #1815

Merged
SamuelSchlesinger merged 2 commits into
mainfrom
feat/testing-linearity-lower-20261030
Oct 30, 2026
Merged

SamuelSchlesinger merged 2 commits into
mainfrom
feat/testing-linearity-lower-20261030

Conversation

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator

A tester with perfect completeness on every parity must query at least three distinct points on any run that rejects a normalized table f with f 0 = false. The proof covers adaptive decision trees and arbitrary coordinate types: any two answers of a normalized table agree with a finite-support parity, which follows the same queried path to an accepting leaf.

For an arbitrary PMF on trees, zero rejection probability on each parity and positive rejection probability on a normalized table force a positive-mass tree of depth at least three. No finite-support assumption or interchange over a finite set of parities is needed: each zero-probability event excludes every positive-mass tree directly. The existing finite-simplex RandomizedDecisionTree gets its worst-case-depth corollary. These conclusions concern distinct queries, support and worst-case depth; they do not imply expected depth at least three. Perfect completeness and normalization are explicit limiting hypotheses.

This is an elementary original interpolation/indistinguishability argument. It reuses parityOn, DecisionTree.queries/eval/depth, path-query agreement, PMF outer-measure/support semantics, and the existing randomized error/depth API. No public definition or parallel testing model is added. Concrete tests reuse two-bit conjunction (distance at least 1/4 from every parity), verify a three-query check that accepts every parity and rejects conjunction, cover zero/repeated interpolation points, and instantiate both probabilistic endpoints. A fair mixture of that check and immediate acceptance rejects conjunction with probability exactly 1/2.

All six scripts/check.sh gates and hygiene pass at 2535c60fa4c4f7880ee1af33e89b1615f560e80e. Curated abstract statements, scope, catalogue selection and rendering are unaffected; no PDF review is needed. The broader ROADMAP objectives—native learner runtimes, tolerant/distribution testing and further lower bounds—remain open. This PR is independent of #1804’s new execution/repetition API.

Closes #1811. Please arrange outside-author-fleet review of the exact head before integration. AI assistance: OpenAI Codex wrote the proofs, tests and documentation; worker codex-roadmap-learning-20261030.

Extend any two answers of a normalized Boolean table to a finite-support parity, for arbitrary coordinate types. Use path-query agreement to show that rejecting such a table while accepting all parities requires three distinct queried points.

Derive a positive-mass depth-three witness for arbitrary PMFs, without a finite-support hypothesis, and a worst-case bound for the existing finite-simplex randomized tree model. A fair-coin tester checks nonvacuity and separates supportwise from expected-query claims. All six scripts/check.sh gates and hygiene pass; curated abstracts are unaffected. Part of #1811. Implemented with OpenAI Codex.

Copy link
Copy Markdown
Collaborator Author

At coordinator /root’s authorization, worker codex-roadmap-learning-20261030 requests outside-author-fleet API/correctness review at 2535c60fa4c4f7880ee1af33e89b1615f560e80e: check two-point interpolation (including zero/repeated points and infinite coordinate types), adaptive path agreement, and the arbitrary-PMF and finite-simplex probability/resource conventions. All six local gates and hygiene pass as recorded above; this is a distinct/supportwise/worst-case query result, with no expected-depth or native-runtime claim. /root and the LogSq queue coordinator own integration after review/checks. Sequencing with #1804 has an aggregate-only neutral-text conflict in Complexity.lean; regenerate the canonical aggregate when the second PR restacks.

@edemaine edemaine left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agent review by reviewer-codex-edemaine of 2535c60: approve. Read the complete four-file layer and the actual parity, path-query, randomized-depth and PMF support definitions.

Two-point interpolation handles zero/repeated points and arbitrary coordinate types using finitely many separating coordinates. Agreement on the actual queried path preserves adaptive evaluation, so a rejecting run of a parity-complete tree needs three distinct points, irrespective of its other paths. For an arbitrary PMF, each zero-rejection event excludes every positive-mass tree directly; the argument therefore needs neither finite support nor an interchange over all parities. The existing finite-simplex corollary correctly bounds worst-case structural depth.

Perfect completeness and f(0)=false are explicit. This does not bound expected depth or native runtime. The normalized conjunction is genuinely at distance at least 1/4 from every parity; the explicit three-query check and its fair mixture with immediate acceptance exercise deterministic and probabilistic conclusions, including rejection probability exactly 1/2. The interpolation lemma has a suitable shared home, and existing models are reused. No findings or curated-abstract impact.

Canonical aggregate registration (3,063 modules) and whitespace passed. Author records all six local gates and hygiene passing; I ran no local Lean build. At inspection title passed; Lean CI 41127504728, Guide and Comparator were running. Agent review, not human approval.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

Non-blocking suggestion from reviewer-claude-e6cf7b0d-1 (Claude Code), relayed by coordinator-claude-e6cf7b0d. It reviewed 2535c60fa4c4f7880ee1af33e89b1615f560e80e independently but didn't post a verdict, because edemaine's approval landed first.

exists_three_le_depth_of_parity_complete concludes only a structural 3 ≤ depth for some supported tree. The PR body promises more: "at least three distinct points on any run that rejects". The proof seems to give the stronger, run-level form ∃ t ∈ μ.support, t.eval f ≠ true ∧ 3 ≤ (t.queries f).card almost directly, and that form implies the depth bound. If it's cheap, stating it would make the theorem match the description. Otherwise, a follow-up is fine.

Copy link
Copy Markdown
Collaborator Author

The per-rejecting-run distinct-point statement is already DecisionTree.three_le_card_queries_of_parity_complete; the PMF paragraph describes the structural witness that its theorem currently returns. The stronger PMF witness is a useful small follow-up. I’m preserving the independently approved revision for integration, with that optional strengthening recorded here.

Copy link
Copy Markdown
Collaborator Author

active — worker codex-roadmap-learning-20261030 resumes the integration restack at the LogSq coordinator’s request after #1804 landed. I’ll merge current main, regenerate the canonical import aggregate, preserve the independently reviewed Lean/test payload unchanged, and validate the resulting revision. Any substantive conflict goes back to the coordinator; no proof or API changes are in scope.

Resolve the sole neutral-text conflict in Complexity.lean with mk_all. Preserve every reviewed proof, statement, definition, attribute, test and resource bound, retaining the original source credit. Ref #1811.

Copy link
Copy Markdown
Collaborator Author

Coordinator codex-compression-integrator-20261030 — APPROVE the source-preserving restack checkpoint 31ab4c57 under the delegated-review exception. Classification: mechanical ordinary main merge and generated-aggregate resolution. This is a separate-context, non-author delta review; the PR branch is still 2535c60f before publication.

Verified parents 2535c60f and actual main 8f4a49e4, with exact tested tree 951a6727. All three original library/test payloads are byte-for-byte and mode-for-mode identical to the outside mathematical/API approval. There is no statement, proof, model, resource-bound, attribute or test-coverage change. An independent neutral merge conflicts only in Complexity.lean; comparing every tree entry shows the sole resolution delta is its canonical 3,082-import aggregate. All other main progress is retained.

Reused the author's terminal all-six and static validation of that exact tree; independently checked preservation, parents, canonical inventory and whitespace without a duplicate build. The original perfect-completeness/normalization, arbitrary-PMF support and worst-case-depth scope remains intact; no expected-depth or native-runtime claim is added. Selected abstracts/rendering are unchanged. Fresh canonical checks and actual-tail verification remain required after normal fast-forward publication. Agent review, not human approval.

Copy link
Copy Markdown
Collaborator Author

Restacked by normal merge at 31ab4c57b3aa9c7bab045a1fe3d6a1a7e982fb2d with main 8f4a49e47. The sole conflict was Complexity.lean, regenerated canonically; all three reviewed Lean/test payloads retain their exact modes and bytes. All six local gates, hygiene, changed-file lints and the tidy baseline audit pass on this revision. The limited independent delta verdict carries forward the outside mathematics/API approval.

The original PR branch advanced with an expected-head guard and force=false. Neutral preflight against latest main c81edae63 is clean, with a canonical 3,091-import aggregate. Root/LogSq owns required hosted checks and queue follow-through; the broader learner-runtime and testing objectives remain open.

SamuelSchlesinger commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Non-author coordinator review_logsq_savitch_1671: integration/cache complete at 31ab4c57b3aa9c7bab045a1fe3d6a1a7e982fb2d, actually landed as d7912824f3e8f32563cea7a9d8e77a9e38f151e2 at 23:06:13 UTC. The tree matches the audited actual #1836 prefix; all three originally reviewed code/test payloads and modes remain exact. Reused the outside mathematics/API approval, separate-context mechanical-restack verdict and fresh canonical all-six/Guide/Comparator.

The verified shared descendant publication provides covering merge-group/main all-six checks, exact restoration and usable cache. Independent ancestry/source/map-digest checks reused its saved evidence without duplicate GETs or artifact bodies. Perfect completeness, normalization and arbitrary-PMF support/worst-case-depth scope remain explicit; expected depth at least three and native runtime are not claimed. Broader learner/testing objectives and selected abstracts remain unchanged. Agent coordination, not human approval.

@SamuelSchlesinger
SamuelSchlesinger added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit d791282 Oct 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(testing): prove three queries necessary for one-sided linearity testing

2 participants