Skip to content

feat(Core): nat/pos counterexample support via UF+axioms re-query#1439

Open
kondylidou wants to merge 1 commit into
strata-org:mainfrom
kondylidou:feat/nat-binary-datatype
Open

feat(Core): nat/pos counterexample support via UF+axioms re-query#1439
kondylidou wants to merge 1 commit into
strata-org:mainfrom
kondylidou:feat/nat-binary-datatype

Conversation

@kondylidou

Copy link
Copy Markdown
Contributor

Enables concrete counterexamples for nat/pos verification failures.

When cvc5 returns unknown with a candidate model (as it does when quantified
bridge axioms prevent certification), the candidate model is now preserved
through SMT.Result.merge and extracted in getObligationResult for display.
A new requeryDropAxioms parameter to verify strips bridge axiom assume
statements from obligation procedures and re-runs unknown obligations, letting
the solver return a certified sat (counterexample) unimpeded by the universals.

Changes

  • SMTUtils.lean — parse cvc5 candidate model on unknown verdict; use
    actual user-variable SMT terms (via estate.functions) in incremental
    get-value calls instead of boolean assumption IDs so nat/pos values are
    retrievable
  • Verifier.lean — preserve unknown (some m) payload across
    SMT.Result.merge; extract candidate models from unknown (some m) in
    getObligationResult; add VCResult.hasValidityUnknown (weaker gate than
    isUnknown, catches satisfiableValidityUnknown outcomes from nat VCs with
    bridge axioms); add requeryDropAxioms + re-query pass to verify
  • VerifierProofs.lean — update merge_kind proof for new
    unknown×unknown model-preserving branches
  • lake-manifest.json — bump StrataDDM to 4ea13cd (adds @[noExponent]
    arg-level format marker, fixing a build regression in
    DDMTransform/Parse.lean)

Add candidate-model propagation and axiom-drop re-query so nat/pos
verification failures surface concrete counterexamples instead of
stopping at `unknown`.

Key changes:
- SMTUtils: parse cvc5 candidate model on `unknown` result; use actual
  user-variable SMT terms (from estate.functions) in incremental solver
  get-value calls instead of boolean assumption IDs, so nat/pos variable
  values are retrievable
- Verifier: preserve `unknown (some m)` payload across SMT.Result.merge;
  extract candidate model from `unknown (some m)` in getObligationResult;
  add VCResult.hasValidityUnknown (weaker gate than isUnknown, catches
  satisfiableValidityUnknown outcomes from nat VCs with bridge axioms);
  add requeryDropAxioms parameter to verify — strips named axiom assumes
  from oblProgram and re-runs unknown obligations so the solver can
  certify a counterexample unimpeded by universally-quantified bridge
  axioms
- VerifierProofs: update merge_kind proof for new unknown×unknown
  model-preserving branches
- lake-manifest: bump StrataDDM to 4ea13cd (adds @[noExponent] arg-level
  format marker needed by Strata/DL/SMT/DDMTransform/Parse.lean)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kondylidou
kondylidou requested a review from a team July 16, 2026 13:54
@github-actions github-actions Bot added Waiting-For-Review Core dependencies Pull requests that update a dependency file labels Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Core dependencies Pull requests that update a dependency file Waiting-For-Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant