Multi-level Meta-reasoning with Higher-Order Abstract Syntax [chapter]

Alberto Momigliano, Simon J. Ambler
2003 Lecture Notes in Computer Science  
Combining Higher Order Abstract Syntax (HOAS) and (co)induction is well known to be problematic. In previous work [1] we have described the implementation of a tool called Hybrid, within Isabelle HOL, which allows object logics to be represented using HOAS, and reasoned about using tactical theorem proving and principles of (co)induction. Moreover, it is definitional, which guarantees consistency within a classical type theory. In this paper we describe how to use it in a multi-level reasoning
more » ... ashion, similar in spirit to other meta-logics such F Oλ ∆I N and Twelf. By explicitly referencing provability, we solve the problem of reasoning by (co)induction in presence of non-stratifiable hypothetical judgments, which allow very elegant and succinct specifications. We demonstrate the method by formally verifying the correctness of a compiler for (a fragment) of Mini-ML, following [10] . To further exhibit the flexibility of our system, we modify the target language with a notion of non-well-founded closure, inspired by Milner & Tofte [19] and formally verify via co-induction a subject reduction theorem for this modified language. logic (SL) which in turn it is used to specify the object-logic (OL) under study. This partition solves the problem of meta-reasoning in the presence of negative occurrences, since hypothetical judgments are now encapsulated within the OL and therefore not required to be inductive. The price to pay is this additional layer where we explicitly reference provability and the necessity therefore of a sort of meta-interpreter (the SL logic) to access it. Very recently, Felty [6] has suggested that, rather than implementing an interactive theorem prover for F Oλ ∆I N from scratch, the latter can be simulated within an existing system (Coq in that case); in particular, definitional reflection is mimicked by the elimination rules of inductive types. Nevertheless, this is not quite enough, as reasoning by inversion crucially depends on simplifying in the presence of constructors. Since some of the higher-order ones may be non-inductive, Felty recurs to the assumption of a set of axioms stating the freeness and extensionality properties of constructors in the given signature. Under those conditions the author shows, in the example of the formalization of subject reduction for Mini-ML, how it is possible to replicate, in an well-understood and interactive setting, the style of proofs typical of F Oλ ∆I N ; namely the result is proven without "technical" lemmas foreign to the mathematics of the problem. In previous work [1] we have described the implementation of a higher-order meta-language, called Hybrid, within Isabelle HOL, which provides a form of HOAS for the user to represent object logics. The user level is separated from the infrastructure, in which HOAS is implemented definitionally via a de Bruijn style encoding.
doi:10.1007/3-540-36576-1_24 fatcat:ckjjrrjcvraunl6yspkenkaccm