Skip to content

fix(MetaVerifier): add TCB bridge axiom for Lean 4.31 kernel compat - #1453

Open
kondylidou wants to merge 4 commits into
strata-org:mainfrom
kondylidou:fix/gen-smt-vcs-lean-4-31
Open

fix(MetaVerifier): add TCB bridge axiom for Lean 4.31 kernel compat#1453
kondylidou wants to merge 4 commits into
strata-org:mainfrom
kondylidou:fix/gen-smt-vcs-lean-4-31

Conversation

@kondylidou

Copy link
Copy Markdown
Contributor

Lean 4.31 changed kernel reduction of _match_N auxiliary functions
generated by complex patterns in denoteQueries/denoteTerm, breaking
gen_smt_vcs: the mv.assign hP step required the kernel to reduce
denoteQueries evcs to andN ps, which it can no longer do.

Per Joe Hendrix's recommendation (issue #1442), make translateQuery
part of the TCB by adding a per-theorem local axiom bridging
andN ps → (denoteQueries evcs).getD False at elaboration time.
The axiom is only applied after the user proves every individual VC
subgoal. The axiom name appears in #print axioms, keeping trust
explicit.

Closes #1442

kondylidou and others added 2 commits July 27, 2026 11:09
Lean 4.31 changed kernel reduction of auxiliary `_match_N` functions
generated by complex patterns in `denoteQueries`/`denoteTerm`. This
broke `gen_smt_vcs`: the final `mv.assign hP` step requires the kernel
to reduce `denoteQueries evcs` to `andN ps`, which it can no longer do.

Following Joe Hendrix's recommendation (issue strata-org#1442), make
`translateQuery` part of the trusted computing base by adding a
per-theorem local axiom that bridges the `translateQuery`-based
conjunction `andN ps` to the `smtVCsCorrect` goal type. The axiom is
applied only after the user has discharged every individual VC subgoal,
so soundness is preserved within the TCB assumption for `translateQuery`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kondylidou
kondylidou requested a review from a team July 29, 2026 13:41
@kondylidou

Copy link
Copy Markdown
Contributor Author

@joehendrix

@joscoh

joscoh commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Could you give an example test file with the resulting #print axioms?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gen_smt_vcs reduction proofs break in Lean 4.31

2 participants