Skip to content

psi: start each generic form's Identity goals from one checked table - #6312

Merged
Smotto merged 1 commit into
mainfrom
claude/project-thread-fqwu2t
Nov 27, 2026
Merged

Smotto merged 1 commit into
mainfrom
claude/project-thread-fqwu2t

Conversation

@Smotto

@Smotto Smotto commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Requested by Jarod · project thread

Closes the PROOF-KERNEL-CORE bullet "Put the abstract carriers, trait operations and cited laws of a generic machine's Identity goals in the mathematical signature". Until now, equality::discharge built and kernel-checked those declarations again for every obligation.

Most of what an Identity goal of a generic machine names is the same in every obligation of its check form: the abstract carriers, the trait operations of its const record parameters, and the laws those parameters' traits state. Only the goal's own inputs differ.

  • Kernel. extend_signature checks only the declarations added to an already checked signature. check_signature_with_attribution now shares the same loop (check_from).

  • Stage 05. A new identity_tables.rs writes one IdentityTable into MathematicalSignature::identities for each generic check form with const record parameters, keyed by the form's position. Its contents are:

    • the trait operations the clause reader applied through each record parameter, which StaticRecordBinding::applied now records with their carriers;
    • the ensures equalities of the machines that stand for the records' law requirements, each rewritten over its formals (ClauseOperand::Formal), structural formals first.

    A law that requires something, or that names anything of a formal but the whole value, stays out of the table.

  • Stage 06. check_identity_table declares and checks a form's table once. Each obligation then starts from that table and checks only its own inputs on top of it. An obligation is refused, never silently accepted, in these cases:

    • it names a trait operation of the form's record parameters that is not in the table ("a trait operation that is not in the form's Identity table");
    • it cites a law that is not in the table ("a cited law that is not in the form's Identity table");
    • the kernel refused the form's table, which refuses every Identity goal of that form.

    Concrete modules (closure, witnesses, arrivals) have no trait operations to share, so they still declare their names per obligation.

The lowered-program README and the proof-kernel-core audit describe the table, and the TASKS bullet is deleted.

Gate: RC-SOURCE-SEMANTICS | One checked Identity table per generic check form; every obligation extends it.
Spec: wiki/spec/proofs/foundation.md#implementation-and-independent-checking
Proof: The positive test semiring_identity_starts_from_the_forms_identity_table checks the form's single table and its certificate prefix. Its negative twins are a table missing the cited law, a table missing the trait operation, and a table the kernel refuses; each is refused with its own reason. The kernel's an_extension_checks_only_what_it_adds compares an extension with a whole check and refuses an ill-formed addition at its position. | mbx test on lowered-program-to-checked-program (1,557), prepared-typed-trees-to-lowered-program, terminal-check-tables and mathematical-kernel is clean. mbx test -p omega --test kernel_judged_laws passes 35 of 38; the 3 library-subtraction tests fail the same way on main, at "machine no complete body" in nat.omg:52. Clippy with --no-deps on the five changed crates, mbx xtask fmt --check --base origin/main and mbx xtask check-boundary are clean.

Agent: Claude Code | Model: unavailable | Effort: medium | Tokens: 59.41M in (59.03M cached), 160.1k out | Steps: 267 | Time: 2h01m | Steers: 0


Generated by Claude Code

@Smotto Smotto self-assigned this Nov 27, 2026
@Smotto
Smotto merged commit d1b3f06 into main Nov 27, 2026
1 check passed
@Smotto
Smotto deleted the claude/project-thread-fqwu2t branch November 27, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants