Proving loop termination with an addition #1378
Unanswered
ROMemories
asked this question in
Q&A
Replies: 1 comment
-
Our model for while loops is not very usable at the moment. You could use an We are currently working on an improvement on this in #1375 . you can check this playground that uses this branch and adds an annotation to prove termination and an invariant for the loop. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to prove that the following function does not panic (as a helper function because hax does not currently support
Iterator::position()
):view in hax playground
My understanding is that there are three things to prove in this function:
i < N
).Later, I could try proving that the function actually returns the correct index, but this is out of scope.
F* typechecking currently fails on the addition's rhs, but I could use a hint about whether this is because the addition cannot be proven overflow-free and how to prove this correctly (I would also be fine with
assume
ing things here, as I expect this to be temporary).Beta Was this translation helpful? Give feedback.
All reactions