Skip to content

fix: scope Veil extensions to preserve ordinary Lean behavior - #200

Open
dranov wants to merge 2 commits into
mainfrom
codex/veil-scope-isolation
Open

dranov wants to merge 2 commits into
mainfrom
codex/veil-scope-isolation

Conversation

@dranov

@dranov dranov commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Keep Veil-specific parsing and proof automation scoped so importing Veil preserves ordinary Lean behavior. The motivating comparison was Velvet #29. Veil already evaluates that loop correctly, and this PR adds the counted-condition example as a regression test.

  • Open Veil’s syntax scopes and set its elaboration defaults inside the module namespace so end restores the caller’s scope.
  • Replace the bare ExId macro with Veil.ExId. Action semantics and generated verification conditions use Int directly for SMT literal translation.
  • Scope DSL syntax, container and serialization instances, and quantifier decision procedures. Keep Veil’s simprocs out of default simp and select them explicitly in synthesis proofs.
  • Gate Veil’s temporal quantifier elaboration on the module context. Put the model classes from Frontend/Std.lean under Veil. Code outside a Veil module can qualify names such as Veil.TotalOrder and Veil.TSet, or use open Veil.

The existing dependency pins and the integer equality compatibility instance are retained in this PR.

Validation

  • lake test
  • Legacy import Veil isolation probe
  • python3 scripts/tests/test-streaming-widgets.py trace

@dranov
dranov force-pushed the codex/veil-scope-isolation branch from 3510ec7 to 15e56bc Compare November 21, 2026 09:25
@dranov dranov changed the title Scope Veil extensions to preserve ordinary Lean behavior fix: scope Veil extensions to preserve ordinary Lean behavior Nov 21, 2026
@dranov
dranov requested a review from zqy1018 November 21, 2026 09:34
@dranov
dranov marked this pull request as ready for review November 21, 2026 09:35
@dranov

dranov commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator Author

@zqy1018 now that verse-lab/Lentil#4 is merged, we can also bump Lentil to that version and Loom to verse-lab/loom@dc269f2.

I've also filed ufmg-smite/lean-smt#287 and leanprover-community/lean-auto#82.

@zqy1018

zqy1018 commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Sure, let me do it

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.

2 participants