Repository navigation
psi: start each generic form's Identity goals from one checked table - #6312
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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::dischargebuilt 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_signaturechecks only the declarations added to an already checked signature.check_signature_with_attributionnow shares the same loop (check_from).Stage 05. A new
identity_tables.rswrites oneIdentityTableintoMathematicalSignature::identitiesfor each generic check form with const record parameters, keyed by the form's position. Its contents are:StaticRecordBinding::appliednow records with their carriers;ensuresequalities 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_tabledeclares 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: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_tablechecks 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'san_extension_checks_only_what_it_addscompares an extension with a whole check and refuses an ill-formed addition at its position. |mbx testonlowered-program-to-checked-program(1,557),prepared-typed-trees-to-lowered-program,terminal-check-tablesandmathematical-kernelis clean.mbx test -p omega --test kernel_judged_lawspasses 35 of 38; the 3 library-subtraction tests fail the same way onmain, at "machine no complete body" innat.omg:52. Clippy with--no-depson the five changed crates,mbx xtask fmt --check --base origin/mainandmbx xtask check-boundaryare 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