## Local theory specifications in Isabelle/Isar

Citations: | 5 - 1 self |

### BibTeX

@MISC{Haftmann_localtheory,

author = {Florian Haftmann and Makarius Wenzel},

title = {Local theory specifications in Isabelle/Isar},

year = {}

}

### OpenURL

### Abstract

Recent versions of the proof assistant Isabelle have acquired a “local theory” concept that integrates a variety of mechanisms for structured specifications into a common framework. We explicitly separate a local theory “target” from its “body”, i.e. a fixed axiomatic specification (parameters and assumptions) vs. arbitrary definitional extensions (conclusions) depending on it. Body elements may be added incrementally, and admit local polymorphism according to Hindley-Milner. The foundations of our local theories rest firmly on existing Isabelle/Isar principles, without having to invent new logics or module calculi. Particular target contexts and body elements may be implemented within the generic infrastructure. This results in a large combinatorial space of specification idioms available to the end-user. Here we introduce targets for Isabelle locales, type-classes, and class instantiations. The available selection of body elements covers primitive definitions and theorems, inductive predicates and sets, and recursive functions. Porting such existing definitional packages is reasonably simple, and enables to re-use sophisticated tools in a variety of target contexts without further ado. For example, a recursive function may be defined depending on locale parameters and assumptions, or an inductive predicate definition may provide the witness in a type-class instantiation.

### Citations

978 | A theory of type polymorphism in programming
- Milner
- 1978
(Show Context)
Citation Context ...nted here demonstrate that rather non-trivial modular concepts can indeed be mapped to the Pure logic, including an illusion of local type-quantification (for definitions) according to Hindley-Milner =-=[12]-=-. In fact, there is no need to stay within our canonical interpretation of λlifting at all. This template may be transcended by using explicit proof terms in Pure, to enable more general “admissible” ... |

868 |
A Formulation of the Simple Theory of Types
- Church
- 1941
(Show Context)
Citation Context ...s “LCF-approach” in its last consequence, cf. the discussion in [18, §3]. 3.1 The Pure Logical Framework The logic of Isabelle/Pure [14] is a reduced version of Higher-Order Logic according to Church =-=[7]-=- and Gordon [8]. This minimal version of HOL is used as a logical framework to represent object-logics, such as the fully featured Isabelle/HOL [13] which is most widely used in practice. Logical Enti... |

778 |
Isabelle/HOL: A Proof Assistant for Higher-Order Logic,” LNCS 2283
- Nipkow, Paulson, et al.
- 2002
(Show Context)
Citation Context ...lle/Pure and Isabelle/Isar (§3), we introduce the main local theory architecture (§4) and describe some concrete target mechanisms (§5). 2 Example: Type Classes The subsequent example in Isabelle/HOL =-=[13]-=- uses type-classes to model general orders and orders that admit well-founded induction. Earlier [10] we have already integrated traditional axiomatic type-classes with locales, now both theory struct... |

187 |
Isabelle: The next 700 theorem provers
- Paulson
- 1990
(Show Context)
Citation Context ...t sophisticated tools without endangering soundness. This is Milner’s “LCF-approach” in its last consequence, cf. the discussion in [18, §3]. 3.1 The Pure Logical Framework The logic of Isabelle/Pure =-=[14]-=- is a reduced version of Higher-Order Logic according to Church [7] and Gordon [8]. This minimal version of HOL is used as a logical framework to represent object-logics, such as the fully featured Is... |

84 | A Generic Interpretative Approach to Readable Formal Proof Documents
- Wenzel
(Show Context)
Citation Context ...ing “apply (rule r)” in a tactic script. Thus the first level of primitive inferences remains free for internal uses, to support local scopes of fixed variables and assumptions. Both Isar proof texts =-=[17]-=- and locales [11,1,2] operate on this primitive level of Pure, and the Isabelle/Isar framework ensures that local hypotheses are managed according to the block structure of the text, such that users n... |

74 | Type classes and overloading in higher-order logic
- Wenzel
- 1997
(Show Context)
Citation Context ...ol refers to a global class operation for arbitrary order types α; the notation x � y also works as expected. Global class axioms are available as theorems refl, trans, antisym. Old-fashioned axclass =-=[16]-=- would have achieved a similar effect. At this point we could even continue with further definitions and proofs relatively to this polymorphic constant only, e.g. constant less :: α::order ⇒ α ⇒ bool ... |

58 |
eds.): Introduction to HOL: a theorem proving environment for higher order logic
- Gordon, Melham
- 1993
(Show Context)
Citation Context ...” in its last consequence, cf. the discussion in [18, §3]. 3.1 The Pure Logical Framework The logic of Isabelle/Pure [14] is a reduced version of Higher-Order Logic according to Church [7] and Gordon =-=[8]-=-. This minimal version of HOL is used as a logical framework to represent object-logics, such as the fully featured Isabelle/HOL [13] which is most widely used in practice. Logical Entities. The Pure ... |

55 | Proof-assistants using dependent type systems
- Barendregt, Geuvers
- 2001
(Show Context)
Citation Context ... think of theorems as representing full proof terms, even though the implementation may omit them: the formal system can be categorized as “λHOL” within the general setting of Pure Type Systems (PTS) =-=[3]-=-. This provides a unified view of terms and derivations, with terms depending on terms λx :: α. b[x], proofs depending on terms ∧ x :: α. B[x], and proofs depending on proofs A =⇒ B. Object-logic infe... |

40 | Locales and locale expressions in Isabelle/Isar
- Ballarin
- 2004
(Show Context)
Citation Context ...r)” in a tactic script. Thus the first level of primitive inferences remains free for internal uses, to support local scopes of fixed variables and assumptions. Both Isar proof texts [17] and locales =-=[11,1,2]-=- operate on this primitive level of Pure, and the Isabelle/Isar framework ensures that local hypotheses are managed according to the block structure of the text, such that users never have to care abo... |

23 | Interpretation of locales in Isabelle: Theories and proof contexts
- Ballarin
(Show Context)
Citation Context ...ost one instantiation per type constructor. So we better continue within the hybrid class/locale context, which provides type-class results as expected, but also admits general locale interpretations =-=[2]-=-. context order begin We now define less as the strict part of less-eq, and prove some simple lemmas. definition less :: α ⇒ α ⇒ bool (infix ≺ 50) where x ≺ y ↔ x � y ∧ ¬ y � x lemma irrefl: ¬ x ≺ x 〈... |

18 | Function definition in Higher-Order Logic
- Slind
- 1996
(Show Context)
Citation Context ...( � y. y ≺ x =⇒ P y) =⇒ P x) =⇒ P x begin With this induction rule available, we can define a recursion combinator by means of an inductive relation that corresponds to the function’s graph, see also =-=[15]-=-. inductive wfrec-rel :: ((α ⇒ β) ⇒ α ⇒ β) ⇒ α ⇒ β ⇒ bool for F :: (α ⇒ β) ⇒ α ⇒ β where rec: ( � z. z ≺ x =⇒ wfrec-rel F z (g z)) =⇒ wfrec-rel F x (F g x) definition cut :: α ⇒ (α ⇒ β) ⇒ α ⇒ β where ... |

14 | Constructive type classes in Isabelle
- Haftmann, Wenzel
- 2007
(Show Context)
Citation Context ...me concrete target mechanisms (§5). 2 Example: Type Classes The subsequent example in Isabelle/HOL [13] uses type-classes to model general orders and orders that admit well-founded induction. Earlier =-=[10]-=- we have already integrated traditional axiomatic type-classes with locales, now both theory structuring concepts are also fitted into the bigger picture of local theories. Basic Isabelle notation app... |

10 | Building Formal Method Tools in the Isabelle/Isar Framework - Wenzel, Wolff - 2007 |

7 |
et al. ”The Coq proof assistant Reference manual
- Barras, Boutin
- 2001
(Show Context)
Citation Context ... in the guise of algebraic specification, little theories etc. Many module systems for proof assistants have been developed in the past, and this is still a matter of active research. Taking only Coq =-=[3]-=- as example, there are “structures” (a variety of record types), “sections” (groups of definitions and proofs depending on parameters and assumptions), and “modules” that resemble ML functors. Our gen... |

7 | Context aware calculation and deduction — ring equalities via Gröbner Bases in Isabelle
- Chaieb, Wenzel
- 2007
(Show Context)
Citation Context ... classic example. A more recent elaboration on the same theme are LCF-style proof tools that work relatively to some local declarations and may be transformed in a concrete application context later; =-=[6]-=- covers a realistic example of a Gröbner Base procedure on abstract rings that may get used on concrete integers etc. Subsequently we briefly review the main aspects of Isar proof contexts, as require... |

6 | Structured formal development in Isabelle
- Bortin, Johnsen, et al.
- 2006
(Show Context)
Citation Context ...retation of λlifting at all. This template may be transcended by using explicit proof terms in Pure, to enable more general “admissible” principles in the interpretation. 14sFor example, the AWE tool =-=[5]-=- applies theory interpretation techniques directly to global type constructors, constants and axioms. This allows to operate on polymorphic entities, as required for an abstract theory of monads, for ... |

2 | eds.): Theorem Proving - Gunter, Felty - 1997 |

1 |
L.C.: Locales: A sectioning concept for Isabelle. In: Bertot et al. [4
- Kammüller, Wenzel, et al.
(Show Context)
Citation Context ... on locale parameters and assumptions, or an inductive predicate definition may provide the witness in a type-class instantiation. 1 Introduction Many years ago, Isabelle locales have been introduced =-=[11]-=- as a mechanism to organize formal reasoning in a modular fashion: after defining a locale as a context of fixed parameters (fixes) and assumptions (assumes), theorems could be proven within that scop... |