64 research outputs found
Free Applicative Functors
Applicative functors are a generalisation of monads. Both allow the
expression of effectful computations into an otherwise pure language, like
Haskell. Applicative functors are to be preferred to monads when the structure
of a computation is fixed a priori. That makes it possible to perform certain
kinds of static analysis on applicative values. We define a notion of free
applicative functor, prove that it satisfies the appropriate laws, and that the
construction is left adjoint to a suitable forgetful functor. We show how free
applicative functors can be used to implement embedded DSLs which can be
statically analysed.Comment: In Proceedings MSFP 2014, arXiv:1406.153
Signatures and Induction Principles for Higher Inductive-Inductive Types
Higher inductive-inductive types (HIITs) generalize inductive types of
dependent type theories in two ways. On the one hand they allow the
simultaneous definition of multiple sorts that can be indexed over each other.
On the other hand they support equality constructors, thus generalizing higher
inductive types of homotopy type theory. Examples that make use of both
features are the Cauchy real numbers and the well-typed syntax of type theory
where conversion rules are given as equality constructors. In this paper we
propose a general definition of HIITs using a small type theory, named the
theory of signatures. A context in this theory encodes a HIIT by listing the
constructors. We also compute notions of induction and recursion for HIITs, by
using variants of syntactic logical relation translations. Building full
categorical semantics and constructing initial algebras is left for future
work. The theory of HIIT signatures was formalised in Agda together with the
syntactic translations. We also provide a Haskell implementation, which takes
signatures as input and outputs translation results as valid Agda code
A Syntax for Higher Inductive-Inductive Types
Higher inductive-inductive types (HIITs) generalise inductive types of dependent type theories in two directions. On the one hand they allow the simultaneous definition of multiple sorts that can be indexed over each other. On the other hand they support equality constructors, thus generalising higher inductive types of homotopy type theory. Examples that make use of both features are the Cauchy reals and the well-typed syntax of type theory where conversion rules are given as equality constructors. In this paper we propose a general definition of HIITs using a domain-specific type theory. A context in this small type theory encodes a HIIT by listing the type formation rules and constructors. The type of the elimination principle and its beta-rules are computed from the context using a variant of the syntactic logical relation translation. We show that for indexed W-types and various examples of HIITs the computed elimination principles are the expected ones. Showing that the thus specified HIITs exist is left as future work. The type theory specifying HIITs was formalised in Agda together with the syntactic translations. A Haskell implementation converts the types of sorts and constructors into valid Agda code which postulates the elimination principles and computation rules
Type theory in type theory using quotient inductive types
We present an internal formalisation of a type heory with dependent types in Type Theory using a special case of higher inductive types from Homotopy Type Theory which we call quotient inductive types (QITs). Our formalisation of type theory avoids referring to preterms or a typability relation but defines directly well typed objects by an inductive definition. We use the elimination principle to define the set-theoretic and logical predicate interpretation. The work has been formalized using the Agda system extended with QITs using postulates
Normalisation by evaluation for type theory, in type theory
We develop normalisation by evaluation (NBE) for dependent types based on presheaf categories. Our construction is formulated in the metalanguage of type theory using quotient inductive types. We use a typed presentation hence there are no preterms or realizers in our construction, and every construction respects the conversion relation. NBE for simple types uses a logical relation between the syntax and the presheaf interpretation. In our construction, we merge the presheaf interpretation and the logical relation into a proof-relevant logical predicate. We prove normalisation, completeness, stability and decidability of definitional equality. Most of the constructions were formalized in Agda
Large and Infinitary Quotient Inductive-Inductive Types
Quotient inductive-inductive types (QIITs) are generalized inductive types
which allow sorts to be indexed over previously declared sorts, and allow usage
of equality constructors. QIITs are especially useful for algebraic
descriptions of type theories and constructive definitions of real, ordinal and
surreal numbers. We develop new metatheory for large QIITs, large elimination,
recursive equations and infinitary constructors. As in prior work, we describe
QIITs using a type theory where each context represents a QIIT signature.
However, in our case the theory of signatures can also describe its own
signature, modulo universe sizes. We bootstrap the model theory of signatures
using self-description and a Church-coded notion of signature, without using
complicated raw syntax or assuming an existing internal QIIT of signatures. We
give semantics to described QIITs by modeling each signature as a finitely
complete CwF (category with families) of algebras. Compared to the case of
finitary QIITs, we additionally need to show invariance under algebra
isomorphisms in the semantics. We do this by modeling signature types as
isofibrations. Finally, we show by a term model construction that every QIIT is
constructible from the syntax of the theory of signatures
Towards a Cubical Type Theory without an Interval
Following the cubical set model of type theory which validates the
univalence axiom, cubical type theories have been developed that
interpret the identity type using an interval pretype. These theories start from a geometric view of equality. A proof of equality is encoded as a term in a context extended by the interval pretype. Our goal is to develop a cubical theory where the identity type is defined recursively over the type structure, and the geometry arises from these definitions. In this theory, cubes are present explicitly, e.g., a line is a telescope with 3 elements: two endpoints and the connecting equality. This is in line with Bernardy and Moulin\u27s earlier work on internal parametricity. In this paper we present a naive syntax for internal parametricity and by replacing the parametric interpretation of the universe, we extend it to univalence. However, we do not know how to compute in this theory. As a second step, we present a version of the theory for parametricity with named dimensions which has an operational semantics. Extending this syntax to univalence is left as further work
Normalisation by evaluation for dependent types
We develop normalisation by evaluation (NBE) for dependent types based on presheaf categories. Our construction is formulated using internal type theory using quotient inductive types. We use a typed presentation hence there are no preterms or realizers in our construction. NBE for simple types is using a logical relation between the syntax and the presheaf interpretation. In our construction, we merge the presheaf interpretation and the logical relation into a proof-relevant logical predicate. We have formalized parts of the construction in Agda
- …