Repository navigation
Conversation
…ion (#278, R3: row, scenario, named test, first negative fixture) R3: the register row, the SPEC.md section 31 row, the scenario, the failing named test conformance_sm_37, and the negative fixture induction-nested-type, which records that `induction` on a type that holds a list of itself is refused as LLT4001 with a message that names `nested_induction`. No implementation: the fixture fails until the message changes. The count moves 446 to 447. Stacked on the DF-19 branch. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F4DJnZorC2Jd4MJfN9DbZk
… through its recursor (SM-37, #278) A language-1.2 theorem about a value of a nested inductive type (one that holds itself under List, Option, Result or a product, in no mutual group) may be proved by nested_induction: the proof names a parameter of the theorem, states one proposition for each auxiliary member of the type's recursive family (the family DF-19 computes) and gives a branch for every constructor of the type and of each member. The linker checks the members, the branch sets and the binder counts level by level before any backend; the backend lowers the step to `induction x using T.rec (motive_n := fun b => P)` and one positional `next binders =>` per minor premise, in the recursor's order whatever order the branches are written in. `induction` keeps refusing a nested type, and its message now names nested_induction. The theorem's scrutinee must be a theorem parameter so the backend knows its type to name T.rec; Environment.proof_parameters carries them. Both schemas gain the step. language/semantics-1.2.toml: semantic_ir 15 -> 16, proof_lowering 3 -> 4, which moves the 21.2 identity; the locks, records, goldens, fixtures and packages the digest binds are not regenerated here. examples/nested-induction proves leaves_le_size over Json by nested_induction, verified under Lean 4.32.1 with exactly the axioms propext and Quot.sound, which the SM-37 row now records. conformance_sm_37 refuses 49 plants as LLT4001 (reordered members, wrong binder counts and a missing branch on each level, a member of another instantiation, ...). A Rose (Rose Nat) case pins that the family counts a group only at its own type arguments. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F4DJnZorC2Jd4MJfN9DbZk
3d96929 to
1ee15ef
Compare
|
Maintainer review of The lowering is the agreed design (#278, comment 6346669084): Should fix
Nits: the SM-37 row, §31 and scenario say "the proof names the local" while the implementation and §17.10 require a theorem parameter and refuse a non-parameter local; say "names a parameter of the theorem" and regenerate CONFORMANCE.md. In Landing: SM-37 moves Generated by Claude Code |
…, Option and Result members (SM-37, #278) - examples/nested-induction carries no lexlean.lock: every lock is regenerated at landing on the identity current then. conformance_sm_37 locks its own copy of the example. - backend/semantic.rs: a nested_induction scrutinee with no named parameter is an LLI9001 diagnostic (proof and proof_branch return Result), not a guessed `<local>.rec`. - conformance_sm_37: Lean-backed positive cases with one member under Option and one under Result, with the goals asserted in the recursor's order, so the none,some and error,ok rows of family_constructors are exercised; the language-1.1 use and the four scrutinee misuses go through refuse_project (LLT4001, the message, no backend output). - The SM-37 row, SPEC section 31 and the scenario say the proof names a parameter of the theorem; CONFORMANCE.md regenerated. - VERIFICATION.md: the lib-test count is 213. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F4DJnZorC2Jd4MJfN9DbZk
|
Thanks. Everything is done and pushed to Should fix
Nits
Re-run on 🤖 Generated with Claude Code https://claude.ai/code/session_01F4DJnZorC2Jd4MJfN9DbZk Generated by Claude Code |
…ter laws (#27) Part of #18, part of #21. LexLean pin moves to UOR-Foundation/LexLean#292 at 0b0c95d96 (SM-37 on DF-19, release/v0.4), a branch commit until the LexLean release. Every export request pins its source ID, semantic ID and lock digest (LLC0204 on a stale request); cargo xtask export regenerates them. The writer half of the round trip is proved for every Json value by nested_induction. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F4DJnZorC2Jd4MJfN9DbZk
|
Maintainer: the round at SM-37 lands as its own identity wave after the #91 heap half, stacked on DF-19 (#284); I retarget, regenerate and recount then. Generated by Claude Code |
|
Maintainer queue refresh at unchanged After DF-19, the maintainer retargets/updates and reviews this integration, coordinates its schema/semantic_ir/proof_lowering identity wave and all official lock/export/golden/normalized-verification writers (including the new nested-induction example), reconciles counts, and requires focused SM/DF evidence plus the complete final-head gate and merged-tree evidence. Keep draft until that preparation is complete. Scoped delivery is #429; #278 remains open until both DF-19 and SM-37 are accepted. No duplicate implementation or independent writer run is requested. |
|
Maintainer source review refreshed at 0b0c95d. No new source blocker found; the earlier source acceptance remains. The live base branch now points to reviewed DF-19 head 9f3ca00, whose full CI is still running. The old 9d0896b value in PR metadata is the shared ancestor, not the current branch head. A read-only three-way integration against that current DF-19 head has six textual conflicts: README, SPEC, the examples/repository conformance files, language/semantics-1.2.toml, and xtask spec_links. The linker/backend/widening source combines textually. The two-head union is 471 claims and 303 prescribed negatives; the silently merged CHANGELOG total also needs correction. These are preparation counts, to be recomputed against the eventual landing base. The identity resolution must retain the current base's renderer/runtime pins while adding SM-37's semantic_ir 15→16 and proof_lowering 3→4 plus its schema changes. Selecting the old semantics file wholesale would restore stale pins. This remains a later coordinated identity wave: after #284 lands, update/retarget this existing PR, reconcile the source, use official affected writers and obtain final-head acceptance. No duplicate implementation, writer, or test run was started. #429 is the scoped delivery; #278 remains open until both recursion and induction work land. |
|
The DF-19 prerequisite is now actually merged on release/v0.4 as1a690b51, after its complete passing gate. I refreshed the accepted source review and current head0b0c95d96: the SM-37 implementation remains the existing delivery; its historical stale-lock CI does not invalidate that source acceptance. I am carrying forward the existing six-conflict source reconciliation on this PR, preserving the reviewed implementation and current base identities rather than taking its old semantics pins wholesale. The pending Host integration943b adds another claim and current renderer inputs, so combined counts must come from the actual union. This is source preparation only while Host’s final gate runs; no second identity/product wave or unchanged-head CI rerun is starting. Keep #429/#278 open. The final changed head still owes official artifacts, focused SM-37/DF-13/DF-19 evidence and full acceptance before merge. |
|
The reviewed SM37 source at 0b0c95d is retained by ancestry and source in the combined #393 carrier at 3fe13b5, with accepted Host/DF19 and BS16. Official products, including the new nested example and LLT4001 negative, passed their producer/artifact reviews. The full exact-head hosted CI41889333456 and reproducibility41889261587 are running; all SM37 plants and unchanged obligations remain required. Keep this draft and #429/#278 open. After complete combined acceptance, this PR will be explicitly superseded before carrier merge; #429 closes only after actual landing/tree equality, and #278 needs a separate full-scope reassessment. |
|
Superseded by the reviewed combined delivery in #393, final head I am explicitly closing this draft as superseded BEFORE the carrier merge. This is not a separate landing or an assertion that the old draft passed a complete gate. Its implementation, review corrections and history are retained by the carrier. Scoped issues remain open until #393 actually lands and its merged tree is verified; broader unfinished work is not closed by this supersession. |
Draft SM-37 source delivery (#429): nested induction through the nested type’s recursor. #284’s DF-19 prerequisite is now accepted on release/v0.4 as
1a690b51; this PR now targets that release line directly. The existing implementation at0b0c95d96has retained maintainer source acceptance, while its identity-bound artifacts and final gate remain incomplete.Source-only reconciliation with pending Host
943bba379ais independently reviewed locally: treeda17a069, 34 paths, 472 authoritative claims and 303 negative cases. It preserves the accepted 599-line SM-37 case/49 plants, strict schema union, current Host renderer/runtime pins, and only the intendedsemantic_ir=16/proof_lowering=4changes. It corrects the example title with a project-local closed glossary. This preparation is not published on this PR, has no generated artifacts or execution claim, and awaits the coordinated post-Host identity wave. The current head remains0b0c95d96.The design was accepted at #278 (comment) with the conditions retained below. Historical measurements below describe their original heads and local setup, not final combined-tree acceptance.
History is the R3 order: commit 1 (
904c1afc0) is the row, the SPEC §31 row, the scenario, the failing named testconformance_sm_37and theinduction-nested-typenegative fixture with the new message; commit 2 (1ee15eff6) is the implementation; commit 3 (0b0c95d96) is the maintainer's review round.What
A language-1.2 theorem about a value of a nested inductive type (one that holds itself under
List,Option,Resultor a product, in no mutual group) may be proved bynested_induction: the proof names a parameter of the theorem, states one proposition for each auxiliary member of the type's recursive family (DF-19'sfamily_members) in the order of Lean 4.32.1's recursor, and gives a branch for every constructor of the type and of each member, binding the fields then one hypothesis per field that is a family member.ir/semantic.rs):check_nested_inductionrefuses, asLLT4001before any backend, a use in language 1.1, a scrutinee that is not a theorem parameter of a nested document inductive in no mutual group, members missing / repeated / outside the family / out of order, a binder shared by two members, a proposition that is not aProp, and on every level a missing or repeated branch, a branch for no constructor, and a wrong binder count.backend/semantic.rs): lowers toinduction x using T.rec (motive_2 := fun b => P) …and one positionalnext binders =>per minor premise, in the recursor's order whatever order the branches are written in (widen.rssorts them). Goals are positional becausenil/consof two members share names, whichinduction … withrefuses. The scrutinee must be a theorem parameter so the backend knows its type to nameT.rec(Environment.proof_parameters).inductionkeeps refusing a nested type; its message now namesnested_induction. DF-13's case still asserts the refusal.examples/nested-induction:leaves_le_sizeoverJson(four motives, nine goals) proved bynested_induction, with mutualsize/leavesgroups over the family (DF-19).Inherits the DF-19 review fix
The family is DF-19's
family_members, so the fix tomentions_family_group(a group counts only at its own type arguments, #284) reaches SM-37's motive count.conformance_sm_37now has aRose (Rose Nat)case:rose = roseproved bynested_inductionwith the one memberList (Rose (Rose Nat)), lowered toinduction rose using Rose.rec (motive_2 := ...)with nomotive_3, verified under the pinned Lean, plus a plant namingList (Rose Nat)as a member (refused). With the arguments ignored again the case fails (nested_induction is missing the member Rose (Nat) of the recursive family of Rose (Rose (Nat)), VERIFICATION.md). The plants are 49 now. The fallback of the same function infamily_constructorsis dropped, as in DF-19.Maintainer's conditions
conformance_sm_37does: members swapped (3 pairs), a binder too many and too few and a missing branch for every branch of each of the four levels (Json,List Json,List (String * Json),String * Json), and every level written in reverse lowers to the same Lean. 49 plants, allLLT4001, no backend output written.verifyof the example with an empty policy failed withLLV7005 … observed [Quot.sound, propext]; the example's policy and the SM-37 row now statepropextandQuot.sound(ids.toml, SPEC §31, the scenario,CONFORMANCE.mdregenerated andvalidate-modelcurrent). Not the prototype's set by assumption: it is the observed one, and they happen to agree.Bumps (declared)
language/semantics-1.2.toml:semantic_ir15 → 16,proof_lowering3 → 4. Both schemas (semantic-module-v2,semantic-snapshot-v2) change. These accepted axes and schemas move the §21.2 identity. Preserve the final base’s renderer/runtime pins during reconciliation and regenerate only in the coordinated post-Host wave. The current historical branch’s other pin values are not the final publication inputs.Historical measurements at the original implementation heads
Recorded host: 2 cores, debug build, Lean4.32.1, rustc1.97.0, under the shared heavy-job lock. These measurements do not establish acceptance of the new source preparation.
lexlean fmt(canonical),lock --check(current),check,build,verify:verified 1 module; attestation c7af737dad4c8d13d8835083917ceeaadf066a1b5a1fb623e544c374ec2ac573, 19.3 s. The generated Lean isinduction value using Json.recwithmotive_2/3/4and ninenextgoals (next =>,next content =>,next items itemsHypothesis =>,next entries entriesHypothesis =>,next =>,next head tail headHypothesis tailHypothesis =>, ×2,next key content contentHypothesis =>).conformance_sm_37: passed, 41.0 s (verifies the example and a parameterisedRoseunder the pinned Lean, then the 49 plants, the language-1.1 use, and four scrutinee misuses).conformance_df_13,conformance_df_19: passed (with the stale locks ofexamples/recursive-dataandtests/nested-familyregenerated locally, not committed).cargo test -p lexlean --lib: 213 passed, 21.0 s.cargo fmt --all --check,cargo clippy --workspace --all-targets --all-features -- -D warnings(1 m 00 s),cargo xtask validate-model(447 ids),validate-spec-links(447 rows),check-test-inventory(779 tests: 287 + 492): clean.conformance_ex_07on a tree with every fixture lock regenerated locally (not committed): 1170 s; the newinduction-nested-typemessage matches; it fails only oncertificate-{b,e,heartbeat,}-rejected,certificate-resource-exhaustedandproduction-expectation-stale(theirexpected/command.jsonbind the identity) and on the twolock-schema-language-mismatch*fixtures, whose deliberately wrong locks my local blanket relock overwrote.conformance_sm_37fail (check fails, the swapped-members plant is accepted).just vv, the full workspace test, the host matrix (CI runs them; this draft runs only therestleg).Review round (head
0b0c95d96)Maintainer's review at #292 (comment), answered point by point on this PR.
examples/nested-induction/lexlean.lockis dropped;conformance_sm_37locks its own copy of the example.backend/semantic.rs:proofandproof_branchreturnResult, and anested_inductionscrutinee with no named parameter is anLLI9001diagnostic, not a guessed<local>.rec.conformance_sm_37: Lean-backed positive cases with a member underOption(none, some) and underResult(error, ok), goals asserted in the recursor's order; with theOptionrows swapped the case fails (VERIFICATION.md). The language-1.1 use and the four scrutinee misuses go throughrefuse_project(LLT4001, the message, no backend output).CONFORMANCE.mdregenerated (validate-modelcurrent).VERIFICATION.mdand here.0b0c95d96, under the lock:conformance_sm_37passed (77.1 s),cargo test -p lexlean --lib213 passed,conformance_df_13/df_19passed (fixture locks regenerated locally, not committed),fmtand workspaceclippy -D warningsclean,validate-model,validate-spec-links,check-test-inventorypass.Remaining landing work
https://claude.ai/code/session_01F4DJnZorC2Jd4MJfN9DbZk
Generated by Claude Code
Closes #429 (SM-37 delivery slice). #278 remains open until both DF-19 and SM-37 are accepted.