Skip to content

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

Open
kondylidou wants to merge 2 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#8
kondylidou wants to merge 2 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 auxiliary match functions generated
by complex patterns in denoteQueries/denoteTerm, breaking
gen_smt_vcs_boole: mv.assign hP fails the kernel type-check because
the kernel can no longer reduce denoteQueries evcs to andN ps.

Fix: at elaboration time, add a local axiom
(h : andN ps) → (denoteQueries evcs).getD False
and assign mv := bridgeAxiom hP. This makes translateQuery part of
the TCB per Joe Hendrix's recommendation (strata-org/Strata#1442). The
axiom is only applied once the user has proved every individual VC
subgoal, and its name appears in #print axioms — see the updated
guard in demo.lean.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

kondylidou and others added 2 commits July 29, 2026 14:45
Mirror of Strata fix for issue #1442. The `_match_N` reduction change
in Lean 4.31 also breaks `gen_smt_vcs_boole` via the identical
`mv.assign hP` pattern in `genSMTVCsBooleUnsafe`.

Add a per-theorem local axiom bridging `andN ps` → `smtVCsCorrectBoole`
goal, making `translateQuery` part of the TCB as recommended by Joe
Hendrix. Update demo.lean's `#guard_msgs` axiom list accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant