-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
assert(multiset(arr[..]) == multiset(arr[..arr.Length]))
fails!
#4184
Comments
Add
|
… `s` A trivial axiom that will help to deduce that "multiset(arr[..]) == multiset(arr[..arr.Length])" for any array `arr`. (fix dafny-lang#4184 ) <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
Hey @MikaelMayer, I'm aware of the workaround and thank you for explaining how things work in the background. With a small search, I added the axiom to the prelude and it helped in more sophisticated example. |
… sequence `s` (#4194) A trivial axiom stating `Seq#Take(s, Seq#Length(s)) == s)` for all sequence `s`. This will help deducing automatically and without using any workaround that "multiset(arr[..]) == multiset(arr[..arr.Length])" for any array `arr`. Fixes #4184 <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
Dafny version
4.1.0
Code to produce this issue
Command to run and resulting output
No response
What happened?
The assertion cannot be proven correct which make it more difficult to specify and verify certain type of programs (e.g. array merge).
What type of operating system are you experiencing the problem on?
Mac
The text was updated successfully, but these errors were encountered: