Skip to content

Exists Statement #5563

Answered by racko
dreamqin68 asked this question in Q&A
Jun 16, 2024 · 3 comments · 1 reply
Discussion options

You must be logged in to vote
  1. Help the verifier by asserting that some value (which you have to manually specify) actually satisifies the predicate 0 <= a <length. E.g. by assert 0 <= 0 < length; Since the predicate is not trivial enough, this still fails to verify because the verifier can't "connect" this assertion with the exists expression. The warning "Could not find a trigger for this quantifier." hints at this. So you also need to
  2. Name the predicate1. E.g. var p := x => 0 <= x < length; assert p(0); exists a: nat :: p(a). Now the verifier is able to proof that such a value exists, but there is a new error: quantifiers in non-ghost contexts must be compilable, but Dafny's heuristics can't figure out how to produ…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dreamqin68
Comment options

Answer selected by dreamqin68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants