Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ workspace carried at those versions without a tag.

## Unreleased

- Structural recursion over the recursive family of a nested inductive type,
#278 (SPEC.md §17.12, `DF-19`). A mutual definition group may decrease on any
member of the family the pinned Lean takes as the motives of the type's
recursor (the type, then each `List`, `Option`, `Result`, or product that
holds it, in the order of discovery), so a function over a type with a
constructor that holds `List (String * Json)` recurses through the list and
through the pair. One checker change; no file of the compiler-semantics
digest moves, so no identity moves. The register is 470 IDs.

- The Intel macOS host-gate cost correction for #235 keeps SP-02's complete
certificate scaling families and TC-03's seeded argument/fuel sweep on the
normative Linux host, with fixed certificate vectors and committed fixture
Expand Down
1 change: 1 addition & 0 deletions CONFORMANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ the error registry does not sanction (R5, `ERRORS.md`).
| `DF-16` | `build` | Language 1.2 mutual definition groups recurse structurally over one recursive family, including nested and mutual inductives, and every call between members passes a structurally smaller family binder. |
| `DF-17` | `build` | Language 1.2 well-founded definitions carry a binder-free natural-number measure and, per recursive call site, a prior theorem stating exactly that call's decrease obligation; linking checks the statements and Lean checks the proofs. |
| `DF-18` | `build` | Language 1.2 state threading is explicit: ordered folds and bounded iteration pass the state through a direct closure, executable definitions may use them, and every iteration carries a natural-number bound. |
| `DF-19` | `build` | Language 1.2 mutual definition groups recurse structurally over the whole recursive family of a nested inductive, the types the pinned Lean takes as the motives of its recursor: the type itself, then each distinct application of `List`, `Option`, `Result`, or a product that holds the type in a constructor field of an earlier member, in the order of discovery, so that a group may decrease on the type, on a list of its values, on a list of pairs whose second component is one, and on such a pair, and in a member's top-level match every pattern binder whose type is a member of the family is structurally smaller; a group that decreases on a type outside the family and a call that passes anything but a smaller binder of the family are each refused as LLT4001, and each group lowers to one Lean mutual block of structural definitions that the pinned Lean accepts. |

## examples

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ just vv # the complete normative acceptance gate (SPEC.md §9.2)
just release # vv, then the §30 release criterion; refused until 1.0.0
```

All 469 registered conformance IDs are implemented and pass; `just vv` runs clean from a checkout with the pinned toolchain installed.
All 470 registered conformance IDs are implemented and pass; `just vv` runs clean from a checkout with the pinned toolchain installed.

The differential against the independent generator `lean4-prod` (SPEC.md §17.19, `OR-01`..`OR-08`) acquires it at its pinned commit: from the checkout `LEXLEAN_ORACLE_DIR` names, or by fetching the commit with `git` into the Cargo target directory (`LEXLEAN_ORACLE_CACHE` overrides), and builds it with the pinned Lean and Rust toolchains. It is validation evidence only and no input to any identity. An oracle that cannot be acquired, is not the pinned files, or fails is unavailable: that fails the gate on Linux x86-64 and is printed as `NOT VALIDATED` elsewhere, and is never reported as agreement.

Expand All @@ -173,7 +173,7 @@ Every row is validated by `just vv`; the IDs link the claim to its register row,
| Versioned lexicon packages with closed schemas, denotations, and renderer tokens | `GL-01`..`GL-18` | `build` |
| Fixed structural, mathematical, and proposition grammar with closed ambiguity handling | `GR-01`..`GR-16` | `build` |
| Typed closed IR with canonical serialization, native core modules (and the second schema of them that lossless migration of the proof library needs), portable language-1.1 application data and operations, versioned language-1.2 semantic modules, products, first-class functions, and widening conversions, ordered collections and graphs, semantic snapshots, alpha identities, recursion evidence, a split on a document term or a Boolean in a proof, and content identities | `SM-01`..`SM-36` | `build` |
| Document and generic semantic declarations with exact self-application, type checking, structural recursion, recursive and mutual language-1.2 data, generic and executable higher-order definitions, mutual and well-founded recursion with semantic evidence, explicit state threading, and acyclicity rules | `DF-01`..`DF-18` | `build` |
| Document and generic semantic declarations with exact self-application, type checking, structural recursion, recursive and mutual language-1.2 data, generic and executable higher-order definitions, mutual and well-founded recursion with semantic evidence, explicit state threading, and acyclicity rules | `DF-01`..`DF-19` | `build` |
| The structured proof language with pinned Lean lowerings, including closed linear arithmetic, integer order, and the fold laws | `PF-01`..`PF-23` | `build` |
| Prose-free deterministic generated Lean with complete token traceability | `LN-01`..`LN-12` | `build` |
| Canonical LaTeX regeneration and the optional hash-checked PDF provider | `TX-01`..`TX-12` | `build` |
Expand Down
26 changes: 21 additions & 5 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -3012,10 +3012,25 @@ Termination evidence is semantic data, never tactic or backend text; no
or references; every member calls into the group and the graph is
strongly connected, so no member is outside the mutual recursion. For a
structural group: Every member's decreasing type belongs to one *recursive
family*: the naturals; the lists of one element type; or one inductive
group at one instantiation of its type parameters, together with `List`
or `Option` of its members exactly when the group's constructors nest a
member under that container. In a member's
family*: the naturals; the lists of one element type; or the family of one
inductive group at one instantiation of its type parameters (`DF-19`).
That family is the members of the group, then every other type that
holds a member: scanning the members in order, and the constructor fields
of each in the order the pinned Lean takes the constructors (declaration
order for a document inductive; `nil`, `cons`; `none`, `some`; `error`,
`ok`; `mk`), each field that mentions a member without being one is
a maximal application of `List`, `Option`, `Result`, or a product (by
strict positivity, §17.12 recursive-data rule 3) and joins the family
once, at its first occurrence. A member is the group at these type
arguments: the group applied to others is another type and joins nothing,
so `Rose Item | node : Item -> List (Rose Item)` at `Rose (Rose Nat)` has
the two members `Rose (Rose Nat)` and `List (Rose (Rose Nat))`, as
`Rose.rec` has two motives at any instantiation. These are the motives of the recursor the
pinned Lean 4.32.1 generates for the group (`#check @T.rec`), in its
order: for `Json` with `array (List Json)` and `object (List (String *
Json))`, `Json`, `List Json`, `List (String * Json)`, and `String *
Json`, so a group may decrease on any of the four, and a list of pairs
whose first component is another type is not one of them. In a member's
top-level match, every pattern binder whose type belongs to the family is
structurally smaller, and every call to a group member passes a smaller
binder in that member's decreasing position. Members see each other; the
Expand Down Expand Up @@ -11122,6 +11137,7 @@ Every row below is normative, has honesty level `build`, and MUST be copied byte
| `DF-16` | `declarations` | Language 1.2 mutual definition groups recurse structurally over one recursive family, including nested and mutual inductives, and every call between members passes a structurally smaller family binder. | §17.12 |
| `DF-17` | `declarations` | Language 1.2 well-founded definitions carry a binder-free natural-number measure and, per recursive call site, a prior theorem stating exactly that call's decrease obligation; linking checks the statements and Lean checks the proofs. | §17.12 |
| `DF-18` | `declarations` | Language 1.2 state threading is explicit: ordered folds and bounded iteration pass the state through a direct closure, executable definitions may use them, and every iteration carries a natural-number bound. | §17.12 |
| `DF-19` | `declarations` | Language 1.2 mutual definition groups recurse structurally over the whole recursive family of a nested inductive, the types the pinned Lean takes as the motives of its recursor: the type itself, then each distinct application of `List`, `Option`, `Result`, or a product that holds the type in a constructor field of an earlier member, in the order of discovery, so that a group may decrease on the type, on a list of its values, on a list of pairs whose second component is one, and on such a pair, and in a member's top-level match every pattern binder whose type is a member of the family is structurally smaller; a group that decreases on a type outside the family and a call that passes anything but a smaller binder of the family are each refused as LLT4001, and each group lowers to one Lean mutual block of structural definitions that the pinned Lean accepts. | §17.12 |
| `PF-01` | `proofs` | Assume and exact-style simple proof sentences create scoped introductions and exact proof nodes. | §16.2 |
| `PF-02` | `proofs` | Simple Apply is accepted only when its declared signature yields exactly one residual premise. | §16.2 |
| `PF-03` | `proofs` | Structured apply requires every numbered residual premise exactly once and in signature order. | §16.6 |
Expand Down Expand Up @@ -11456,7 +11472,7 @@ Every row below is normative, has honesty level `build`, and MUST be copied byte
| `LM-09` | `language-models` | No prompt is code: no member of the closed language maps `string` or `bytes` to a function, a term, or source — every operation of the primitive registry that takes a `string` or `bytes` operand is classified by the audit with a data result, the registry's schema enumeration and the production registry's primitive rows equal one another and equal that classified set, and the text declarations of `lexlean/semantic-module/2` state no `string`-typed member, so a prompt reaches a model only as the tokens `encodeText` makes of it; a planted operation or text member of that shape is caught by the audit with its name. | §17.12 |
| `LM-13` | `language-models` | The text laws a tokenizer elaborates through are LexLean source and not authored text: the module that states them is one language-1.2 native core module of the embedded `language/text-1.2` project, the project holds no file of Lean source, no independently authored Lean file anywhere in the release tree declares the `LexLeanText` namespace or lies under its module root, and the one-time migration input is absent; the registry lists only that module, the declarations and their exact axiom policies are read from its native data, which the compiler embeds and hashes into the language-1.2 semantics, and a module that declares a text component imports the generated module rather than splicing any Lean text. | §17.10, §17.12 |

**Total required capability IDs:** 469.
**Total required capability IDs:** 470.

No row may be downgraded to `some-true` or `open`. Upstream Lean facts are ledger/authority rows, not substitutions for these build behaviors.

Expand Down
Loading
Loading