Repository navigation
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Milestone
Description
Objective
Deliver LexLean v0.4 as a major architectural expansion beyond v0.3 along three coordinated paths:
- General formal programming language — extend the closed semantic language so substantial total programs, compilers, reusable abstractions, and their proofs are authored natively in LexLean rather than through raw Lean/backend escapes.
- PrismPM production integration — make production compilation a LexLean-authored, Lean-verified program, with the existing
auser/lean4-prodused only as a differential validation oracle during transition. - Language and reasoning models — add closed, typed model/reasoning semantics that can be compiled as ordinary LexLean computational objects and consumed by PrismPM applications.
The release must preserve LexLean's defining invariants: closed semantics, one linked semantic source for Lean/LaTeX/snapshots, no raw backend payloads, deterministic identities, exact axiom policies, fail-closed diagnostics, and the established falsifiable just vv acceptance discipline.
Non-negotiable design rules
- Do not equate compiler verification, self-hosting, or oracle agreement with global optimality.
- Do not define the global candidate universe as “what the optimizer can generate.”
- UOR-GNAF/NAF optimality claims must use an independently defined complete-system universe, exact machine/accounting boundary, explicit objective/order, and either proof-complete comparison or a universal lower bound attained by the selected realization.
- Internal plan optimality is not complete-system optimality.
- Representation minimality/non-adjacency is not execution optimality without a proved representation-to-execution bridge.
lean4-prodis validation evidence only; it is not the normative compiler semantics or proof of optimality.- Existing language 1.0/1.1 projects and v0.3 artifacts must not silently change meaning.
Required issue discipline
Every child capability must follow the repository's standing R3 discipline:
- register normative capability IDs in
model/ids.tomland SPEC §31; - add exactly one matching scenario per ID;
- add exactly one named
conformance_<id>test; - implement positive and negative fixtures;
- plant and record a defect proving the relevant gate can fail;
- run the targeted gate while developing and the complete
just vvgate before completion.
No issue may close on prose/spec work alone if it introduces a normative capability.
Definition of done
- All v0.4 child issues are closed with their acceptance evidence.
SPEC.md, schemas, language data, model registers, generatedCONFORMANCE.md/ERRORS.md, README, CHANGELOG, and VERIFICATION evidence agree.- All new public failures are registered in the closed error model.
- Every new semantic variant is represented in semantic snapshots, canonical serialization, Lean lowering, LaTeX rendering, source maps, lexical/output coverage, and deterministic identities as applicable.
- Existing 1.0/1.1 examples remain byte-stable except where an explicitly versioned migration is part of the accepted v0.4 contract.
- New end-to-end v0.4 examples cover the formal-programming, production-compiler, model, and reasoning paths.
- Lean-backed examples elaborate under the pinned toolchain, replay through
leanchecker, and pass exact axiom audit. - Reproducibility/golden gates pass across the repository's supported host policy.
just vvpasses from a clean checkout.- The v0.4 release checklist contains no deferred capability, placeholder, disabled branch, or “future work” needed for any claimed v0.4 feature.
Acceptance criteria
- A fresh checkout can exercise all three paths without handwritten Lean or backend-specific semantic bypasses.
- A substantial compiler implementation is authored as LexLean source and verified as generated Lean.
- The production path emits canonical Rust with a machine-checkable semantic-preservation result and only makes a global-optimality claim when the GNAF completeness/lower-bound obligations are discharged.
lean4-prodoracle mismatches are fail-closed validation failures and cannot be used to expand the formal claim.- A nontrivial language-model realization and a nontrivial reasoning-model realization are represented by closed LexLean semantics and compile through the same production boundary as ordinary programs.
- All new claims are registered at the correct honesty level; no measured/oracle result is represented as a proof.
v0.4 work graph
Foundation / language
- [v0.4] Define language 1.2 and compatibility/migration contract #16 Language 1.2 compatibility and migration contract
- [v0.4] Generalize semantic types: recursive algebraic data, products/records, and parameterized inductives #17 Recursive/parameterized semantic data types
- [v0.4] Add first-class functions, lambdas, higher-order composition, and closure-safe semantics #18 First-class functions and higher-order semantics
- [v0.4] Generalize total recursion, mutual recursion, well-founded recursion, and termination evidence #19 General total and well-founded recursion
- [v0.4] Add finite maps, sets, sequences, graph data, and deterministic state-threading primitives #20 Deterministic maps/sets/sequences/graphs/state
- [v0.4] Define typed Lean compiler-frontend/LCNF authority interface and verified named-root extraction #35 Typed Lean compiler-frontend/LCNF authority interface
- [v0.4] Define production eligibility, root closure, and formal-only vs executable semantic boundary #36 Production eligibility and executable-root closure
Verified production compiler / GNAF / PrismPM
- [v0.4] Define the production realization calculus and exact Rust target semantics #21 Production realization calculus and Rust target semantics
- [v0.4] Define independent complete-system candidate universe, machine contract, and objective order for GNAF #22 Independent complete-system universe, machine contract, and objective order
- [v0.4] Implement LexLean-native GNAF certification and global lower-bound attainment framework #23 LexLean-native GNAF certification and global lower-bound attainment
- [v0.4] Implement canonical Rust AST/rendering backend from the production calculus #24 Canonical Rust AST/rendering backend
- [v0.4] Prove source→target→Rust semantic preservation for production-eligible LexLean #25 End-to-end semantic-preservation proof
- [v0.4] Integrate auser/lean4-prod strictly as a differential validation oracle #26 lean4-prod differential validation oracle
- [v0.4] Author the production compiler itself in LexLean and verify the generated Lean implementation #27 Production compiler authored in LexLean and verified as generated Lean
- [v0.4] Add PrismPM production export contract and stable compiler API #28 PrismPM production export contract and stable compiler API
Models and reasoning
- [v0.4] Introduce closed Model, Realization, Contract, and Evidence semantics #29 Model / Realization / Contract / Evidence semantics
- [v0.4] Add language-model semantic components and compositional text-processing pipeline #30 Language-model semantic components
- [v0.4] Add reasoning-machine semantics: state, rules, search, verification, iteration, and termination #31 Reasoning-machine semantics
- [v0.4] Build model/reasoning stdlib composition and PrismPM application fixture #32 Model/reasoning stdlib composition and PrismPM application fixture
Release verification and closure
- [v0.4] Extend vv for production compiler, GNAF certificates, Rust artifacts, and oracle falsification #33 Extend vv to all v0.4 production/model/reasoning claims
- [v0.4] End-to-end release closure, examples, documentation, packaging, and clean-checkout reproducibility #34 End-to-end examples, documentation, packaging, and release closure
Recommended dependency order
- [v0.4] Define language 1.2 and compatibility/migration contract #16
- [v0.4] Generalize semantic types: recursive algebraic data, products/records, and parameterized inductives #17, [v0.4] Add first-class functions, lambdas, higher-order composition, and closure-safe semantics #18, [v0.4] Generalize total recursion, mutual recursion, well-founded recursion, and termination evidence #19, [v0.4] Add finite maps, sets, sequences, graph data, and deterministic state-threading primitives #20
- [v0.4] Define typed Lean compiler-frontend/LCNF authority interface and verified named-root extraction #35, [v0.4] Define production eligibility, root closure, and formal-only vs executable semantic boundary #36
- [v0.4] Define the production realization calculus and exact Rust target semantics #21, [v0.4] Define independent complete-system candidate universe, machine contract, and objective order for GNAF #22
- [v0.4] Implement LexLean-native GNAF certification and global lower-bound attainment framework #23, [v0.4] Implement canonical Rust AST/rendering backend from the production calculus #24, [v0.4] Prove source→target→Rust semantic preservation for production-eligible LexLean #25
- [v0.4] Author the production compiler itself in LexLean and verify the generated Lean implementation #27 and [v0.4] Integrate auser/lean4-prod strictly as a differential validation oracle #26
- [v0.4] Add PrismPM production export contract and stable compiler API #28
- [v0.4] Introduce closed Model, Realization, Contract, and Evidence semantics #29, [v0.4] Add language-model semantic components and compositional text-processing pipeline #30, [v0.4] Add reasoning-machine semantics: state, rules, search, verification, iteration, and termination #31
- [v0.4] Build model/reasoning stdlib composition and PrismPM application fixture #32
- [v0.4] Extend vv for production compiler, GNAF certificates, Rust artifacts, and oracle falsification #33
- [v0.4] End-to-end release closure, examples, documentation, packaging, and clean-checkout reproducibility #34
Parallel work is acceptable only when the affected semantic contracts are already fixed. No downstream implementation should invent a local substitute for an unresolved upstream semantic boundary.
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Type
Projects
- StatusShow more project fieldsTodo
- StatusShow more project fieldsTodo
Activity
afflom commentedon Oct 15, 2026
The completion plan for the 0.5.0 release, which continues this program, is #106.
Generated by Claude Code
afflom commentedon Oct 17, 2026
v0.4 status, 2026-10-17 03:00Z, from the maintainer.
mainisc3905e7c(register 393). Landed since the last update: #158 (integer order and fold laws, #117), #146 (certificate E as data, #89 stage 1), #159 (bddas parts of one run, #131), #153 (stdlib member 1, #92). Main's push runs on097b9b97andccd37ec7are green; the one onc3905e7cis running.Open v0.4 issues and what stands between each and close
claude/issue-89-certificate-b, no new library lemmas needed; stage 4 (audit module and the no-Lean-template gate) not startedItemproofs, stage 3 (loop, memory model), stage 4; a second session for the package-scaffolding slice is proposed on #91 and not answeredBS-01) is #160, ready, CI running; source packages (#161, PR #162, draft) is the missing mechanism for a project to import the stdlib; the effects boundary waits on #91 stage 4LM-01..LM-03,LM-13) is #82, CI running, moves the language-1.2 identity; context windows, generators, classifiers, adapters, composition followloopWhat limits the pace. Each landing is two hours of CI, and every PR that moves the language-1.2 identity (#82, #162, later #91 stage 2 and 3) makes every other PR with 1.2 records regenerate once. The org has 20 concurrent runner jobs, shared across repositories. The rules in force: a PR merges on a green head that contains main and carries a review from someone other than its author (the maintainer records one for sessions' PRs, and approves hh's formally); contributors push a draft PR at most about every 90 minutes; #159's
bddparts took therestleg from 111 to 23 minutes, so the longest path of a ready run is now the Atlas side.Not in the v0.4 path. #150 (#118), #151 (#114), #68 stay open as v0.5 or stale; I carry them after the wave above.
Generated by Claude Code
afflom commentedon Oct 17, 2026
v0.4 status, 2026-10-17 10:10Z, from the maintainer.
mainisea0a4eda(register 402). Since the 03:05Z update: #82 (tokenizers, slice 1 of #30:LM-01..LM-03,LM-13), #160 (the axiom-output parser as a certified production root,BS-01, step 4 of #92) and #162 (source packages,PK-01..PK-04, most of #161) are merged, each on a green head that contained main, with a review recorded; the main push runs onc3905e7c,d22266b3and8a844674are green (the one onea0a4edais next). Earlier today: #158, #146, #159, #153.isDefEq-equal, no library growth; it follows A. Stage 4 (audit module and the gate) is mine, after bothWhat costs time: every landing is about two hours of CI and every identity move (#82, #162, and #155 next) makes every other PR with language-1.2 records regenerate once. Both contributor sessions on #89 and the #161 session are merging main now; no more identity moves are planned before A and B land except #155's.
Generated by Claude Code
afflom commentedon Oct 17, 2026
v0.4 status and plan, 2026-10-17 17:00Z, from the maintainer.
mainis243f0c73(register 403: #165 merged, which closes #161). The owner's instruction today: complete the release asap; #68 is completed with the other pull requests and all v0.4 work; #131 (CI cost) is critical. What that changed:1. CI cost (#131), decided with the owner: the two-tier gate, #166. A merged PR cost about 1,450 runner-minutes on the 20 shared jobs: about 2.7 runs of about 500 (a draft push already paid the host matrix,
examplesand everybddrow, about 300) plus a full re-run onmainof a tree a PR run had just passed. #166 adds aplanjob: a draft runs therestleg only (about 23 runner-minutes), a ready PR and a push tomainrun the whole gate, and a push tomainthat merges a head whose tree it equals, when a PR run of that head passed every job, runs nothing and names the run. Estimated 1,450 to about 600 per merged PR. The draft run of #166 itself already shows the plan on a real runner (plan, then onlyrest). It lands right after #155 (a CI-only change merged on a verified local merge, announced, backstopped by the push run). Rule for all contributor sessions, from now: keep a PR a draft until its head is final and containsmain; mark it ready once; I merge only a head that containsmain.2. One train instead of five regenerations. Every PR that moves the language-1.2 ID makes every other regenerate (about three hours of writers plus two of CI each). I regenerated #155 on the combined identity myself at hh's request (
5a04afd1,63dd4c08…, register 404); its run is in progress. The identity-moving or record-moving PRs in flight ride in one integration branch, one regeneration, one CI run, after #155 lands: certificate A (#157) and B (#163), #151 (widening conversions, SM-32), #150 (dyadic decoding, MD-13), #68 (explicit byte literals, owner decision), and #91 slice 1 (package scaffolding as generated output, with #105 step 3b; hh agreed on #91). One contributor session each, hand-written work only; #150, #151 are pushed (train/dyadic,train/widening), the others report next. Each PR is still reviewed against its issue's DoD and merged as its commits land.5a04afd1; full gate runningissue-30-language-modelbranch holds the next slicesWhat bounds the date. Not CI any more, once #166 lands: the #91 chain (7 to 13 serial landings, each a regeneration and a gate run of about 90 minutes if the pool is free, after which #105 and #92's compiler components follow). I will state a date when hh posts the
ItemDefmeasurement and the stage 3 count; I will not guess one. What shortens it: (a) fewer, larger #91 PRs where the proofs allow (hh's low end is 7), (b) trains for everything else, as above, (c) the regeneration as one command, which I will make if a second landing needs it.Generated by Claude Code
afflom commentedon Oct 18, 2026
v0.4 status, 2026-10-18 18:30Z, from the maintainer.
mainisefea57d85(register 414). Since the last status (243f0c73, register 403), three merges under the owner's rule of today — a PR merges when its gate is green on its head and its linked issue's DoD is met, without waiting on a second reviewer:193cd2148): fix(backend): lower explicit shared byte literals without widening limits #68 byte literals, feat(semantic-ir): byte and fixed-width widening conversions in language 1.2 (SM-32, #114) #151 widening (SM-32, closes [0.5.0] Byte-to-fixed-width conversion in the language-1.2 surface #114), feat(models): decode IEEE-754 bit patterns as exact dyadic rationals (MD-13, #118) #150 dyadic floats (MD-13, closes [0.5.0] IEEE-754 bit patterns as exact dyadic rationals #118), feat(preservation): certificate A as kernel-term data (stage 3 of #89) #157 certificate A as data (SP-15), feat(preservation): certificate B as kernel-term data (SP-16) #163 certificate B as data and no Lean text template in the production compiler (SP-16,SP-17), [v0.4] #27 stage 6: complete the closed Rust AST so the runtime is generated from the calculus #91 slice 1 (package scaffold as data), the RT fix of [0.5.0] Lemmas for universal equalities over list folds #117. Closes [v0.4] #27 stage 5: certificates A, B, E and the audit modules as typed data, with no Lean text template in the production compiler #89 (DoD on the issue). Approved by hh.d51d9f223):BS-02, the preservation lexer and token audit as language-1.2 source ([v0.4] #27 stage 8: the production compiler authored in .lex.tex and compiled by LexLean to production software #92 step 3), with Blank only test items in RT-04 source scanner (#169) #173 ([v0.4] RT-04: blank only test items, never the code after a cfg(test) that is not on an item (follow-up to #156) #169) and Assert tracked tree holds nothing repository walkers skip (#170) #174 ([v0.4] The tracked tree holds nothing the repository walkers skip (CACHEDIR.TAG, target, .lexlean, .lake) (follow-up to #156) #170).BS-01/BS-02run in thecompilerbdd part.efea57d85): Optimize certificate data builders and restore host-matrix timeout (#177) #189 fast certificate data builders (closes [v0.4] Certificates as kernel data tripled the non-Lean conformance suite on every host: run the stress arithmetic once, or make the data builders fast #177: Intel mac 140 → 104 min, whole gate 872 → 698 runner-minutes), Complete #167 release follow-ups: generation bounds, env audit, text, and coverage (#187) #188 release follow-ups (closes [v0.4] Release follow-ups to #167: generation bounds in SPEC, no undeclared environment variables, leftover text and coverage #187: generation bounds in SPEC,CL-17refuses undeclared environment reads, member-review text and coverage), Atlas: prove CensusCert4 and CensusCert10 from width-100 pieces (#168) #175 Census windows as width-100 pieces (closes [0.5.0] Split CensusCert4's 4,000 window into ten width-100 certificates #168, Atlas 198 → 152 runner-minutes).Each push to
mainran nothing (#166: the merge's tree equals the verified PR head). Measured gate cost per merged PR: about 700 runner-minutes once, instead of about 1,450 before #166.In flight: wave 4, the two identity-moving PRs regenerated together on
main: #172 (SL-02, SHA-256 as a standard-library member, stage 1 of #126) and #176 (#30 slice 2: context windows and text generators,LM-04..LM-06,LLT4016). The hand merges are done (register 418), the first phase of the sweep is written (locks, goldens, calculus, fixtures, export), andverify-examples --writeis running; then one gate. hh is welcome to review either after the fact.Open v0.4 issues after wave 4: #190 (
BS-02's differential on every host, with a proposal), #149 (refuse the data form, the milestone's last change), #105 steps 2–3, #91 later stages, #92 later steps, #30 slices 3–4, #32, #33, #34, and this issue. Of these, #149 is small and last by design; #105, #91, #92, #30 are staged programmes whose remaining stages are each larger than a day; #32, #33, #34 are the release-closure items. The owner's scope call for v0.4 is on which stages of #91/#92/#30/#105 the release waits for; the maintainer's recommendation follows on each issue once wave 4 is in.Generated by Claude Code
afflom commentedon Oct 20, 2026
Release lines, by the owner's direction of 2026-10-20: a release X.Y lives on the branch
release/vX.Y, cut frommainwhen its work begins; the milestone's pull requests target it; tags are made from it; it is merged forward into the next line after each landing;mainis the newest released line.release/v0.4andrelease/v0.5are cut atmain17f7e46 now, so v0.5 work starts without waiting for v0.4 to close. PR #226 states the rule in SPEC.md §9.4, runs the three workflows on a push to a release line under the same plan, and extendsRP-14to read the push triggers. The open v0.4 pull requests are retargeted torelease/v0.4when #226 lands; v0.5 pull requests targetrelease/v0.5. Identity-moving landings stay one at a time per line, one regeneration and one full gate each.Generated by Claude Code
afflom commentedon Oct 25, 2026
Maintainer, on the owner's direction (2026-10-25): the issue and PR count is growing faster than the release, and the release is the job. Until
v0.4.0is tagged, on every lane:Expr::Applynote from [0.5.0] #279: a fallible loop's ends are in its function's tail (RB-21) #300 goes on Production: a looped fallible function cannot tail-call another fallible function (LLB6005) #279, nothing new is opened.RB-21renumbering and the §17.13 sentence are done in the forward-merge commit ofrelease/v0.4intorelease/v0.5.What is left for v0.4, in order: #298 (H5, landing now), #304 (H6), #305 (H7-audit), the bootstrap stack via #315, #247 (#30 slice 4), #256 (#251, #252), #284 and #292, then #309 (version 0.4.0), the release rehearsal, the tag.
Generated by Claude Code
afflom commentedon Oct 25, 2026
Maintainer: the release cut has moved to the downstream boundary on the owner's note (#92, 6399822402): v0.4.0 =
release/v0.4as it stands + #309, tagged as soon as #309 is green; the heap half remainder, the bootstrap stack, #247, #256 and #284/#292 go to a new v0.4.1 patch milestone and land right after the tag, one regeneration at a time; steps 5 to 7 of #92 and #91's H7 stay in v0.5. Full ruling on #92. The moratorium above stands.Generated by Claude Code
afflom commentedon Oct 26, 2026
LexLean v0.4.0 is released.
v0.4.0ate0b74b81e6f49c83596a957d232c8383a5db1a25(release/v0.4).publish the release(cargo xtask release-checkaccepted the evidence; the CI evidence is the gate run of the tagged commit, per release-gate.sh ends the evidence with the line the release criterion reads #323).lexlean 0.4.0(published 19:20Z).Next: release/v0.4 is merged into
mainby PR (the line at its tag, SPEC §9.4), the hold on release/v0.4 landings is lifted (patch work on the line continues as 0.4.x; feature work goes to release/v0.5), and the second forward merge into release/v0.5 follows.Generated by Claude Code