Repository navigation
chore: backport Lean SMT fixes - #196
Merged
Merged
Conversation
dranov
marked this pull request as draft
November 21, 2026 04:07
Pin Lean SMT to the hardened #285 backport. Derive Nonempty from Veil’s Inhabited instances before symbolic trace simplification in either solver mode.
This was
linked to
issues
Nov 21, 2026
dranov
marked this pull request as ready for review
November 21, 2026 14:35
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.
Summary
b8633e75c15b51134b4e6d6d3d15668d959e519f. Theveil-no-mathlibbranch replays Veil’s fork changes and the upstreammainchanges throughcbec5bdon upstreamno_mathlib.Nonemptyevidence before translating an unused quantifier over a data sort. The check uses the goal’s instances, which keeps cached translations independent of temporary solver binders. Veil preserves this evidence before symbolic trace simplification in both solver modes.coverage : Fin maxId → Natwithveil.smt.trust false. The backported embedding handles symbolic bounds, including zero. Lean SMT PR #5Nat.max, and BitVec proof reconstruction with the pinned cvc5 1.3.2. Veil 4.35’s release dependency branch still points to293dab6.Addresses #189, #177, #178, #181, #118, and #188.
Validation
sat tracewith an unused quantified variable gives a cvc5 error #188 finds a satisfying trace with trusted SMT enabled.veil.smt.trust false, Veil proved all 37 Fin-indexed coverage and routing conditions on the pinned commit (previously 17/37). These include the two-action reproducer from Veil #173.Before and after on the seven reported issues
main(d6229a1e)5fc19229)veil-no-mathlibNat.maxin an actionNat.casterror blocked the trace and the positivity proof.d7a2143Fin nfieldsb8633e7clear.clear, which leaves the relation untouched.f9a3b88assumptionstep failed ondistinctN.smt [h]proves the original theorem.8a3005eIntliterals in updatescannot translate Type. The trace failed withcannot translate 0.tadvancing from 0 to 1. Initialization and action literals also pass when tested separately.f1942fdsat tracefailed because cvc5 treated->as an undeclared symbol.node = Fin 1andflag = false. The trust-off control succeeds on both revisions.489070bBitVecliteralf N = 2#2even though explicit model checking found a violation.5#2 = 1#2) and proves the corrected invariant with trust on and off.be130baFor #188, Lean SMT requires
Nonemptyevidence for the unused quantifier’s domain. Veil preserves that evidence before simplifying trusted traces. Veil commit76fcbf2For #173, the report included the theorem cases but omitted the full four-action module, so the module-level comparison used a reconstruction of the reported scenario.