Skip to content

Trying to understand detail about Lemmas from tutorial #2688

Answered by nikswamy
alex4482 asked this question in Q&A
Discussion options

You must be logged in to vote

Good question. That part you've highlighted is the proof of the lemma.

See this part of the tutorial for a similar example and an explanation for how proofs of this style work: http://fstar-lang.org/tutorial/book/part1/part1_lemmas.html#a-proof-by-induction-explained-in-detail

Summarizing:

  • Yes, indeed, this function always returns a ().

  • As such, the return value is not interesting at all. What is interesting is that property that F* can prove every time a call to this function returns. That property is the statement of the lemma and the way it proves the property is a proof by induction, i.e., in the base case, when the list is [], it can prove this property immediately without any fu…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alex4482
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants