Skip to content

Have trouble understand the use of reveal_with_fuel in the fibo example #1379

Closed Answered by tjhance
KaminariOS asked this question in Support
Discussion options

You must be logged in to vote

I recall discussing this same question before.

Verus proves this case as follows:

  • From lemma_fibo_is_monotonic(i, (j - 1) as nat); we get that fibo(i) <= fibo(j-1).
  • By a single unfolding, we also get fibo(j) == fibo(j-1) + fibo(j-2).
  • By a second unfolding, we learn that fibo(j-2) is a nat, thus fibo(j-2) >= 0.

Putting these all together, we get fibo(i) <= fibo(j). Presumably, the confusing thing is the third bullet point; most people do not expect that an "unfolding" is required to deduce that fibo(j-2) is a nat.

We could consider changing this behavior; I don't think it's intentional.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

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

Answer selected by utaal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
4 participants