Proving properties
In the previous chapter, we proved one property of the square function:
panic freedom.
This contract stipulates that, given a small input, the function will
return a value: it will not panic or diverge. We could enrich the
contract of square with a post-condition about the fact it is an
increasing function:
The property that we prove above demonstrates a very simple case of a proof using hax and Lean. For a more complex example, a version of the Barrett example is available in the
examples
section of hax.