Zulip Chat Archive

Stream: Veil

Topic: First proof fails


Mark R. Tuttle (Feb 10 2026 at 17:04):

I'm new to Veil, but can anyone tell me why the following fails to prove?

import Veil

veil module Test

individual x: Nat
#gen_state

after_init  {
  x := 1;
}

action incr = {
  x := x + 1;
}

invariant x >= 1
#check_invariants

end Test

Ilya Sergey (Feb 10 2026 at 17:44):

Two issues:

  • = in the incr action
  • missing pragma #gen_spec after all invariants are defined

Corrected file:

import Veil

veil module Test

individual x: Nat

#gen_state

after_init  {
  x := 1;
}

action incr {
  x := x + 1;
}

invariant x >= 1

#gen_spec

#check_invariants

end Test

Mark R. Tuttle (Feb 10 2026 at 17:51):

Thanks, the missing #gen_spec was the issue. The action syntax seems to require the = with both

#git = "https://github.com/verse-lab/veil.git"
git = "https://github.com/verse-lab/veil/tree/veil-2.0-preview"

George Pîrlea (Feb 11 2026 at 00:48):

The action syntax seems to require the = with both

@Mark R. Tuttle I suspect you're still using Veil 1.0. To use Veil 2.0, you should have the following in lakefile.toml:

[[require]]
name = "veil"
git = "https://github.com/verse-lab/veil.git"
rev = "veil-2.0-preview"

Note the use of rev, rather than giving the path to the branch in the git field.

Then run lake update veil.

I've added a version of the usage example for veil-2.0-preview at https://github.com/verse-lab/veil-usage-example/tree/veil-2.0-preview

= in the incr action

To clarify: Veil 1.0's syntax mirrored Ivy (i.e. action foo = {}), but we're moving to action foo { } syntax in Veil 2.0 (without =).

Mark R. Tuttle (Feb 11 2026 at 15:25):

Thanks. And which version of lean should I be using? The lake update veil updated the toolchain to 27.0.

George Pîrlea (Feb 12 2026 at 02:16):

v4.27.0 is the correct version, yes.


Last updated: Feb 28 2026 at 14:05 UTC