## Monotonicity or how to encode polymorphic types safely and efficiently

Citations: | 3 - 2 self |

### BibTeX

@MISC{Blanchette_monotonicityor,

author = {Jasmin Christian Blanchette and Sascha Böhme and Nicholas Smallbone},

title = { Monotonicity or how to encode polymorphic types safely and efficiently},

year = {}

}

### OpenURL

### Abstract

Most automatic theorem provers are restricted to untyped or monomorphic logics, and existing translations from polymorphic logics are either bulky or unsound. Recent research shows how to exploit monotonicity to encode ground types efficiently: monotonic types can be safely erased, while nonmonotonic types must generally be encoded. We extend this work to rank-1 polymorphism and show how to eliminate even more clutter by also erasing most occurrences of nonmonotonic types, without sacrificing soundness or completeness. The new encodings are implemented in the Sledgehammer tool for Isabelle/HOL. Our evaluation finds them considerably superior to previous schemes.

### Citations

601 | A Mathematical Introduction to Logic - Enderton - 1972 |

425 | Z3: an efficient SMT solver
- Moura, Bjørner
- 2008
(Show Context)
Citation Context ...ractive theorem prover Isabelle/HOL and a wide range of automatic provers. We evaluate the encodings’ suitability for the resolution provers E [17], SPASS [21], and Vampire [16] and the SMT solver Z3 =-=[15]-=- (Section 6). Our comparison includes the traditional type encodings as well as the provers’ native support for simple types (sorts) where available. The exposition builds on the following running exa... |

174 |
The Design and Implementation of Vampire
- Riazanov, Voronkov
- 2002
(Show Context)
Citation Context ...s a bridge between the interactive theorem prover Isabelle/HOL and a wide range of automatic provers. We evaluate the encodings’ suitability for the resolution provers E [17], SPASS [21], and Vampire =-=[16]-=- and the SMT solver Z3 [15] (Section 6). Our comparison includes the traditional type encodings as well as the provers’ native support for simple types (sorts) where available. The exposition builds o... |

90 | Combining superposition, sorts and splitting
- Weidenbach
(Show Context)
Citation Context ...14], which provides a bridge between the interactive theorem prover Isabelle/HOL and a wide range of automatic provers. We evaluate the encodings’ suitability for the resolution provers E [17], SPASS =-=[21]-=-, and Vampire [16] and the SMT solver Z3 [15] (Section 6). Our comparison includes the traditional type encodings as well as the provers’ native support for simple types (sorts) where available. The e... |

53 |
The TPTP problem library and associated infrastructure
- Sutcliffe
(Show Context)
Citation Context ... et al. designed a second, more powerful calculus to detect predicates that act as fig leaves for naked variables. Whilst the calculus proved fairly successful on a subset of the TPTP benchmark suite =-=[19]-=-, we assessed its suitability on about 1000 fairly large problems generated by Sledgehammer and found no improvement on the first calculus.A polymorphic type is monotonic if, whenever it is unifiable... |

44 | System description: E 0.81
- Schulz
- 2004
(Show Context)
Citation Context ...er tool [2, 14], which provides a bridge between the interactive theorem prover Isabelle/HOL and a wide range of automatic provers. We evaluate the encodings’ suitability for the resolution provers E =-=[17]-=-, SPASS [21], and Vampire [16] and the SMT solver Z3 [15] (Section 6). Our comparison includes the traditional type encodings as well as the provers’ native support for simple types (sorts) where avai... |

38 | LEO-II - a cooperative automatic theorem prover for higher-order logic
- Benzmüller, Theiss, et al.
(Show Context)
Citation Context ...ble to first-order reasoners. Our refinements to the monomorphic case have made their way into the Monotonox translator [10]. Applications such as Boogie [13], Why3 [6], and the E-based prover LEO-II =-=[1]-=- also stand to gain from a lighter translation. From both a conceptual and an implementation point of view, the encodings are all instances of a general framework, in which mostly orthogonal features ... |

28 | Translating higher-order clauses to first-order clauses
- Meng, Paulson
- 2008
(Show Context)
Citation Context ...gs based on monomorphisation (Section 4). The polymorphic encodings are proved sound and complete (Section 5). The type encodings described here have been implemented in the popular Sledgehammer tool =-=[2, 14]-=-, which provides a bridge between the interactive theorem prover Isabelle/HOL and a wide range of automatic provers. We evaluate the encodings’ suitability for the resolution provers E [17], SPASS [21... |

26 | Schubert’s steamroller problem: formulations and solutions - Stickel - 1986 |

25 | Why3: Shepherd your herd of provers
- Bobot, Filliâtre, et al.
- 2011
(Show Context)
Citation Context ...ranslation of axiomatic type classes. The intermediate verification language and tool Boogie 2 [13] supports a restricted form of higher-rank polymorphism (with polymorphic maps), and its cousin Why3 =-=[6]-=-14 provides rank-1 polymorphism. Both define translations to a monomorphic logic and rely on proxies to handle interpreted types [7,11,13]. One of the Boogie translations [13, §3.1] uses SMT triggers... |

24 | Sledgehammer: Judgement day
- Böhme, Nipkow
- 2010
(Show Context)
Citation Context ...nds of CPU time per problem on one core of a 3.06 GHz Dual-Core Intel Xeon processor. Most proofs were found within a few seconds; a higher time limit would have had little impact on the success rate =-=[8]-=-. Figures 2 and 3 give, for each combination of prover and encoding, the number of solved problems from each problem set. Rows marked with ˜ concern the monomorphic encodings. To avoid giving the unso... |

24 | A polymorphic intermediate verification language: Design and logical encoding
- Leino, Rümmer
- 2010
(Show Context)
Citation Context ... arguments are reminiscent of System F; they are described by Meng and Paulson [14], who also present a translation of axiomatic type classes. The intermediate verification language and tool Boogie 2 =-=[13]-=- supports a restricted form of higher-rank polymorphism (with polymorphic maps), and its cousin Why3 [6]14 provides rank-1 polymorphism. Both define translations to a monomorphic logic and rely on pr... |

16 | Extending Sledgehammer with SMT solvers
- Blanchette, Böhme, et al.
(Show Context)
Citation Context ...gs based on monomorphisation (Section 4). The polymorphic encodings are proved sound and complete (Section 5). The type encodings described here have been implemented in the popular Sledgehammer tool =-=[2, 14]-=-, which provides a bridge between the interactive theorem prover Isabelle/HOL and a wide range of automatic provers. We evaluate the encodings’ suitability for the resolution provers E [17], SPASS [21... |

14 | P.: The TPTP Typed Firstorder Form with Arithmetic
- Sutcliffe, Schulz, et al.
- 2012
(Show Context)
Citation Context ... encoding with ˜ to indicate monomorphisation. The mangled type guard encoding ˜g also constitutes a suitable basis for generating typed problems in the monomorphic TPTP typed first-order form (TFF0) =-=[20]-=-, a format supported natively by a growing number of provers, including Vampire and Z3. In ˜g, each bound variable is guarded by a gτ predicate; in the corresponding TFF0-based typed translation, whic... |

14 | Automated reasoning about elementary point-set topology - Wick, McCune - 1989 |

12 | S.: Handling polymorphism in automated deduction - Couchot, Lescuyer - 2007 |

10 | Implementing polymorphism in SMT solvers
- Bobot, Conchon, et al.
- 2008
(Show Context)
Citation Context ... or monomorphising them away is to support them natively in the prover. This is ubiquitous in interactive theorem provers, but perhaps the only automatic prover that supports polymorphism is Alt-Ergo =-=[5]-=-. Blanchette and Krauss [3] studied monotonicity inferences for higher-order logic without polymorphism. Claessen et al. [10] were first to apply them to type erasure. 8 Conclusion This paper introduc... |

10 | Expressing Polymorphic Types in a Many-Sorted Language
- Bobot, Paskevich
- 2011
(Show Context)
Citation Context ...her-rank polymorphism (with polymorphic maps), and its cousin Why3 [6]14 provides rank-1 polymorphism. Both define translations to a monomorphic logic and rely on proxies to handle interpreted types =-=[7,11,13]-=-. One of the Boogie translations [13, §3.1] uses SMT triggers to prevent ill-typed instantiations in conjunction with type arguments; however, this approach is risky in the absence of a semantics for ... |

9 | Monotonicity inference for higher-order formulas
- Blanchette, Krauss
- 2010
(Show Context)
Citation Context ...lity) can be simply erased, while the remaining types can be made monotonic by introducing guards or tags. Monotonicity is undecidable, but it can often be inferred in practice using suitable calculi =-=[3, 10]-=-. In this paper, we first generalise this approach to a rank-1 (ML-style) polymorphic logic, as embodied by the polymorphic TPTP typed first-order form (TFF1) [4]. Unfortunately, the presence of a sin... |

6 |
Automated inference of finite unsatisfiability
- Claessen, Lillieström
- 2009
(Show Context)
Citation Context ...h an infinity analysis: by the Löwenheim–Skolem theorem, all types with no finite models are monotonic. We call such types infinite. We could employ an approach similar to that implemented in Infinox =-=[9]-=- to automatically infer finite unsatisfiability of types; for Example 1.2, we would infer that list(α) is infinite because cons is injective but not surjective. However, in an interactive theorem prov... |

4 | TFF1: The TPTP Typed First-Order Form with Rank-1 Polymorphism. 2012
- Blanchette, Paskevich
- 1940
(Show Context)
Citation Context ...n practice using suitable calculi [3, 10]. In this paper, we first generalise this approach to a rank-1 (ML-style) polymorphic logic, as embodied by the polymorphic TPTP typed first-order form (TFF1) =-=[4]-=-. Unfortunately, the presence of a single polymorphic literal 1 X α = t will lead us to classify every type as potentially nonmonotonic and force the use of guards or tags everywhere, as in the tradit... |

4 |
Sort it out with monotonicity—Translating between many-sorted and unsorted first-order logic
- Claessen, Lillieström, et al.
- 2007
(Show Context)
Citation Context ...y unsound (i.e. they do not preserve satisfiability). As a result, application authors face a painful choice between soundness and efficiency. The third author, together with Claessen and Lillieström =-=[10]-=-, designed sound, complete, and efficient translations from monomorphic to untyped first-order logic with equality. The key insight is that monotonic types (types whose domain can be extended with new... |