Reference. A simpler encoding of indexed types
In functional programming languages, generalized algebraic data types (GADTs) are very useful as the unnecessary pattern matching over them can be ruled out by the failure of unification of type arguments. In dependent type systems, this is usually called indexed types and it’s particularly useful as the identity type is a special case of it. However, pattern matching over indexed types is very complicated as it requires term unification in general. We study a simplified version of indexed types (called simpler indexed types) where we explicitly specify the selection process of constructors, and we discuss its expressiveness, limitations, and properties.
Cite
Cited by (3)
(Co)condition hits the Path zhang-2024-co
We propose an enhancement to inductive types and records in a dependent type theory, namely (co)conditions. With a primitive interval type, conditions generalize the cubical syntax of higher inductive types in homotopy type theory, while coconditions generalize the cubical path type. (Co)conditions are also useful without an interval type. The duality between conditions and coconditions is presented in an interesting way: The elimination principles of inductive types with conditions can be internalized with records with coconditions and vice versa. However, we do not develop the metatheory of conditions and coconditions in this paper. Instead, we only present the type checking.
Two tricks to trivialize higher-indexed families zhang-2023-two
The conventional general syntax of indexed families in dependent type theories follow the style of “constructors returning a special case”, as in Agda, Lean, Idris, Coq, and probably many other systems. Fording is a method to encode indexed families of this style with index-free inductive types and an identity type. There is another trick that merges interleaved higher inductive-inductive types into a single big family of types. It makes use of a small universe as the index to distinguish the original types. In this paper, we show that these two methods can trivialize some very fancy-looking indexed families with higher inductive indices (which we refer to as higher indexed families).
Elegant elaboration with function invocation zhang-2021-elegant
We present an elegant design of the core language in a dependently-typed lambda calculus with -reduction and an elaboration algorithm.
Cites 31 works (3 here)
With notes (3)
Cubical Agda: A Dependently Typed Programming Language with Univalence and Higher Inductive Types VezzosiMortbergAbel2019
Proof assistants based on dependent type theory provide expressive languages for both programming and proving within the same system. However, all of the major implementations lack powerful extensionality principles for reasoning about equality, such as function and propositional extensionality. These principles are typically added axiomatically which disrupts the constructive properties of these systems. Cubical type theory provides a solution by giving computational meaning to Homotopy Type Theory and Univalent Foundations, in particular to the univalence axiom and higher inductive types. This paper describes an extension of the dependently typed functional programming language Agda with cubical primitives, making it into a full-blown proof assistant with native support for univalence and a general schema of higher inductive types. These new primitives make function and propositional extensionality as well as quotient types directly definable with computational content. Additionally, thanks also to copatterns, bisimilarity is equivalent to equality for coinductive types. This extends Agda with support for a wide range of extensionality principles, without sacrificing type checking and constructivity.
Type-and-scope safe programs and their proofs allais-2017-type
External (28)
- The Aya Proof Assistant (software) (2021)
- Cubical Agda: A Dependently Typed Programming Language with Univalence and Higher Inductive Types (preprint) (2020)
- Higher inductive types in cubical computational type theory (2019)
- Elaborating Dependent (Co)Pattern Matching (2018)
- History of the notation for substitution (MathOverflow) (2018)
- Vectors are records, too (2018)
- Unifiers as equivalences: proof-relevant unification of dependently typed data (2016)
- Programming with ornaments (2016)
- Cubical Type Theory: A Constructive Interpretation of the Univalence Axiom (2015)
- The Arend Proof Assistant (software) (2015)
- Overlapping and Order-Independent Patterns (2014)
- Pattern matching without K (2014)
- Transporting functions across ornaments (2014)
- Idris, a general-purpose dependently typed programming language: Design and implementation (2013)
- The gentle art of levitation (2010)
- Inductive-Inductive Definitions (2010)
- Dependently typed programming in Agda (2009)
- Meta-programming With Built-in Type Equality (2008)
- Simple unification-based type inference for GADTs (2006)
- Eliminating Dependent Pattern Matching (2006)
- Inductive Families Need Not Store Their Indices (2004)
- Guarded recursive datatype constructors (2003)
- First-Class Phantom Types (2003)
- A general formulation of simultaneous inductive-recursive definitions in type theory (2000)
- Indexed types (1997)
- Silly Type Families (draft) (1994)
- Pattern matching with dependent types (1992)
- An intuitionistic theory of types: predicative part (1975)