Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN curl -sSfL https://github.com/leanprover/elan/releases/download/v4.2.3/elan-
&& tar -xzf /tmp/elan.tar.gz -C /tmp/elan-bin \
&& /tmp/elan-bin/elan-init -y --no-modify-path --default-toolchain none \
&& rm -rf /tmp/elan.tar.gz /tmp/elan-bin \
&& elan toolchain install leanprover/lean4:v4.32.1 \
&& elan toolchain install leanprover/lean4:v4.33.1 \
&& ln -s /usr/local/elan /root/.elan

RUN curl -sSfL https://github.com/casey/just/releases/download/1.57.0/just-1.57.0-x86_64-unknown-linux-musl.tar.gz -o /tmp/just.tar.gz \
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Expanded, in the order they are most often broken:

4. **A claim about a dependency belongs to that dependency.** Lean's
guarantees are authority rows in `model/authorities.toml`, not LexLean
claims. Citing Lean 4.32.1 is not proving it; `leanchecker` is a
claims. Citing Lean 4.33.1 is not proving it; `leanchecker` is a
same-kernel replay, never described as an independent checker (§22.4).

## Adding a capability
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ and Unreleased holds what has landed since.

## Unreleased

- **Breaking:** the Lean pin moves from `leanprover/lean4:v4.32.1` (source commit
`f054605aea4b840552cca2e725580bffd1e1b704`) to `leanprover/lean4:v4.33.1` (source commit
`819816b2e0a3bf405af45ae5c7af2491d8f5bee6`) (#420), so that a LexLean project can import and verify
against libraries built on that toolchain (the evm.fast challenge's fixed modules, Flapjack, and
Mathlib at `0df444a360eaa60ab8c11dca51a86af692955474`). The pin is replaced, not doubled: `verify`
rejects any reported Lean version other than 4.33.1 with the existing diagnostic, so a 4.32.1
environment no longer verifies. SPEC.md §8.2, `lean-toolchain`, both container images, every pinned
workspace and fixture, and the five Lean authority rows and their ledger claims (now `*-4-33-1`, with
the source archive's SHA-256 re-acquired) follow. The language data and schemas change, so the
compiler-semantics IDs of languages 1.0, 1.1, and 1.2 each move once; every lock, verification record,
attestation, golden output, preservation certificate, production export, and fixture expectation is
regenerated by its owning command. A project locked by an earlier compiler must relock.
- The standard library gains `LexLeanStd.Target` (#119, `GN-09`), the machine contracts of the production
targets decided in #109: for `x86_64-unknown-linux-gnu` with `avx2`, `aarch64-unknown-linux-gnu` with
`neon` and `wasm32-unknown-unknown` with `simd128`, three integer SIMD instructions each over `List Int`
Expand Down
24 changes: 12 additions & 12 deletions CONFORMANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ the error registry does not sanction (R5, `ERRORS.md`).
| `CF-11` | `build` | Check, build, format, and verify resolve only locked locally available dependencies. |
| `CF-12` | `build` | Network package acquisition occurs only through lock --allow-network and only for an exact configured commit. |
| `CF-13` | `build` | The Lake workspace contains exactly one supported Lake configuration and the recorded workspace files match. |
| `CF-14` | `build` | Language 1.0 accepts only leanprover/lean4:v4.32.1 for verification. |
| `CF-14` | `build` | Language 1.0 accepts only leanprover/lean4:v4.33.1 for verification. |
| `CF-15` | `build` | Duplicate logical modules and case-folded path or module collisions are rejected. |
| `CF-16` | `build` | Language 1.1 has a parallel exact builtin closure and rejects a language-1.0 lock or package without altering language-1.0 identities. |
| `CF-17` | `build` | Language 1.2 declaration support accepts language 1.2 and rejects unsupported or malformed language versions. |
Expand Down Expand Up @@ -604,7 +604,7 @@ the error registry does not sanction (R5, `ERRORS.md`).
| `SM-16` | `build` | The language-1.1 semantic snapshot contains every closed declaration, term, recursion, match, instance, proof variant, and exact theorem axiom policy without paths or backend text. |
| `SM-17` | `build` | Language 1.1 has distinct mathematical Int, fixed-width signed and unsigned integer, UTF-8 string, byte-sequence, Option, and Result semantic types with canonical literals. |
| `SM-18` | `build` | Portable arithmetic, conversion, bitwise, bounded-shift, collection, UTF-8, byte-order, split/join, and decimal operations form one closed typed primitive vocabulary. |
| `SM-19` | `build` | Portable semantic operations generate deterministic Lean 4.32.1 definitions that elaborate and replay with exact declared computational axiom policies. |
| `SM-19` | `build` | Portable semantic operations generate deterministic Lean 4.33.1 definitions that elaborate and replay with exact declared computational axiom policies. |
| `SM-20` | `build` | Noncanonical, out-of-range, invalid-byte, ill-typed, and unbounded fixed-width values fail before either backend runs. |
| `SM-21` | `build` | Structural recursion admits byte/list values and closed Option and Result inductives while preserving termination and exhaustiveness checks. |
| `SM-22` | `build` | The public owned snapshot DTO and schemas cover every portable type, literal, primitive, and explicit definition axiom policy without backend text. |
Expand Down Expand Up @@ -688,11 +688,11 @@ Never re-derived, vendored, or gated on.

| Authority | Citation | Evidence here |
| --- | --- | --- |
| `LEAN-REL-4-32-1` | https://github.com/leanprover/lean4/releases/tag/v4.32.1 | `CF-14`, `VR-02`, `VR-05` |
| `LAKE-4-32-1` | https://github.com/leanprover/lean4/tree/v4.32.1/src/lake | `VR-03`, `VR-17` |
| `LEANCHECKER-4-32-1` | https://github.com/leanprover/lean4/tree/v4.32.1 | `VR-08` |
| `PRINT-AXIOMS-4-32-1` | https://github.com/leanprover/lean4/tree/v4.32.1 (the #print axioms command); observed output fixtures under tests/golden/axiom-parser/ | `VR-09`, `VR-10` |
| `LEAN-LCNF-4-32-1` | https://github.com/leanprover/lean4/tree/f054605aea4b840552cca2e725580bffd1e1b704/src/Lean/Compiler/LCNF | `NE-01`, `NE-02`, `NE-04` |
| `LEAN-REL-4-33-1` | https://github.com/leanprover/lean4/releases/tag/v4.33.1 | `CF-14`, `VR-02`, `VR-05` |
| `LAKE-4-33-1` | https://github.com/leanprover/lean4/tree/v4.33.1/src/lake | `VR-03`, `VR-17` |
| `LEANCHECKER-4-33-1` | https://github.com/leanprover/lean4/tree/v4.33.1 | `VR-08` |
| `PRINT-AXIOMS-4-33-1` | https://github.com/leanprover/lean4/tree/v4.33.1 (the #print axioms command); observed output fixtures under tests/golden/axiom-parser/ | `VR-09`, `VR-10` |
| `LEAN-LCNF-4-33-1` | https://github.com/leanprover/lean4/tree/819816b2e0a3bf405af45ae5c7af2491d8f5bee6/src/Lean/Compiler/LCNF | `NE-01`, `NE-02`, `NE-04` |
| `UOR-GNAF-1-DRAFT-2` | https://github.com/afflom/wasm-gemm-gnaf/blob/917306fd2b5a397ab02c5d38918fb8620fcc5ae0/authority/UOR-GNAF-v1-draft.2.md; the issuer publishes no upstream copy, so the citation is the downstream repository that vendors the draft and pins its SHA-256 in its authority manifest | `GN-02`, `GN-03`, `GN-04`, `GN-05`, `GN-06`, `GN-07`, `GN-08` |
| `RUSTC-1-97-1` | https://github.com/rust-lang/rust/releases/tag/1.97.1 | `TC-07` |
| `NIST-FIPS-180-4` | https://doi.org/10.6028/NIST.FIPS.180-4 | `SL-02`, `SL-06` |
Expand All @@ -705,12 +705,12 @@ Never re-derived, vendored, or gated on.

| ID | Level | Claim |
| --- | --- | --- |
| `AUTH-LEAN-REL-4-32-1` | `some-true` | Lean 4.32.1 is the release tagged leanprover/lean4:v4.32.1, built from source commit f054605aea4b840552cca2e725580bffd1e1b704. |
| `AUTH-LAKE-4-32-1` | `some-true` | Lake as distributed with Lean 4.32.1 resolves a pinned workspace environment through lake env without network access when every locked dependency is locally available. |
| `AUTH-LEANCHECKER-4-32-1` | `some-true` | The leanchecker executable distributed with Lean 4.32.1 replays a compiled module's environment through the Lean kernel in a separate process and is not an independent proof checker. |
| `AUTH-LEAN-LCNF-4-32-1` | `some-true` | Lean 4.32.1 translates a code-generating definition to base-phase LCNF with Lean.Compiler.LCNF.toDecl, the compiler's own input to its later passes, so every constant the compiled definition can depend on at run time is named by that translation or by a definition it names. |
| `AUTH-LEAN-REL-4-33-1` | `some-true` | Lean 4.33.1 is the release tagged leanprover/lean4:v4.33.1, built from source commit 819816b2e0a3bf405af45ae5c7af2491d8f5bee6. |
| `AUTH-LAKE-4-33-1` | `some-true` | Lake as distributed with Lean 4.33.1 resolves a pinned workspace environment through lake env without network access when every locked dependency is locally available. |
| `AUTH-LEANCHECKER-4-33-1` | `some-true` | The leanchecker executable distributed with Lean 4.33.1 replays a compiled module's environment through the Lean kernel in a separate process and is not an independent proof checker. |
| `AUTH-LEAN-LCNF-4-33-1` | `some-true` | Lean 4.33.1 translates a code-generating definition to base-phase LCNF with Lean.Compiler.LCNF.toDecl, the compiler's own input to its later passes, so every constant the compiled definition can depend on at run time is named by that translation or by a definition it names. |
| `AUTH-RUSTC-1-97-1` | `some-true` | rustc 1.97.1 compiles a safe Rust 2021 crate with the semantics The Rust Reference states for that release: the checked integer methods return None exactly on overflow, the wrapping shifts mask their amount, integer division truncates toward zero, and a #![no_std] crate that declares no extern crate links neither alloc nor std. |
| `AUTH-PRINT-AXIOMS-4-32-1` | `some-true` | Lean 4.32.1 reports the transitive axiom dependencies of a declaration through #print axioms in exactly the output forms recorded by the committed axiom-parser fixtures. |
| `AUTH-PRINT-AXIOMS-4-33-1` | `some-true` | Lean 4.33.1 reports the transitive axiom dependencies of a declaration through #print axioms in exactly the output forms recorded by the committed axiom-parser fixtures. |
| `AUTH-UOR-GNAF-1-DRAFT-2` | `some-true` | UOR-GNAF normative draft uor-gnaf/1-draft.2 requires an optimality claim's machine contract, accounting model, complete-system universe and its optimizer-independent completeness evidence, objective order, and claim class to be fixed before optimization, and treats UOR-NAF as informative only. |
| `AUTH-NIST-FIPS-180-4` | `some-true` | SHA-256 is the function FIPS 180-4 specifies in its section 6.2, defined for messages of fewer than 2^64 bits. |
| `AUTH-NIST-SHA256-EXAMPLES` | `some-true` | NIST's SHA-256 examples give ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad as the digest of abc and 248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1 as the digest of the 448-bit message abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq. |
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# The image carries the compiler *and* the exact toolchain its `verify`
# command requires. LexLean's central claim is that a document was checked by
# Lean 4.32.1 and replayed by that toolchain's `leanchecker` (§22, R9); an
# Lean 4.33.1 and replayed by that toolchain's `leanchecker` (§22, R9); an
# image with the binary alone could `check` and `build` but never `verify`,
# which is the part worth distributing. Both versions are read from the files
# that pin them --- `rust-toolchain.toml` and `lean-toolchain` --- so the image
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

LexLean compiles `.lex.tex` modules written in a closed controlled language. Every word, symbol, and control comes from a versioned lexicon package. Every sentence follows a fixed grammar. One typed representation produces both the canonical LaTeX document and a Lean 4 program with no prose.

`lexlean verify` compiles the generated Lean with `leanprover/lean4:v4.32.1`, replays every module with `leanchecker`, audits axioms by parsing `#print axioms` exactly, and publishes a content addressed attestation. `check` and `build` never claim verification.
`lexlean verify` compiles the generated Lean with `leanprover/lean4:v4.33.1`, replays every module with `leanchecker`, audits axioms by parsing `#print axioms` exactly, and publishes a content addressed attestation. `check` and `build` never claim verification.

[Spec](SPEC.md) · [Conformance](CONFORMANCE.md) · [Diagnostics](ERRORS.md) · [Evidence](VERIFICATION.md) · [Changelog](CHANGELOG.md) · [MNIST model](https://github.com/UOR-Foundation/MNIST)

Expand Down Expand Up @@ -136,11 +136,11 @@ Range rows abbreviate consecutive registered IDs; every individual ID in each ra

Every capability is a claim in [`model/ids.toml`](model/ids.toml) at honesty level `build`. `just vv` validates every row by the test named `conformance_<id>`. See [CONFORMANCE.md](CONFORMANCE.md) for the full register.

Every directory under [examples/](examples/) must format, lock, check, build, and verify with Lean 4.32.1. Other suites cover arithmetic, logic, induction, recursion, collections, production, models, reasoning, fold laws, helpdesk, and uor atlas. [compiler/](compiler/), [stdlib/](stdlib/), and [bootstrap/](bootstrap/) are written in LexLean itself.
Every directory under [examples/](examples/) must format, lock, check, build, and verify with Lean 4.33.1. Other suites cover arithmetic, logic, induction, recursion, collections, production, models, reasoning, fold laws, helpdesk, and uor atlas. [compiler/](compiler/), [stdlib/](stdlib/), and [bootstrap/](bootstrap/) are written in LexLean itself.

## Gate

Prerequisites: Rust 1.97.1, [just](https://github.com/casey/just), `cargo-deny`, and Lean 4.32.1 through `elan`. The dev container provides all of them.
Prerequisites: Rust 1.97.1, [just](https://github.com/casey/just), `cargo-deny`, and Lean 4.33.1 through `elan`. The dev container provides all of them.

```text
just vv
Expand All @@ -155,7 +155,7 @@ The [`lean4-prod`](https://github.com/UOR-Foundation/lean4-prod) differential is

`check` and `build` never claim verification. Only `verify` runs Lean. Its attestation records toolchain hashes, process records, and observed axiom sets. External facts are `some-true` rows in [`model/ledger.toml`](model/ledger.toml). The gate is `just vv`; release waits for §30.

Generated Lean declares `public` declarations and imports where Lean 4.32.1 requires them. Unique existence lowers to its definitional expansion. Leading zeros are rejected, numerals are ascribed except at monomorphic constant binders, nested proof scopes use `quote`, names with `_` escape as `\_`, non ASCII surfaces need a renderer token, and unused binders get a `_` prefix. Fixtures are found by `case.toml`. Every deviation is enforced by the same gates.
Generated Lean declares `public` declarations and imports where Lean 4.33.1 requires them. Unique existence lowers to its definitional expansion. Leading zeros are rejected, numerals are ascribed except at monomorphic constant binders, nested proof scopes use `quote`, names with `_` escape as `\_`, non ASCII surfaces need a renderer token, and unused binders get a `_` prefix. Fixtures are found by `case.toml`. Every deviation is enforced by the same gates.

## Layout

Expand Down
Loading
Loading