83 research outputs found
A dependent nominal type theory
Nominal abstract syntax is an approach to representing names and binding
pioneered by Gabbay and Pitts. So far nominal techniques have mostly been
studied using classical logic or model theory, not type theory. Nominal
extensions to simple, dependent and ML-like polymorphic languages have been
studied, but decidability and normalization results have only been established
for simple nominal type theories. We present a LF-style dependent type theory
extended with name-abstraction types, prove soundness and decidability of
beta-eta-equivalence checking, discuss adequacy and canonical forms via an
example, and discuss extensions such as dependently-typed recursion and
induction principles
Mechanizing the Metatheory of LF
LF is a dependent type theory in which many other formal systems can be
conveniently embedded. However, correct use of LF relies on nontrivial
metatheoretic developments such as proofs of correctness of decision procedures
for LF's judgments. Although detailed informal proofs of these properties have
been published, they have not been formally verified in a theorem prover. We
have formalized these properties within Isabelle/HOL using the Nominal Datatype
Package, closely following a recent article by Harper and Pfenning. In the
process, we identified and resolved a gap in one of the proofs and a small
number of minor lacunae in others. We also formally derive a version of the
type checking algorithm from which Isabelle/HOL can generate executable code.
Besides its intrinsic interest, our formalization provides a foundation for
studying the adequacy of LF encodings, the correctness of Twelf-style
metatheoretic reasoning, and the metatheory of extensions to LF.Comment: Accepted to ACM Transactions on Computational Logic. Preprint
A Theory of Higher-Order Subtyping with Type Intervals (Extended Version)
The calculus of Dependent Object Types (DOT) has enabled a more principled
and robust implementation of Scala, but its support for type-level computation
has proven insufficient. As a remedy, we propose , a rigorous
theoretical foundation for Scala's higher-kinded types. extends
with interval kinds, which afford a unified treatment of
important type- and kind-level abstraction mechanisms found in Scala, such as
bounded quantification, bounded operator abstractions, translucent type
definitions and first-class subtyping constraints. The result is a flexible and
general theory of higher-order subtyping. We prove type and kind safety of
, as well as weak normalization of types and undecidability of
subtyping. All our proofs are mechanized in Agda using a fully syntactic
approach based on hereditary substitution.Comment: 73 pages; to be presented at the 26th ACM SIGPLAN International
Conference on Functional Programming (ICFP 2021), 22-27 August 202
Metalevel and reflexive extension in mechanical theorem proving
In spite of many years of research into mechanical assistance for mathematics
it is still much more difficult to construct a proof on a machine than on
paper. Of course this is partly because, unlike a proof on paper, a machine
checked proof must be formal in the strictest sense of that word, but it is
also because usually the ways of going about building proofs on a machine
are limited compared to what a mathematician is used to. This thesis looks
at some possible extensions to the range of tools available on a machine
that might lend a user more flexibility in proving theorems, complementing
whatever is already available.In particular, it examines what is possible in a framework theorem
prover. Such a system, if it is configured to prove theorems in a particular
logic T, must have a formal description of the proof theory of T written
in the framework theory F of the system. So it should be possible to use
whatever facilities are available in F not only to prove theorems of T, but
also theorems about T that can then be used in their turn to aid the user
in building theorems of T.The thesis is divided into three parts. The first describes the theory
FSâ‚€, which has been suggested by Feferman as a candidate for a framework
theory suitable for doing meta-theory. The second describes some experiments with FSâ‚€, proving meta-theorems. The third describes an experiment
in extending the theory PRA, declared in FSâ‚€, with a reflection facility.More precisely, in the second section three theories are formalised:
propositional logic, sorted predicate logic, and the lambda calculus (with
a deBruijn style binding). For the first two the deduction theorem and
the prenex normal form theorem are respectively proven. For the third, a
relational definition of beta-reduction is replaced with an explicit function.In the third section, a method is proposed for avoiding the work involved
in building a full Godel style proof predicate for a theory. It is suggested
that the language be extended with quotation and substitution facilities directly, instead of providing them as definitional extensions. With this, it
is possible to exploit an observation of Solovay's that the Lob derivability
conditions are sufficient to capture the schematic behaviour of a proof
predicate. Combining this with a reflection schema is enough to produce
a non-conservative extension of PRA, and this is demonstrated by some
experiments
Towards Strong Normalization for Dependent Object Types (DOT)
The Dependent Object Types (DOT) family of calculi has been proposed as a new theoretic foundation for Scala and similar languages, unifying functional programming, object oriented programming and ML-style module systems. Following the recent type soundness proof for
DOT, the present paper aims to establish stronger meta-theoretic properties. The main result is a fully mechanized proof of strong normalization for D_<:, a variant of DOT that excludes recursive functions and recursive types. We further discuss techniques and challenges for adding recursive types while maintaining strong normalization, and demonstrate that certain variants of recursive self types can be integrated successfully
Higher-Order Subtyping with Type Intervals
Modern, statically typed programming languages provide various abstraction facilities at both the term- and type-level. Common abstraction mechanisms for types include parametric polymorphism -- a hallmark of functional languages -- and subtyping -- which is pervasive in object-oriented languages. Additionally, both kinds of languages may allow parametrized (or generic) datatype definitions in modules or classes. When several of these features are present in the same language, new and more expressive combinations arise, such as (1) bounded quantification, (2) bounded operator abstractions and (3) translucent type definitions. An example of such a language is Scala, which features all three of the aforementioned type-level constructs. This increases the expressivity of the language, but also the complexity of its type system. From a theoretical point of view, the various abstraction mechanisms have been studied through different extensions of Girard's higher-order polymorphic lambda-calculus F-omega. Higher-order subtyping and bounded polymorphism (1 and 2) have been formalized in F-omega-sub and its many variants; type definitions of various degrees of opacity (3) have been formalized through extensions of F-omega with singleton types. In this dissertation, I propose type intervals as a unifying concept for expressing (1--3) and other related constructs. In particular, I develop an extension of F-omega with interval kinds as a formal theory of higher-order subtyping with type intervals, and show how the familiar concepts of higher-order bounded quantification, bounded operator abstraction and singleton kinds can all be encoded in a semantics-preserving way using interval kinds. Going beyond the status quo, the theory is expressive enough to also cover less familiar constructs, such as lower-bounded operator abstractions and first-class, higher-order inequality constraints. I establish basic metatheoretic properties of the theory: I prove that subject reduction holds for well-kinded types w.r.t. full beta-reduction, that types and kinds are weakly normalizing, and that the theory is type safe w.r.t. its call-by-value operational reduction semantics. Key to this metatheoretic development is the use of hereditary substitution and the definition of an equivalent, canonical presentation of subtyping, which involves only normal types and kinds. The resulting metatheory is entirely syntactic, i.e. does not involve any model constructions, and has been fully mechanized in Agda. The extension of F-omega with interval kinds constitutes a stepping stone to the development of a higher-order version of the calculus of Dependent Object Types (DOT) -- the theoretical foundation of Scala's type system. In the last part of this dissertation, I briefly sketch a possible extension of the theory toward this goal and discuss some of the challenges involved in adapting the existing metatheory to that extension
Type soundness proofs with definitional interpreters
While type soundness proofs are taught in every graduate PL class, the gap between realistic languages and what is accessible to formal proofs is large. In the case of Scala, it has been shown that its formal model, the Dependent Object Types (DOT) calculus, cannot simultaneously support key metatheoretic properties such as environment narrowing and subtyping transitivity, which are usually required for a type soundness proof. Moreover, Scala and many other realistic languages lack a general substitution property.
The first contribution of this paper is to demonstrate how type soundness proofs for advanced, polymorphic, type systems can be carried out with an operational semantics based on high-level, definitional interpreters, implemented in Coq. We present the first mechanized soundness proofs in this style for System F<: and several extensions, including mutable references. Our proofs use only straightforward induction, which is significant, as the combination of big-step semantics, mutable references, and polymorphism is commonly believed to require coinductive proof techniques.
The second main contribution of this paper is to show how DOT-like calculi emerge from straightforward generalizations of the operational aspects of F<:, exposing a rich design space of calculi with path-dependent types in between System F and DOT, which we dub the System D Square.
By working directly on the target language, definitional interpreters can focus the design space and expose the invariants that actually matter at runtime. Looking at such runtime invariants is an exciting new avenue for type system design.This research was supported by NSF through awards 1553471 and 1564207
Bootstrapping extensionality
Intuitionistic type theory is a formal system designed by Per Martin-Loef to be a full-fledged foundation in which to develop constructive mathematics. One particular variant, intensional type theory (ITT), features nice computational properties like decidable type-checking, making it especially suitable for computer implementation. However, as traditionally defined, ITT lacks many vital extensionality principles, such as function extensionality. We would like to extend ITT with the desired extensionality principles while retaining its convenient computational behaviour. To do so, we must first understand the extent of its expressive power, from its strengths to its limitations.
The contents of this thesis are an investigation into intensional type theory, and in particular into its power to express extensional concepts. We begin, in the first part, by developing an extension to the strict setoid model of type theory with a universe of setoids. The model construction is carried out in a minimal intensional type theoretic metatheory, thus providing a way to bootstrap extensionality by ``compiling'' it down to a few building blocks such as inductive families and proof-irrelevance.
In the second part of the thesis we explore inductive-inductive types (ITTs) and their relation to simpler forms of induction in an intensional setting. We develop a general method to reduce a subclass of infinitary IITs to inductive families, via an encoding that can be expressed in ITT without any extensionality besides proof-irrelevance. Our results contribute to further understand IITs and the expressive power of intensional type theory, and can be of practical use when formalizing mathematics in proof assistants that do not natively support induction-induction
Bootstrapping extensionality
Intuitionistic type theory is a formal system designed by Per Martin-Loef to be a full-fledged foundation in which to develop constructive mathematics. One particular variant, intensional type theory (ITT), features nice computational properties like decidable type-checking, making it especially suitable for computer implementation. However, as traditionally defined, ITT lacks many vital extensionality principles, such as function extensionality. We would like to extend ITT with the desired extensionality principles while retaining its convenient computational behaviour. To do so, we must first understand the extent of its expressive power, from its strengths to its limitations.
The contents of this thesis are an investigation into intensional type theory, and in particular into its power to express extensional concepts. We begin, in the first part, by developing an extension to the strict setoid model of type theory with a universe of setoids. The model construction is carried out in a minimal intensional type theoretic metatheory, thus providing a way to bootstrap extensionality by ``compiling'' it down to a few building blocks such as inductive families and proof-irrelevance.
In the second part of the thesis we explore inductive-inductive types (ITTs) and their relation to simpler forms of induction in an intensional setting. We develop a general method to reduce a subclass of infinitary IITs to inductive families, via an encoding that can be expressed in ITT without any extensionality besides proof-irrelevance. Our results contribute to further understand IITs and the expressive power of intensional type theory, and can be of practical use when formalizing mathematics in proof assistants that do not natively support induction-induction
- …