Skip to content

Formalize three drafting proposals' lemmas (fixed and checked with Lean 4.19.0) - #152

Merged
SamMausberg merged 4 commits into
mainfrom
frontier/lean
Oct 1, 2026
Merged

SamMausberg merged 4 commits into
mainfrom
frontier/lean

Conversation

@SamMausberg

Copy link
Copy Markdown
Owner

This PR adds the Lean sources of three drafting proposals under formal/drafting/: innovation-clock drafting, prefix-isolated sparse planning and causal defect drafting. The author supplied them; they are fixed and checked here. Two of their theorems back the drafting-frontier oracles in #151, so merge this after #151:

  • teacher_forced_prefix_iff: a deterministic causal proposal's free-running accepted prefix equals its teacher-forced one.
  • oracle_clipping.

Commits (kept separate so the diff to the supplied sources is visible)

  1. a47dd8a imports the three files byte-identical to the supplied sources. They do not elaborate.
  2. b067004 applies two mechanical fixes. No theorem statement changes, apart from the spelling of one binder.
    • Nat.strong_induction_on is a Mathlib name, absent from core and Std. It becomes core's Nat.strongRecOn, with case name ind.
    • A binder named prefix, which is a keyword, becomes «prefix».
  3. 4533e5e updates the documentation and the check.
    • It replaces the stale "not compiled" headers with neutral provenance and the caveats.
    • It adds #print axioms for every theorem.
    • It describes in formal/STATUS.md what each file proves and what it does not.
    • It extends scripts/check_lean.sh to formal/drafting/.
  4. 90c5ba2 regenerates evidence/precision/lean_check.log with the extended check.

Result

With Lean 4.19.0, bash scripts/check_lean.sh elaborates the whole formal/ tree with no errors and no sorry (exit 0). The run was single-core under the lock's CPU window. All 33 drafting theorems depend only on propext, Quot.sound and Classical.choice. The only warnings are two unused [DecidableEq α] section variables.

Caveats (also in the headers and STATUS.md)

  • CausalDefect.weighted_depth: this is correct but needs exact locality. For a real target, the defect F - G depends on every earlier position, so the bound is one sweep per position, the bound of plain Jacobi iteration. The proposal's one-sweep claim rests on the margin lemma instead.
  • PrefixIsolatedPlanning: the expected-progress formula, sampled proposals and the uniform-target obstruction are not formalized. The obstruction is checked by hand in evidence/frontier/README.md (Drafting-frontier oracles: P-A, P-B and P-C fail their first decisive test #151).
  • InnovationDrafting: the Bellman part is a generic potential lower bound and constructs no oracle. The counting and survival claims are not formalized.
  • General: most results are elementary inductions and integer arithmetic. They state the proposals' deterministic lemmas faithfully. They do not model probability, floating point, GPU kernels or learned-model accuracy.

The author supplied Lean sources for three drafting proposals
(innovation-clock drafting, prefix-isolated sparse planning, causal defect
drafting). They are added byte-identical to the supplied files; they do not
elaborate yet (a Mathlib-only induction name and a keyword used as an
identifier), which the next commit fixes.
Two mechanical fixes, no statement changes: the Mathlib-only
`Nat.strong_induction_on` becomes core's `Nat.strongRecOn` (case `ind`),
and a binder named `prefix`, a keyword, becomes `«prefix»`.
Replace the stale "not compiled" headers with neutral provenance and the
caveats, print the axioms of every theorem, describe what each file proves
in formal/STATUS.md (including that weighted_depth gives only the Jacobi
bound for a real target), and extend scripts/check_lean.sh to
formal/drafting/.
scripts/check_lean.sh now covers formal/drafting/; the log is its output at
4533e5e (no errors; the drafting theorems use only standard axioms).
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T18:57:25.135062Z 90c5ba2 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 90c5ba22b4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE (90c5ba2; merge after #151)

  • The import is as supplied. The three sources at a47dd8a are identical to the supplied files.
  • The fixes are mechanical. b067004 makes them elaborate with Lean 4.19.0. The only change to a theorem statement is the binder prefix spelled «prefix», and STATUS.md says so.
  • The check reproduces. scripts/check_lean.sh at this head exits 0, and its output is identical to the committed evidence/precision/lean_check.log (66 lines, apart from the version line).
    • It reports #print axioms for 33 theorems in formal/drafting/: 5 use no axioms, the rest use only propext, Quot.sound and Classical.choice.
    • There is no sorry, and the only warnings are the two unused [DecidableEq α] section variables that STATUS.md names.
  • STATUS.md keeps the scope caveats. For example, the premises require exact locality.
  • Checks. Codex found no issues on this head (18:57 UTC), and pre-commit from main is clean.

@SamMausberg
SamMausberg merged commit 5b7b2bd into main Oct 1, 2026
@SamMausberg
SamMausberg deleted the frontier/lean branch October 1, 2026 19:25
SamMausberg added a commit that referenced this pull request Oct 1, 2026
…ommitted rules (#151, #152)

From evidence/frontier (#151), each an oracle upper bound on the block-16
DFlash trace with the Triton verify cycle (exactness pending), under rules
committed before the oracles ran:
- P-A innovation-clock: interpreter wrong at 0.47-0.54 of positions; the
  perfect-event oracle is rejected up to 16 free overrides per cycle and
  passes only at 32; candidate-based controllers cover 0.924 against
  0.9892 (B = 64) and 0.9925 (B = 256) needed.
- P-B prefix-isolated planning: first-gap bound at most 14.4-37.0 at
  B = 64 (44.4 needed) and 43.4 at B = 256 (111.6) for 2-16 anchors;
  43.4 after a post-run correction from 39.7, no verdict changed.
- P-C causal defect: at most 1.60-2.00 accepted drafts per boundary
  against 3.56 for fresh DFlash.
One sentence on formal/drafting (#152): the Lean statements elaborate with
no sorry and establish the encodings, clipping and audit soundness, not
the speed-ups; the convergence bound needs exact locality and gives one
sweep per position for a real target. New subsection app:external-drafting,
register entry drafting-oracles, three status rows; the lean entry and
A.8's machine-checked paragraph now cover the three drafting files.
SamMausberg added a commit that referenced this pull request Oct 1, 2026
Appendix F: three external drafting proposals are no-go under their committed rules (#151, #152)
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.

1 participant