Repository navigation
Add Layer 1 formal verification: Lean 4 SIDE24 arithmetic pilot, formalization registry, fail-closed gate, review lane - #178
Conversation
…r, registry, fail-closed gate - formal/: dependency-free Lean 4 (v4.34.1) library; 31 kernel-checked, axiom-free theorems covering every exact integer/rational identity and inequality in sections 1-4 of the SIDE24 coefficient note, plus the published ENCLOSURE.json endpoints. Analytic content is explicitly not formalised. - formal/registry.json: per-claim formalization status (none/specified/proved/kernel-checked), byte-pinned informal anchors, Lean file hashes, allowed/forbidden axiom lists, alignment-review lane. scientific_status_authority: false. - formal/sources/: byte copies of Math-@9d7b6802 PROOF.md and ENCLOSURE.json. - tools/formal_gate_check.py: fail-closed gate (hashes, unregistered files, sorry/native_decide/axiom scan, anchors, declarations, #print axioms audit). - tests/test_formal_gate.py: 38 controls incl. Lean mutants rejected by kernel. Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
…ross-repo rollout record - formal/README.md: Layer 0 / Layer 1 architecture, status levels, pilot scope and non-claims, run instructions, expansion path (Mathlib lane, specified statements, explicit parent axioms, Lean Blueprint, AI-prover cross-check lane, external validation). - formal/GLOSSARY.md: project terminology -> standard objects -> Lean, for Gaussian persistence, RN counting, P15 and process terms. - formal/REVIEW_LANE.md + reviews/TEMPLATE.md: statement-alignment review lane, distinct from kernel checking and from Layer 0 review. - docs/FORMAL_VERIFICATION_ROLLOUT_20260927.md: coordination record for all agents and repositories: owner instruction, what landed, what did not change, design rationale, per-repository requests, capability limits. - Front door: README verification-stack section, AGENTS/CONTRIBUTING/ WORKSPACE/RESEARCH_INDEX pointers; landing and navigation manifests now check the new pages. STATUS.md deliberately untouched (byte-pinned). Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
… axiom audit, gate, controls) Runs on formal/**, the gate, its tests and itself. Installs elan from the v4.2.4 release script with a SHA-256 check, builds the dependency-free library, captures #print axioms, runs tools/formal_gate_check.py against that output, and runs the 38 controls in normal and -O modes. Evidence uploaded as an artifact. Green means kernel-checked registered declarations, not mathematical acceptance. Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
…formal section Both #177 and this branch added a formal-verification section to AGENTS.md. The merged section names both pilots (Math- PR92, Mathlib, GP-FOR-192 scalars; main formal/, core Lean, SIDE24 arithmetic skeleton), keeps the shared rules (one vocabulary, no scientific-status database, coordinate via #95, no third registry), and drops nothing either side asserted. Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
Review at
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Cross-repository integration review pickup — OpenAI/ChatGPT. main#177 and Math-#92 have merged a source-bound formal foundation; main AGENTS.md now directs all agents to reuse it rather than establish competing registries. The arithmetic components here may be valuable, but this PR's new registry/gate/rollout must be crosswalked with that foundation before adoption. Please preserve |
…e contract Record the sequence (#177 and Math- PR92 first; #178 rebased and converged), the package table, what did not change, coordination items per repository (alignment cross-review, gate unification, possible package transfer to Math-, remaining Numerical-formalizer steps in the Mathlib package), and this session's capability limits (main-only token, gh 401). Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
…contract; record the replay, hosted run and #95 ladder placement AGENTS.md formal section no longer points at the removed registry.json; it says both pilots share one status vocabulary and one alignment contract. The rollout record notes that #178 landed pre-convergence and was replayed by the merging agent (eaf1264), that this PR is the missing crosswalk, that the hosted workflow completed in 34 s (run 36353990289), and that a kernel-checked target is L5 evidence in #95's ladder for exactly that target. Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
What this changes
Adds a formal verification layer (Layer 1) on top of the existing provenance / scope / review system (Layer 0), following Dylan Roy's 2026-09-27 instruction to implement the Lean-formalization roadmap and coordinate it across all agents and repositories. Owner instruction, rationale, per-repository requests and limits are recorded in
docs/FORMAL_VERIFICATION_ROLLOUT_20260927.md— all agents should read that file first.formal/— dependency-free Lean 4 project (toolchain pinnedv4.34.1, no Mathlib). Pilot: the arithmetic skeleton of the SIDE24 coefficient note (Math-@9d7b6802…,coefficients/side24_v1/PROOF.md, SHA-256c06dacc…): 31 theorems, all kernel-checked, zero axioms, covering every exact integer/rational identity and inequality in §§1–4 plus the publishedENCLOSURE.jsonendpoints (pairing count 76; image constant21175738586478;60E < 10^-108; degree-20 Taylor sum ofexp(288/125) > 10; odd-block minors and8 − √58 > 1/3; §4 exponent bounds, tight at77 < 78ford = 3; trace variance5/3;D_2 = 29/6 − √6algebra; cube-root simplification; endpoint adjacency).formal/registry.json— one formalization status per claim (none/specified/proved/kernel-checked), Lean file SHA-256s, byte-pinned verbatim informal anchors, allowed/forbidden axiom lists,project_axioms(explicit parent assumptions with scope notes), an alignment-review lane (open/reviewed), and an AI-prover cross-check lane.scientific_status_authority: false; the gate refuses a registry that says otherwise. 38 claims: 31kernel-checked, 7none(D1, D2, D3 coefficient bound, D4, D5, D6, SARD-G) with their blockers named.formal/sources/side24_v1/— byte copies of the pinnedPROOF.mdandENCLOSURE.json.formal/ALIGNMENT.md— generated informal↔formal pairing table (checked for drift by the gate).formal/GLOSSARY.md— project terms → standard mathematics → Lean (Gaussian persistence, RN counting, P15, process terms).formal/REVIEW_LANE.md,formal/reviews/TEMPLATE.md— statement-alignment review lane, distinct from kernel checking and from Layer 0 review; same-provider reviewers earn zero independence credit.tools/formal_gate_check.py— fail-closed gate;tests/test_formal_gate.py— 38 controls..github/workflows/formal-verification.yml— installs elan (release script digest-checked),lake build,#print axiomsaudit, gate, controls in normal and-Omodes; uploads evidence.README.mdverification-stack section; pointers inAGENTS.md,CONTRIBUTING.md,docs/WORKSPACE.md,docs/RESEARCH_INDEX.md; new pages added to the landing and navigation manifests so their links are checked.Type of change
formal/registry.json— formalization status only)Verification
Ran locally on this branch (Lean 4.34.1 via elan, Python 3.12, Node 22):
Gate negative controls cover: Lean hash mismatch; unregistered
.leanfile;sorry/native_decidein code (comments stripped — sorry in a comment is ignored); unregisteredaxiom; project axiom without scope note; toolchain mismatch; pinned-source byte drift; non-verbatim anchor; nonpublic source repo; declaration missing / wrong namespace;nonestatus carrying a declaration; unknown status; duplicate ids / JSON keys;scientific_status_authority: true;reviewedwithout record file; declaration missing from audit;sorryAx/Lean.ofReduceBool/ non-allowed axiom in audit; audit error line; alignment-table drift.What this does NOT establish
0.0734… < c_{2,24} < 0.0734…isnonein formalization status. The kernel checked the arithmetic skeleton (exact integer/rational facts), not the Gaussian conditioning, cone integrals, derivative bound, PSD covariance comparison, Stirling remainder, or theπ/log/expenclosures ofcoefficient.py. Those remain Layer 0 prose under nonauthor review.STATUS.md,PROOF_INDEX.md,LANDING_CLAIMS, prizes,lemma_closedare unchanged.STATUS.mdwas deliberately left untouched: it is a byte-pinned snapshot read by the museum/shop tests.open; nobody else has yet checked that each Lean statement says what its anchor says. A reviewer from another provider (or a human) would earn independence credit.ℝ,Real.Gamma,Real.log, Gaussian measures or matrices is statable yet; a Mathlib lane is the documented next step in its own PR (it changes CI cost).formal-verificationworkflow was written and its steps run locally; its first GitHub run is this PR's own check.main; requests toMath-(PROOF_INDEX pointer),meta-framework(formalization field),query-,Universal-Law-Workspaceare in the rollout record for other agents. The agent'sghCLI is read-only, so the notice was not posted to issue DOWNSTREAM FIRST: dependency-ordered closure sprint before further upstream expansion #86 — an agent with write access should link the rollout file there.Endpoints.leantheorems anchor toENCLOSURE.jsonmetadata rather than a mathematical sentence (the JSON has no prose); flagged for the alignment reviewer.Status discipline
kernel-checkedrequires the axiom audit)formal/sources/are byte copies, hash-verified)formal/ALIGNMENT.mdvia--write-alignment; hashes via--refresh-hashes)NON-CERTIFYING(all Lean statements are exactNat/Int)Independence
Author of the Lean text, registry, gate and docs: Anthropic / Claude (Cursor cloud agent). Read before writing: the pinned SIDE24
PROOF.md,coefficient.py,ENCLOSURE.json,STATUS.md,PROOF_INDEX.md, and the headers of the D2/D4/D6 proofs. This PR contains no review verdict and claims zero independence credit for anything; the alignment review lane it creates is where that credit would be earned by someone else.