FStarLang / FStarLang/pulse

Should `with (bs). _` instantiate all binders?

Open
#87 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
36
Forks
11
PR merge metrics
No merged PRs in 30d

Description

The following fragment fails, perhaps puzzlingly to the user, since the `with y. _` eliminates only the first existential, so it is actually instantiated with `x`. This came up in a bigger module (by @utaal) where this was not so clear. Should we maybe check that we are eliminating all of the variables of an existential, and warn or fail if not?

Removing the `with` and `assert` makes this work, the issue is more about the behavior of `with`.

assume
val f : int -> vprop
assume
val g : int -> vprop

```pulse
fn test ()
requires exists* (x:int) (y:int). f y ** g x
ensures exists* (y:int) (x:int). f y ** g x
{
with y. _;
assert (f y);
();
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.