Download PDFOpen PDF in browserWell-founded Functions and Extreme Predicates in Dafny: A Tutorial15 pages•Published: September 27, 2016AbstractA recursive function is well defined if its every recursive callcorresponds a decrease in some well-founded order. Such a function is said to be _terminating_ and is in many applications the standard way to define a function. A boolean function can also be defined as an extreme solution to a recurrence relation, that is, as a least or greatest fixpoint of some functor. Such _extreme predicates_ are useful to encode a set of inductive or coinductive inference rules and are at the core of many a constructive logic. The verification-aware programming language Dafny supports both terminating functions and extreme predicates. This tutorial describes the difference in general terms, and then describes novel syntactic support in Dafny for defining and proving lemmas with extreme predicates. Various examples and considerations are given. Although Dafny's verifier has at its core a first-order SMT solver, Dafny's logical encoding makes it possible to reason about fixpoints in an automated way. Keyphrases: coinduction, coinductive predicate, greatest fixpoint, induction, inductive predicate, least fixpoint, mechanical proof assistant In: Boris Konev, Stephan Schulz and Laurent Simon (editors). IWIL-2015. 11th International Workshop on the Implementation of Logics, vol 40, pages 52-66.
|