Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
25a7834
feat(language-1.2): register the text-component family per the design…
humuhumu33 Oct 13, 2026
e75e239
feat(language-1.2): text-component declarations and their family modu…
humuhumu33 Oct 13, 2026
54594e1
chore(text-laws): one-time exporter for the tokenizer text laws (re-s…
Oct 14, 2026
55ad6ec
chore(text-laws): remove the one-time exporter from the release tree
Oct 14, 2026
b4be399
feat(language-1.2): the text laws as an embedded native library (slic…
Oct 14, 2026
9e260b2
Merge origin/main (26e4dea7) into issue-30-language-model
humuhumu33 Oct 15, 2026
0cd55cd
wip(#30): tokenizer elaboration over the native text laws (LM-01..LM-…
humuhumu33 Oct 16, 2026
b48941a
fix(#30): verify names the module-level lean_error helper
humuhumu33 Oct 16, 2026
b113d60
test(#30): wire LM-01..LM-03 over the models example
humuhumu33 Oct 16, 2026
529988b
fix(#30): restore the LM-13 test body the merge truncated
humuhumu33 Oct 16, 2026
2af31bd
test(#30): a vocabulary reference is a member object
humuhumu33 Oct 16, 2026
7356959
feat(#30): the tokenizer elaboration moves the language-1.2 semantic_…
humuhumu33 Oct 16, 2026
8363b43
fix(#30): restore the main changes the 9e260b2f merge dropped (#130 P…
humuhumu33 Oct 16, 2026
e1e78a8
docs(#30): changelog entry for the tokenizer elaboration and the text…
humuhumu33 Oct 16, 2026
b6c4ba2
Merge origin/main (32afe5da, #144 native runtimes) into issue-30-lang…
humuhumu33 Oct 16, 2026
d558408
chore(#30): regenerate CONFORMANCE.md for the 390-row register
humuhumu33 Oct 16, 2026
df9fb03
chore(#30): regenerate locks, goldens, calculus packages, fixtures, p…
humuhumu33 Oct 16, 2026
d54858f
Merge ../i30.bundle into claude/issue-30-language-model-components
humuhumu33 Oct 16, 2026
c876764
Merge origin/main (80331cb4: #152 Atlas shards, #156 runtime gates) i…
Oct 16, 2026
7d34c15
fix(#30): the text declarations have production rows, the laws librar…
Oct 16, 2026
d1a103b
fix(#30): the text-laws records join the attestation through their ow…
Oct 16, 2026
7b6cd68
chore(#30): regenerate every language-1.2 record for the merged tree'…
Oct 16, 2026
2f9c1f1
fix(#30): the four text declarations are not-runtime rows of the orac…
Oct 16, 2026
3177b07
Merge origin/main (378628ec: #158 program equalities, PF-20..PF-23) i…
Oct 16, 2026
7272673
chore(#30): regenerate every language-1.2 record for the tree merged …
Oct 16, 2026
b09bb47
Merge origin/main (097b9b97: #146 certificate E as kernel-term data, …
Oct 16, 2026
8a71059
chore(#30): regenerate the language-1.2 records for the tree merged w…
Oct 17, 2026
dc6d6ca
Merge origin/main (c3905e7c: #159 bdd parts, #153 stdlib Text, SL-01)…
Oct 17, 2026
85886c3
chore(#30): regenerate the language-1.2 records for the tree merged w…
Oct 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,27 @@ versions, and the entries below say what each tag does and does not claim.

## Unreleased

- A language-1.2 `tokenizer` elaborates, in linking, to ordinary definitions
over the embedded text-laws library and to generated theorems the library
proves (SPEC.md §17.12, `LM-01`..`LM-03`, `LM-13`, #30). The library is
LexLean source: one native `lexlean/core-module/2` module of the embedded
project `language/text-1.2/library`, whose Lean the compiler generates and
compiles into the verification's olean root before any module that
imports it; the one-time migration of the hand-written proof is recorded
in `tests/text-laws/MIGRATION.md` and no authored Lean implementation of
the laws exists in the release tree. A tokenizer over a `utf8_lines`
vocabulary artifact of role `vocabulary` elaborates to `pieces`, `size`,
`encode`, `decode`, `encodeText`, and `decodeText`, and generates
`roundtrip`, `in_range`, and `text_roundtrip`, each proved by one library
lemma after unfolding exactly the named definitions; a vocabulary of
another role or schema, or a tokenizer with type parameters, is refused
with `LLT4006`, and a scheme outside `byte_level` and `longest_match` is a
schema violation (`LLT4001`). The language-1.2 `semantic_ir`,
`lean_backend`, and `latex_backend` versions move to 12, 19, and 12, so
every language-1.2 lock, golden, fixture, and verification record is
regenerated. The register holds 397 IDs: this slice registers `LM-01`..`LM-03`
and `LM-13` only; the remaining text components of the design on #30 add
their rows when their slices land, so no registered ID is unwired.
- The standard library's first member: bytes and text over `Bytes`
(SPEC.md §17.22, `SL-01`, #92; no new diagnostic code). `stdlib/` is a
language-1.2 project beside `compiler/` under the module prefix
Expand Down
9 changes: 9 additions & 0 deletions CONFORMANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,15 @@ the error registry does not sanction (R5, `ERRORS.md`).
| `GR-15` | `build` | Explicit module imports form an acyclic graph and selected builds include their transitive closure. |
| `GR-16` | `build` | A same-module declaration cannot reference a later declaration. |

## language-models

| ID | Level | Statement |
| --- | --- | --- |
| `LM-01` | `build` | A `tokenizer` is a closed language-1.2 declaration whose scheme is `byte_level` or `longest_match` and whose vocabulary is a #29 artifact with role `vocabulary` and schema `utf8_lines`; tokens are `uint32`, the single bytes are the ids 0..255 present always as the byte fallback, the vocabulary pieces take the ids from 256 in artifact order, and the declaration elaborates to `encode` and `decode` over `bytes` together with `encodeText` and `decodeText` over `string` through `utf8_encode` and `utf8_decode`, so a scheme outside the closed enumeration, a vocabulary whose role or schema is not the one stated, or a token outside `uint32` is refused as a schema violation (`LLT4001`) or by the artifact rules (`LLR3007`). |
| `LM-02` | `build` | A tokenizer's laws are generated and kernel-checked: `roundtrip` states that for every byte string `b`, `decode (encode b)` is `some b`; `text_roundtrip` states the same over `string`; and `in_range` states that every token a decode produces indexes the vocabulary, so the round trip also fixes the token boundaries, and a tokenizer whose elaboration does not close these laws fails verification. |
| `LM-03` | `build` | Text that is not valid UTF-8 is refused and never tokenized: an artifact whose bytes do not decode under the `utf8_lines` schema — invalid UTF-8, a CR, or a missing final LF — fails by its artifact rules before any byte is decoded, and a text offered to `encodeText` that is not valid UTF-8 is refused rather than transcoded. |
| `LM-13` | `build` | 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. |

## latex-pdf

| ID | Level | Statement |
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,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 393 registered conformance IDs are implemented and pass; `just vv` runs clean from a checkout with the pinned toolchain installed.
All 397 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 Down Expand Up @@ -180,6 +180,7 @@ Every row is validated by `just vv`; the IDs link the claim to its register row,
| The runtime of generated Lean as native modules: the portable, collection, model, and reasoning runtimes of language 1.2 are LexLean source that every generated module imports, migrated losslessly and audited against their exact axioms, the released runtime text of languages 1.0 and 1.1 is frozen data equal to their released output, and no other Lean runtime text remains in the compiler but the decoder of core module 2 | `RT-01`..`RT-04` | `build` |
| The standard library: language-1.2 source beside the compiler whose members are certified production roots, each validated against Rust's standard library by a seeded differential of its evaluator and rustc realizations; bytes and text over `Bytes` | `SL-01` | `build` |
| The literal `nat-add-zero` example, the Lean-verified feature examples, and the complete negative fixture suite | `EX-01`..`EX-08` | `build` |
| Language-1.2 text components, first slice: tokenizers and their round-trip laws, with the laws carried as one native core module the generated modules import rather than authored Lean text (context windows, text generators, text classifiers, adapters, and composition follow in their own slices and add their rows then) | `LM-01`, `LM-02`, `LM-03`, `LM-13` | `build` |

Range rows abbreviate consecutive registered IDs; every individual ID in each range is registered in [`model/ids.toml`](model/ids.toml) at the stated level with its own scenario and test.

Expand Down
18 changes: 16 additions & 2 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -3853,6 +3853,14 @@ terms are ordinary closure members, and a natural-number counter of its
ledger is subject to the same width rule as any natural number, so a root
that runs a reasoner admits `overflow` where the target requires it.

Language-1.2 text declarations (§17.12, *Text components*) are `formal-only`
(`declaration.tokenizer`, `declaration.context_window`,
`declaration.text_generator`, `declaration.text_classifier`): a
tokenizer's elaborated definitions are reported with that construct and
apply the embedded text-laws library, which no production target realizes,
so a root whose closure reaches one fails, and its generated theorems are in
no closure; the other three are not elaborated by linking in this release.

**Rules.** A root is eligible for a target exactly when none of the following
holds; otherwise `check` fails with `LLT4005`, naming the root, the target, the
violation nearest the root, the closure member it occurs in, and the call path
Expand Down Expand Up @@ -7102,7 +7110,7 @@ nested partition of the embedded tree. The language-1.2 ID covers the whole
tree. The language-1.1 ID excludes the files introduced solely for 1.2:
`language/bootstrap-1.2.toml`, `language/semantics-1.2.toml`,
`language/production-1.2.toml`, `language/lcnf-1.2/`,
`language/preservation-1.2/`, `language/runtime-1.2/`, `language/core-1.2/`,
`language/preservation-1.2/`, `language/runtime-1.2/`, `language/text-1.2/`, `language/core-1.2/`,
`language/std/{bool,int,nat}-1.2/`, `schemas/attestation-v2.schema.json`,
`schemas/build-manifest-v2.schema.json`,
`schemas/compiler-input.schema.json`, `schemas/core-module-v2.schema.json`,
Expand Down Expand Up @@ -9417,7 +9425,13 @@ Every row below is normative, has honesty level `build`, and MUST be copied byte
| `RT-04` | `runtime` | No Lean runtime text remains in the language-1.2 compiler: a generated language-1.2 module imports the runtime modules whose constants it names and declares nothing under a runtime namespace, and the only Lean runtime text in the compiler's source outside unit-test items, in one string literal or in several written together, is the decoder of core module 2, which loads native modules and so cannot be one; a runtime text planted in any of its shapes, raw or escaped, with or without a namespace line, split across literals, or after a test module, is found. | §17.12, §18.1 |
| `SL-01` | `stdlib` | The standard library's `Text` module is language-1.2 source whose seven members over `Bytes` (`startsWith`, `endsWith`, `trim`, `lines`, `splitOn`, `joinWith`, `find`) are production roots eligible for `rust-std` with exactly their declared effects; each member's lowered program under the calculus evaluator and its rendered `rust-std` package under the pinned rustc agree with Rust's `starts_with`, `ends_with`, `trim_ascii`, `lines`, `split`, `join`, and `find` on a seeded corpus; a planted defect in a member is detected; and the certified packages the production export publishes for it are the committed ones. | §17.22 |

**Total required capability IDs:** 393.

| `LM-01` | `language-models` | A `tokenizer` is a closed language-1.2 declaration whose scheme is `byte_level` or `longest_match` and whose vocabulary is a #29 artifact with role `vocabulary` and schema `utf8_lines`; tokens are `uint32`, the single bytes are the ids 0..255 present always as the byte fallback, the vocabulary pieces take the ids from 256 in artifact order, and the declaration elaborates to `encode` and `decode` over `bytes` together with `encodeText` and `decodeText` over `string` through `utf8_encode` and `utf8_decode`, so a scheme outside the closed enumeration, a vocabulary whose role or schema is not the one stated, or a token outside `uint32` is refused as a schema violation (`LLT4001`) or by the artifact rules (`LLR3007`). | §17.12 |
| `LM-02` | `language-models` | A tokenizer's laws are generated and kernel-checked: `roundtrip` states that for every byte string `b`, `decode (encode b)` is `some b`; `text_roundtrip` states the same over `string`; and `in_range` states that every token a decode produces indexes the vocabulary, so the round trip also fixes the token boundaries, and a tokenizer whose elaboration does not close these laws fails verification. | §17.12 |
| `LM-03` | `language-models` | Text that is not valid UTF-8 is refused and never tokenized: an artifact whose bytes do not decode under the `utf8_lines` schema — invalid UTF-8, a CR, or a missing final LF — fails by its artifact rules before any byte is decoded, and a text offered to `encodeText` that is not valid UTF-8 is refused rather than transcoded. | §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:** 397.

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
2 changes: 1 addition & 1 deletion compiler/expected/build/manifest.json

Large diffs are not rendered by default.

Loading
Loading