Skip to content

gen_smt_vcs: translate bvudiv as smtUDiv; refuse VCs the denotation does not cover - #1490

Open
kondylidou wants to merge 8 commits into
strata-org:mainfrom
kondylidou:fix/gen-smt-vcs-denotation
Open

kondylidou wants to merge 8 commits into
strata-org:mainfrom
kondylidou:fix/gen-smt-vcs-denotation

Conversation

@kondylidou

Copy link
Copy Markdown
Contributor

Fixes #1488.

gen_smt_vcs closes smtVCsCorrect p with a per-theorem axiom stating that its goals imply the denotation of the VCs, so every goal must carry the denotation's meaning. Two places where it did not:

  • bvudiv was translated to Lean's / (x / 0 = 0) but denoted as BitVec.smtUDiv (x / 0 is all ones). It is now translated as BitVec.smtUDiv. An audit of translateQuery against denoteTerm, operator by operator, found no other mismatch.
  • denoteTerm has no case for datatype operations, and SanitizedContext.toCore drops the datatype fields, so the "datatypes not supported" guard never fired. For any VC over a datatype the denotation is none, smtVCsCorrect is False, and the axiom proved it. createGoal now fails with an error on such a VC instead of creating a goal. Boole's gen_smt_vcs_boole goes through the same function.

Test GenSMTVCsDenotation.lean: bvudiv by zero proved with its SMT-LIB meaning (the issue's reproduction now stops at its first step, since the goal is x.smtUDiv 0#8 = 0#8), and a datatype program pinned to the refusal error.

Not changed: the bridge axiom itself. #1480 is blocked until datatypes have a denotation.

Comment thread Strata/MetaVerifier.lean Outdated
aqjune-aws and others added 2 commits October 19, 2026 16:15
Split Term.hasDatatypeOp into mutually recursive helpers over List Term and
List (List Term), as substituteTermIS does in Denote.lean, so it is
structurally recursive instead of partial.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kondylidou
kondylidou requested a review from shigoel October 20, 2026 07:57
@joscoh
joscoh added this pull request to the merge queue Oct 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 26, 2026
@kondylidou

Copy link
Copy Markdown
Contributor Author

@shigoel @joscoh thanks for the approvals. The PR was ejected from the merge queue because the PR Import step failed (StrataPrImport-Prod:eb5d2281-759b-41e7-acb1-37e41c2205fb). The public checks all passed on the queue commit a710081, so I can't see what broke. Could you check the internal build log?

If it is a real failure, my guess is something internal relies on one of the two intended changes here. gen_smt_vcs now refuses VCs that contain datatype operations instead of producing a goal, and bvudiv now denotes BitVec.smtUDiv instead of Lean's division. Happy to adjust once I know which, and if it was transient, could you re-queue it?

This branch has not been deployed

No deployments
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 proves False: translateQuery encodes bvudiv as Lean /, and the TCB bridge axiom (#1453) trusts it

4 participants