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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONFORMANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ the error registry does not sanction (R5, `ERRORS.md`).
| `GL-16` | `build` | Package and entry bytes participate in lock and semantic closure hashes exactly as specified. |
| `GL-17` | `build` | Language 1.2 resolves the exact 1.2 builtin package closure and enforces 1.2 lexicon semantics. |
| `GL-18` | `build` | Cross-version package, lexicon, and lock combinations fail closed before backend execution. |
| `GL-22` | `build` | Document denotations over exported semantic-module inductive and structure types, definitions, and theorems resolve through explicit module imports with their exact canonical signatures and generated Lean names; unavailable declarations and mismatching signatures are refused before verification. |

## models

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Use it for safety critical code, audited or regulated artifacts, documents whose
| Exact repository identity, layout, generated documents, release gate reading its criterion from the specification, total classification of every closed enum by every consumer, the devcontainer pinned to the toolchains, and a check-only build without the production data | `RP-01`..`RP-19` | `build` |
| Closed project configuration, canonical lock file, and offline dependency policy | `CF-01`..`CF-18` | `build` |
| Total lexical closure: every accepted atom is covered by exactly one declared origin | `LX-01`..`LX-14` | `build` |
| Versioned lexicon packages with closed schemas, denotations, and renderer tokens | `GL-01`..`GL-18` | `build` |
| Versioned lexicon packages with closed schemas, denotations, and renderer tokens | `GL-01`..`GL-22` | `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, bitwise and shift primitives over `Nat`, content identities, and declaration and statement IDs | `SM-01`, `SM-02`, `SM-03`, `SM-04`, `SM-05`, `SM-06`, `SM-07`, `SM-08`, `SM-09`, `SM-10`, `SM-11`, `SM-12`, `SM-13`, `SM-14`, `SM-15`, `SM-16`, `SM-17`, `SM-18`, `SM-19`, `SM-20`, `SM-21`, `SM-22`, `SM-23`, `SM-24`, `SM-25`, `SM-26`, `SM-27`, `SM-28`, `SM-29`, `SM-30`, `SM-31`, `SM-32`, `SM-33`, `SM-34`, `SM-35`, `SM-36`, `SM-37`, `SM-38`, `SM-42` | `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` |
Expand Down Expand Up @@ -147,7 +147,7 @@ just vv
just release
```

All 521 registered conformance IDs are implemented. `just vv` runs the complete normative acceptance gate (SPEC.md §9.2). `just release` runs `vv` and the §30 criterion; it is refused until 1.0.0.
All 522 registered conformance IDs are implemented. `just vv` runs the complete normative acceptance gate (SPEC.md §9.2). `just release` runs `vv` and the §30 criterion; it is refused until 1.0.0.

The [`lean4-prod`](https://github.com/UOR-Foundation/lean4-prod) differential is validation evidence only. A missing oracle fails on Linux x86 64 and prints `NOT VALIDATED` elsewhere. Releases live on `release/vX.Y`, and a tag before 1.0.0 does not claim the §30 criterion.

Expand Down
5 changes: 4 additions & 1 deletion SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -2359,6 +2359,8 @@ Document-entry signatures are compared against declaration statements using cano

Document declarations are available only after their source position. Module imports expose all exported declarations of the imported module.

An imported semantic module exposes its inductive and structure types, definitions, and theorems to document denotations after that module links successfully. The actual declaration's complete explicit type-parameter and value-parameter telescope, result type or proposition, category, and generated Lean name determine the reference; a glossary signature cannot replace them. The signature must have an exact representation in the existing canonical LSE. If it does not, linking refuses the prose use and names the unsupported signature construct. Unused semantic declarations are unaffected. Classes, instances, and model-, reasoning- or text-generated declarations are not implicitly exposed by this document bridge; a refusal identifies the declaration kind. This does not change their semantic-module availability or generated Lean declarations.

### 17.8 Name generation

- Full module: `<module_prefix>.<source-module>`.
Expand Down Expand Up @@ -12036,6 +12038,7 @@ Every row below is normative, has honesty level `build`, and is projected byte-f
| `GL-16` | `lexicon` | Package and entry bytes participate in lock and semantic closure hashes exactly as specified. | §11, §21 |
| `GL-17` | `lexicon` | Language 1.2 resolves the exact 1.2 builtin package closure and enforces 1.2 lexicon semantics. | §13.1, §13.11 |
| `GL-18` | `lexicon` | Cross-version package, lexicon, and lock combinations fail closed before backend execution. | §10.1, §13.11 |
| `GL-22` | `lexicon` | Document denotations over exported semantic-module inductive and structure types, definitions, and theorems resolve through explicit module imports with their exact canonical signatures and generated Lean names; unavailable declarations and mismatching signatures are refused before verification. | §13.6, §17.7 |
| `GR-01` | `grammar` | A source module parses only under the exact structural grammar and environment set. | §15.1, §15.2 |
| `GR-02` | `grammar` | Glossary imports, module imports, title, and blocks obey exact header order and cardinality. | §15.1 |
| `GR-03` | `grammar` | Sections nest within the configured scope limit and section parameters introduce explicit inherited context. | §15.1, §15.4 |
Expand Down Expand Up @@ -12489,7 +12492,7 @@ Every row below is normative, has honesty level `build`, and is projected byte-f
| `NS-06` | `normative-source` | The hand-edited normative inputs of the repository are the `.lex.tex` modules of the specification project: `model/` holds only the projected files and the copies an authority row vendors, every Markdown file at the root is a projection or is on the closed list of hand-written documents, the projections carry the notice that names their source, and no hand-written document restates a registered statement, a plant of each being refused naming R1. | §27.2, §27.5, §27.10 |
| `NS-07` | `normative-source` | `cargo xtask spec` changes the chapter modules of the specification project by item: it replaces a block, inserts one after a block, and ports the hunks of a merged SPEC.md that lie outside derived regions, each through the authoring SDK, and it writes nothing unless the regenerated SPEC.md equals the intended text outside derived regions, refusing a first line that matches no block or two and a hunk that spans two blocks. | §24.8, §27.5 |

**Total required capability IDs:** 521.
**Total required capability IDs:** 522.

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
94 changes: 94 additions & 0 deletions VERIFICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -21685,3 +21685,97 @@ test result: FAILED. 0 passed; 2 failed
`RP-19` failed at the first language-1.2 lock, whose `compiler_semantics` line
carried the planted digit while the default build's carried the tree's. With
each plant removed, `conformance_rp_10` and `conformance_rp_19` pass.

## GL-22 semantic declaration publication can fail (#316)

The initial registered Color candidate failed `conformance_gl_22` at its first
positive `P::check_ok`: `LLT4001`, “no type-noun interpretation survives”, at
`src/Main.lex.tex:9:11`. This initial R3 observation preceded the typed semantic
bridge. Its original output and independent causal review remain retained;
later fixture-parser, diagnostic-expectation and configuration failures also
remain evidence, not passing-baseline results.

On 2026-11-10, the repaired source candidate
`b2575046686bf7c7b9260e580976d34b7f9f2643` passed the full named case once with
`conformance_gl_22 --exact --test-threads=1 --nocapture`, native Linux x86-64,
pinned Lean 4.32.1 and verifier width 1: one passed, none failed or ignored,
483 filtered out, exit 0 in 10.332162 seconds. The case checked typed semantic
inductive/structure/definition/theorem exports, scoped signatures and Let
comparison, direct imports and aliases, overload selection and prose ordering.
It completed twenty labeled static-negative controls and the separate native
false-predicate-body refusal `LLV7002`.

The shared positive native verification completed before assertions that six
named declarations had exactly empty observed axiom sets: Main's `color_refl`,
`point_refl`, `function_use`, `generic_use`, `predicate_and_proof_use`, and
`Colors.redRefl`, all under `LanguageTwelve`. This is completed native harness
and assertion evidence. The temporary raw attestations were read by the case
and dropped with its fixtures; no durable raw-attestation archive is claimed.
The accepted frozen positive executable SHA-256 is
`ec45814e10afb90253b8392840c5dab09f0e6d04ea5e4e698de6d7bd0771e1d3`.

A distinct compiler defect then omitted exactly the successful publication of
`Colors::Color` from the semantic export table in `link.rs`; every fixture and
assertion and every other source path stayed unchanged. One selected mutant
conformance build was necessary because the positive executable statically
contains the accepted compiler. Its actual graph, selected roots, 905 embedded
inputs and error inputs were reviewed; no additional probe or baseline build
or run was used. The separately frozen mutant executable SHA-256 is
`059281fa336ed768d2a8c5e7a8bf7cdb3dc38dbac76a79fcf5512666ef48ea76`.

The exact same named case failed once with that mutant, exit 101 in 1.366889
seconds. Its first positive check at `support.rs:871` reported `LLT4001` at
Main's original Color binder, line 9, column 11:

```text
no type-noun interpretation survives: document declaration `Colors::Color` is not available here
```

That first check precedes all native verification calls; the durable diagnostic
and unchanged source order establish this refusal before Lean. Exit 101 alone
is not the witness. This compiler-publication omission is distinct from the
case's false-proposition input mutation.

The planted defect was removed under the same whole-phase lock by restoring
the exact accepted `link.rs` Git preimage (SHA-256
`e4d4daf98209abe3b5acdefaf5a05f42b94c8d25e56e756666a86ff4504b6789`).
The full 10,878-entry accepted source inventory, Git metadata and protected
witnesses passed restoration guards and independent review. The selected
mutable target libraries and harness remain explicitly marked mutant/stale;
restoring source does not restore their compiled bytes. Positive and mutant
frozen executables, diagnostics, ledgers and independent reviews remain
retained. No accepted baseline rebuild or rerun followed restoration.

The retained result/review pairs are initial R3 `4468cc9f`/`9e8bface`, full
positive `13beb4e5`/`05f61e9e`, mutant build `b62a14fd`/`e0cc8614`, and omission
witness plus restoration `f8dda89f`/`2d1b5869`; the external evidence ledger
records their complete hashes. These establish the bounded GL-22 regression
and its compiler-omission falsifiability. They do not establish product
regeneration, a final-head full acceptance gate, merge, publication or issue
closure. Those decisions require the actual final composition and ownership,
including the separately owned #405 forward integration; no old workflow job
count or earlier prepared head substitutes for that acceptance.

Merged onto `release/v0.5` at `6c36829120` (after the #405 forward merge), the
case passes on the merge: `conformance_gl_22` ran with one passed, none failed
(521 filtered out) in 44.94 s, pinned Lean 4.32.1. The merge needed one change
to the source of that candidate: the `match` of `term_kind` in
`crates/lexlean/src/elaborate/semantic.rs` ended in a wildcard arm, which
`audit-classifications` (RP-15) refuses; it now names every `SemanticTerm`
variant.

Planted on that merge: the comparison of the glossary signature with the
semantic declaration's type in `validate_semantic_signature`
(`crates/lexlean/src/elaborate/expressions.rs`) disabled by prefixing its
condition with `false &&`. Command: `cargo test -p repo-conformance --test
conformance -- conformance_gl_22`. Expected: the entry whose implicit mode
disagrees with `Colors::generic` is no longer refused.

```text
GL22 negative implicit-mode: expect LLT4001
thread 'conformance_gl_22' panicked at crates/conformance/src/support.rs:895:14:
check fails
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 521 filtered out
```

Removed: the edit was restored and the case passes.
3 changes: 3 additions & 0 deletions crates/conformance/src/cases/lexicon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

use lexlean::LockRequest;

mod semantic_document;

use crate::support::{self, P};

/// Lock a mutated project, expecting the given diagnostic code.
Expand Down Expand Up @@ -1606,6 +1608,7 @@ math = "(seq (operator-name gsucc) (paren (slot 0)))"
}
}
}
"GL-22" => semantic_document::run(),
other => panic!("no lexicon case is wired for {other}"),
}
}
Loading