# Intuitionistic type theory

Last updated

Intuitionistic type theory (also known as constructive type theory, or Martin-Löf type theory) is a type theory and an alternative foundation of mathematics. Intuitionistic type theory was created by Per Martin-Löf, a Swedish mathematician and philosopher, who first published it in 1972. There are multiple versions of the type theory: Martin-Löf proposed both intensional and extensional variants of the theory and early impredicative versions, shown to be inconsistent by Girard's paradox, gave way to predicative versions. However, all versions keep the core design of constructive logic using dependent types.

## Design

Martin-Löf designed the type theory on the principles of mathematical constructivism. Constructivism requires any existence proof to contain a "witness". So, any proof of "there exists a prime greater than 1000" must identify a specific number that is both prime and greater than 1000. Intuitionistic type theory accomplished this design goal by internalizing the BHK interpretation. An interesting consequence is that proofs become mathematical objects that can be examined, compared, and manipulated.

Intuitionistic type theory's type constructors were built to follow a one-to-one correspondence with logical connectives. For example, the logical connective called implication (${\displaystyle A\implies B}$) corresponds to the type of a function (${\displaystyle A\to B}$). This correspondence is called the Curry–Howard isomorphism. Previous type theories had also followed this isomorphism, but Martin-Löf's was the first to extend it to predicate logic by introducing dependent types.

## Type theory

Intuitionistic type theory has 3 finite types, which are then composed using 5 different type constructors. Unlike set theories, type theories are not built on top of a logic like Frege's. So, each feature of the type theory does double duty as a feature of both math and logic.

If you are unfamiliar with type theory and know set theory, a quick summary is: Types contain terms just like sets contain elements. Terms belong to one and only one type. Terms like ${\displaystyle 2+2}$ and ${\displaystyle 2\cdot 2}$ compute ("reduce") down to canonical terms like 4. For more, see the article on Type theory.

### 0 type, 1 type and 2 type

There are 3 finite types: The 0 type contains 0 terms. The 1 type contains 1 canonical term. And the 2 type contains 2 canonical terms.

Because the 0 type contains 0 terms, it is also called the empty type. It is used to represent anything that cannot exist. It is also written ${\displaystyle \bot }$ and represents anything unprovable. (That is, a proof of it cannot exist.) As a result, negation is defined as a function to it: ${\displaystyle \neg A:=A\to \bot }$.

Likewise, the 1 type contains 1 canonical term and represents existence. It also is called the unit type. It often represents propositions that can be proven and is, therefore, sometimes written ${\displaystyle \top }$.

Finally, the 2 type contains 2 canonical terms. It represents a definite choice between two values. It is used for Boolean values but not propositions. Propositions are considered the 1 type and may be proven to never have a proof (the 0 type), or may not be proven either way. (The Law of Excluded Middle does not hold for propositions in intuitionistic type theory.)

### Σ type constructor

Σ-types contain ordered pairs. As with typical ordered pair (or 2-tuple) types, a Σ-type can describe the Cartesian product, ${\displaystyle A\times B}$, of two other types, ${\displaystyle A}$ and ${\displaystyle B}$. Logically, such an ordered pair would hold a proof of ${\displaystyle A}$ and a proof of ${\displaystyle B}$, so one may see such a type written as ${\displaystyle A\wedge B}$.

Σ-types are more powerful than typical ordered pair types because of dependent typing. In the ordered pair, the type of the second term can depend on the value of the first term. For example, the first term of the pair might be a natural number and the second term's type might be a vector of length equal to the first term. Such a type would be written:

${\displaystyle \sum _{n{\mathbin {:}}{\mathbb {N} }}\operatorname {Vec} ({\mathbb {R} },n)}$

Using set-theory terminology, this is similar to an indexed disjoint unions of sets. In the case of usual ordered pairs, the type of the second term does not depend on the value of the first term. Thus the type describing the cartesian product ${\displaystyle {\mathbb {N} }\times {\mathbb {R} }}$ is written:

${\displaystyle \sum _{n{\mathbin {:}}{\mathbb {N} }}{\mathbb {R} }}$

It is important to note here that the value of the first term, ${\displaystyle n}$, is not depended on by the type of the second term, ${\displaystyle {\mathbb {R} }}$.

Obviously, Σ-types can be used to build up longer dependently-typed tuples used in mathematics and the records or structs used in most programming languages. An example of a dependently-typed 3-tuple is two integers and a proof that the first integer is smaller than the second integer, described by the type:

${\displaystyle \sum _{m{\mathbin {:}}{\mathbb {Z} }}{\sum _{n{\mathbin {:}}{\mathbb {Z} }}((m

Dependent typing allows Σ-types to serve the role of existential quantifier. The statement "there exists an ${\displaystyle n}$ of type ${\displaystyle {\mathbb {N} }}$, such that ${\displaystyle P(n)}$ is proven" becomes the type of ordered pairs where the first item is the value ${\displaystyle n}$ of type ${\displaystyle {\mathbb {N} }}$ and the second item is a proof of ${\displaystyle P(n)}$. Notice that the type of the second item (proofs of ${\displaystyle P(n)}$) depends on the value in the first part of the ordered pair (${\displaystyle n}$). Its type would be:

${\displaystyle \sum _{n{\mathbin {:}}{\mathbb {N} }}P(n)}$

### Π type constructor

Π-types contain functions. As with typical function types, they consist of an input type and an output type. They are more powerful than typical function types however, in that the return type can depend on the input value. Functions in type theory are different from set theory. In set theory, you look up the argument's value in a set of ordered pairs. In type theory, the argument is substituted into a term and then computation ("reduction") is applied to the term.

As an example, the type of a function that, given a natural number ${\displaystyle n}$, returns a vector containing ${\displaystyle n}$ real numbers is written:

${\displaystyle \prod _{n{\mathbin {:}}{\mathbb {N} }}\operatorname {Vec} ({\mathbb {R} },n)}$

When the output type does not depend on the input value, the function type is often simply written with a ${\displaystyle \to }$. Thus, ${\displaystyle {\mathbb {N} }\to {\mathbb {R} }}$ is the type of functions from natural numbers to real numbers. Such Π-types correspond to logical implication. The logical proposition ${\displaystyle A\implies B}$ corresponds to the type ${\displaystyle A\to B}$, containing functions that take proofs-of-A and return proofs-of-B. This type could be written more consistently as:

${\displaystyle \prod _{a{\mathbin {:}}A}B}$

Π-types are also used in logic for universal quantification. The statement "for every ${\displaystyle n}$ of type ${\displaystyle {\mathbb {N} }}$, ${\displaystyle P(n)}$ is proven" becomes a function from ${\displaystyle n}$ of type ${\displaystyle {\mathbb {N} }}$ to proofs of ${\displaystyle P(n)}$. Thus, given the value for ${\displaystyle n}$ the function generates a proof that ${\displaystyle P()}$ holds for that value. The type would be

${\displaystyle \prod _{n{\mathbin {:}}{\mathbb {N} }}P(n)}$

### = type constructor

=-types are created from two terms. Given two terms like ${\displaystyle 2+2}$ and ${\displaystyle 2\cdot 2}$, you can create a new type ${\displaystyle 2+2=2\cdot 2}$. The terms of that new type represent proofs that the pair reduce to the same canonical term. Thus, since both ${\displaystyle 2+2}$ and ${\displaystyle 2\cdot 2}$ compute to the canonical term ${\displaystyle 4}$, there will be a term of the type ${\displaystyle 2+2=2\cdot 2}$. In intuitionistic type theory, there is a single way to make terms of =-types and that is by reflexivity:

${\displaystyle \operatorname {refl} {\mathbin {:}}\prod _{a{\mathbin {:}}A}(a=a).}$

It is possible to create =-types such as ${\displaystyle 1=2}$ where the terms do not reduce to the same canonical term, but you will be unable to create terms of that new type. In fact, if you were able to create a term of ${\displaystyle 1=2}$, you could create a term of ${\displaystyle \bot }$. Putting that into a function would generate a function of type ${\displaystyle 1=2\implies \bot }$. Since ${\displaystyle \ldots \implies \bot }$ is how intuitionistic type theory defines negation, you would have ${\displaystyle \neg (1=2)}$ or, finally, ${\displaystyle 1\neq 2}$.

Equality of proofs is an area of active research in proof theory and has led to the development of homotopy type theory and other type theories.

### Inductive types

Inductive types allow the creation of complex, self-referential types. For example, a linked list of natural numbers is either an empty list or a pair of a natural number and another linked list. Inductive types can be used to define unbounded mathematical structures like trees, graphs, etc.. In fact, the natural numbers type may be defined as an inductive type, either being ${\displaystyle 0}$ or the successor of another natural number.

Inductive types define new constants, such as zero ${\displaystyle 0{\mathbin {:}}{\mathbb {N} }}$ and the successor function ${\displaystyle S{\mathbin {:}}{\mathbb {N} }\to {\mathbb {N} }}$. Since ${\displaystyle S}$ does not have a definition and cannot be evaluated using substitution, terms like ${\displaystyle S0}$ and ${\displaystyle SSS0}$ become the canonical terms of the natural numbers.

Proofs on inductive types are made possible by induction. Each new inductive type comes with its own inductive rule. To prove a predicate ${\displaystyle P()}$ for every natural number, you use the following rule:

${\displaystyle {\operatorname {{\mathbb {N} }-elim} }\,{\mathbin {:}}P(0)\,\to \left(\prod _{n{\mathbin {:}}{\mathbb {N} }}P(n)\to P(S(n))\right)\to \prod _{n{\mathbin {:}}{\mathbb {N} }}P(n)}$

Inductive types in intuitionistic type theory are defined in terms of W-types, the type of well-founded trees. Later work in type theory generated coinductive types, induction-recursion, and induction-induction for working on types with more obscure kinds of self-referentiality. Higher inductive types allow equality to be defined between terms.

### Universe types

The universe types allow proofs to be written about all the types created with the other type constructors. Every term in the universe type ${\displaystyle {\mathcal {U}}_{0}}$ can be mapped to a type created with any combination of ${\displaystyle 0,1,2,\Sigma ,\Pi ,=,}$ and the inductive type constructor. However, to avoid paradoxes, there is no term in ${\displaystyle {\mathcal {U}}_{0}}$ that maps to ${\displaystyle {\mathcal {U}}_{0}}$.

To write proofs about all "the small types" and ${\displaystyle {\mathcal {U}}_{0}}$, you must use ${\displaystyle {\mathcal {U}}_{1}}$, which does contain a term for ${\displaystyle {\mathcal {U}}_{0}}$, but not for itself ${\displaystyle {\mathcal {U}}_{1}}$. Similarly, for ${\displaystyle {\mathcal {U}}_{2}}$. There is a predicative hierarchy of universes, so to quantify a proof over any fixed constant ${\displaystyle k}$ universes, you can use ${\displaystyle {\mathcal {U}}_{k+1}}$.

Universe types are a tricky feature of type theories. Martin-Löf's original type theory had to be changed to account for Girard's paradox. Later research covered topics such as "super universes", "Mahlo universes", and impredicative universes.

## Judgements

The formal definition of intuitionistic type theory is written using judgements. For example, in the statement "if ${\displaystyle A}$ is a type and ${\displaystyle B}$ is a type then ${\displaystyle \textstyle \sum _{a:A}B}$ is a type" there are judgements of "is a type", "and", and "if ... then ...". The expression ${\displaystyle \textstyle \sum _{a:A}B}$ is not a judgement; it is the type being defined.

This second level of the type theory can be confusing, particularly where it comes to equality. There is a judgement of term equality, which might say ${\displaystyle 4=2+2}$. It is a statement that two terms reduce to the same canonical term. There is also a judgement of type equality, say that ${\displaystyle A=B}$, which means every element of ${\displaystyle A}$ is an element of the type ${\displaystyle B}$ and vice versa. At the type level, there is a type ${\displaystyle 4=2+2}$ and it contains terms if there is a proof that ${\displaystyle 4}$ and ${\displaystyle 2+2}$ reduce to the same value. (Obviously, terms of this type are generated using the term-equality judgement.) Lastly, there is an English-language level of equality, because we use the word "four" and symbol "${\displaystyle 4}$" to refer to the canonical term ${\displaystyle SSSS0}$. Synonyms like these are called "definitionally equal" by Martin-Löf.

The description of judgements below is based on the discussion in Nordström, Petersson, and Smith.

The formal theory works with types and objects.

A type is declared by:

• ${\displaystyle A\ {\mathsf {Type}}}$

An object exists and is in a type if:

• ${\displaystyle a{\mathbin {:}}A}$

Objects can be equal

• ${\displaystyle a=b}$

and types can be equal

• ${\displaystyle A=B}$

A type that depends on an object from another type is declared

• ${\displaystyle (x{\mathbin {:}}A)B}$

and removed by substitution

• ${\displaystyle B[x/a]}$, replacing the variable ${\displaystyle x}$ with the object ${\displaystyle a}$ in ${\displaystyle B}$.

An object that depends on an object from another type can be done two ways. If the object is "abstracted", then it is written

• ${\displaystyle [x]b}$

and removed by substitution

• ${\displaystyle b[x/a]}$, replacing the variable ${\displaystyle x}$ with the object ${\displaystyle a}$ in ${\displaystyle b}$.

The object-depending-on-object can also be declared as a constant as part of a recursive type. An example of a recursive type is:

• ${\displaystyle 0{\mathbin {:}}\mathbb {N} }$
• ${\displaystyle S{\mathbin {:}}\mathbb {N} \to \mathbb {N} }$

Here, ${\displaystyle S}$ is a constant object-depending-on-object. It is not associated with an abstraction. Constants like ${\displaystyle S}$ can be removed by defining equality. Here the relationship with addition is defined using equality and using pattern matching to handle the recursive aspect of ${\displaystyle S}$:

{\displaystyle {\begin{aligned}\operatorname {add} &{\mathbin {:}}\ (\mathbb {N} \times \mathbb {N} )\to \mathbb {N} \\\operatorname {add} (0,b)&=b\\\operatorname {add} (S(a),b)&=S(\operatorname {add} (a,b)))\end{aligned}}}

${\displaystyle S}$ is manipulated as an opaque constant - it has no internal structure for substitution.

So, objects and types and these relations are used to express formulae in the theory. The following styles of judgements are used to create new objects, types and relations from existing ones:

 ${\displaystyle \Gamma \vdash \sigma \ {\mathsf {Type}}}$ σ is a well-formed type in the context Γ. ${\displaystyle \Gamma \vdash t{\mathbin {:}}\sigma }$ t is a well-formed term of type σ in context Γ. ${\displaystyle \Gamma \vdash \sigma \equiv \tau }$ σ and τ are equal types in context Γ. ${\displaystyle \Gamma \vdash t\equiv u{\mathbin {:}}\sigma }$ t and u are judgmentally equal terms of type σ in context Γ. ${\displaystyle \vdash \Gamma \ {\mathsf {Context}}}$ Γ is a well-formed context of typing assumptions.

By convention, there is a type that represents all other types. It is called ${\displaystyle {\mathcal {U}}}$ (or ${\displaystyle \operatorname {Set} }$). Since ${\displaystyle {\mathcal {U}}}$ is a type, the members of it are objects. There is a dependent type ${\displaystyle \operatorname {El} }$ that maps each object to its corresponding type. In most texts ${\displaystyle \operatorname {El} }$ is never written. From the context of the statement, a reader can almost always tell whether ${\displaystyle A}$ refers to a type, or whether it refers to the object in ${\displaystyle {\mathcal {U}}}$ that corresponds to the type.

This is the complete foundation of the theory. Everything else is derived.

To implement logic, each proposition is given its own type. The objects in those types represent the different possible ways to prove the proposition. Obviously, if there is no proof for the proposition, then the type has no objects in it. Operators like "and" and "or" that work on propositions introduce new types and new objects. So ${\displaystyle A\times B}$ is a type that depends on the type ${\displaystyle A}$ and the type ${\displaystyle B}$. The objects in that dependent type are defined to exist for every pair of objects in ${\displaystyle A}$ and ${\displaystyle B}$. Obviously, if ${\displaystyle A}$ or ${\displaystyle B}$ has no proof and is an empty type, then the new type representing ${\displaystyle A\times B}$ is also empty.

This can be done for other types (booleans, natural numbers, etc.) and their operators.

## Categorical models of type theory

Using the language of category theory, R. A. G. Seely introduced the notion of a locally cartesian closed category (LCCC) as the basic model of type theory. This has been refined by Hofmann and Dybjer to Categories with Families or Categories with Attributes based on earlier work by Cartmell. [1]

A category with families is a category C of contexts (in which the objects are contexts, and the context morphisms are substitutions), together with a functor T : CopFam(Set).

Fam(Set) is the category of families of Sets, in which objects are pairs ${\displaystyle (A,B)}$ of an "index set" A and a function B: XA, and morphisms are pairs of functions f : AA' and g : XX' , such that B' °g = f°B in other words, f maps Ba to Bg(a).

The functor T assigns to a context G a set ${\displaystyle Ty(G)}$ of types, and for each ${\displaystyle A:Ty(G)}$, a set ${\displaystyle Tm(G,A)}$ of terms. The axioms for a functor require that these play harmoniously with substitution. Substitution is usually written in the form Af or af, where A is a type in ${\displaystyle Ty(G)}$ and a is a term in ${\displaystyle Tm(G,A)}$, and f is a substitution from D to G. Here ${\displaystyle Af:Ty(D)}$ and ${\displaystyle af:Tm(D,Af)}$.

The category C must contain a terminal object (the empty context), and a final object for a form of product called comprehension, or context extension, in which the right element is a type in the context of the left element. If G is a context, and ${\displaystyle A:Ty(G)}$, then there should be an object ${\displaystyle (G,A)}$ final among contexts D with mappings p : DG, q : Tm(D,Ap).

A logical framework, such as Martin-Löf's takes the form of closure conditions on the context dependent sets of types and terms: that there should be a type called Set, and for each set a type, that the types should be closed under forms of dependent sum and product, and so forth.

A theory such as that of predicative set theory expresses closure conditions on the types of sets and their elements: that they should be closed under operations that reflect dependent sum and product, and under various forms of inductive definition.

## Extensional versus intensional

A fundamental distinction is extensional vs intensional type theory. In extensional type theory definitional (i.e., computational) equality is not distinguished from propositional equality, which requires proof. As a consequence type checking becomes undecidable in extensional type theory because programs in the theory might not terminate. For example, such a theory allows one to give a type to the Y-combinator, a detailed example of this can be found in Nordstöm and Petersson Programming in Martin-Löf's Type Theory. [2] However, this doesn't prevent extensional type theory from being a basis for a practical tool, for example, NuPRL is based on extensional type theory.

In contrast in intensional type theory type checking is decidable, but the representation of standard mathematical concepts is somewhat more cumbersome, since intensional reasoning requires using setoids or similar constructions. There are many common mathematical objects, which are hard to work with or can't be represented without this, for example, integer numbers, rational numbers, and real numbers. Integers and rational numbers can be represented without setoids, but this representation isn't easy to work with. Cauchy real numbers can't be represented without this. [3]

Homotopy type theory works on resolving this problem. It allows one to define higher inductive types, which not only define first order constructors (values or points), but higher order constructors, i.e. equalities between elements (paths), equalities between equalities (homotopies), ad infinitum.

## Implementations of type theory

Different forms of type theory have been implemented as the formal systems underlying of a number of proof assistants. While many are based on Per Martin-Löf's ideas, many have added features, more axioms, or different philosophical background. For instance, the NuPRL system is based on computational type theory [4] and Coq is based on the calculus of (co)inductive constructions. Dependent types also feature in the design of programming languages such as ATS, Cayenne, Epigram, Agda, [5] and Idris. [6]

## Martin-Löf type theories

Per Martin-Löf constructed several type theories that were published at various times, some of them much later than the preprints with their description became accessible to the specialists (among others Jean-Yves Girard and Giovanni Sambin). The list below attempts to list all the theories that have been described in a printed form and to sketch the key features that distinguished them from each other. All of these theories had dependent products, dependent sums, disjoint unions, finite types and natural numbers. All the theories had the same reduction rules that did not include η-reduction either for dependent products or for dependent sums, except for MLTT79 where the η-reduction for dependent products is added.

MLTT71 was the first of type theories created by Per Martin-Löf. It appeared in a preprint in 1971. It had one universe but this universe had a name in itself, i.e. it was a type theory with, as it is called today, "Type in Type". Jean-Yves Girard has shown that this system was inconsistent and the preprint was never published.

MLTT72 was presented in a 1972 preprint that has now been published. [7] That theory had one universe V and no identity types [ definition needed ]. The universe was "predicative" in the sense that the dependent product of a family of objects from V over an object that was not in V such as, for example, V itself, was not assumed to be in V. The universe was à la Russell, i.e., one would write directly "T∈V" and "t∈T" (Martin-Löf uses the sign "∈" instead of modern ":") without the additional constructor such as "El".

MLTT73 was the first definition of a type theory that Per Martin-Löf published (it was presented at the Logic Colloquium 73 and published in 1975 [8] ). There are identity types which he calls "propositions" but since no real distinction between propositions and the rest of the types is introduced the meaning of this is unclear. There is what later acquires the name of J-eliminator but yet without a name (see pp. 94–95). There is in this theory an infinite sequence of universes V0, ..., Vn, .... The universes are predicative, a-la Russell and non-cumulative! In fact, Corollary 3.10 on p. 115 says that if A∈Vm and B∈Vn are such that A and B are convertible then m=n. This means, for example, that it would be difficult to formulate univalence in this theory—there are contractible types in each of the Vi but it is unclear how to declare them to be equal since there are no identity types connecting Vi and Vj for ij.

MLTT79 was presented in 1979 and published in 1982. [9] In this paper, Martin-Löf introduced the four basic types of judgement for the dependent type theory that has since become fundamental in the study of the meta-theory of such systems. He also introduced contexts as a separate concept in it (see p. 161). There are identity types with the J-eliminator (which already appeared in MLTT73 but did not have this name there) but also with the rule that makes the theory "extensional" (p. 169). There are W-types. There is an infinite sequence of predicative universes that are cumulative.

Bibliopolis: there is a discussion of a type theory in the Bibliopolis book from 1984 [10] but it is somewhat open-ended and does not seem to represent a particular set of choices and so there is no specific type theory associated with it.

## Notes

1. Clairambault, Pierre; Dybjer, Peter (2014). "The biequivalence of locally cartesian closed categories and Martin-Löf type theories". Mathematical Structures in Computer Science. 24 (6). arXiv:. doi:10.1017/S0960129513000881. ISSN   0960-1295.
2. Bengt Nordström; Kent Petersson; Jan M. Smith (1990). Programming in Martin-Löf's Type Theory. Oxford University Press, p. 90.
3. Altenkirch, Thorsten, Thomas Anberrée, and Nuo Li. "Definable Quotients in Type Theory."
4. Allen, S.F.; Bickford, M.; Constable, R.L.; Eaton, R.; Kreitz, C.; Lorigo, L.; Moran, E. (2006). "Innovations in computational type theory using Nuprl". Journal of Applied Logic. 4 (4): 428–469. doi:.
5. Norell, Ulf (2009). Dependently Typed Programming in Agda. Proceedings of the 4th International Workshop on Types in Language Design and Implementation. TLDI '09. New York, NY, USA: ACM. pp. 1–2. CiteSeerX  . doi:10.1145/1481861.1481862. ISBN   9781605584201.
6. Brady, Edwin (2013). "Idris, a general-purpose dependently typed programming language: Design and implementation". Journal of Functional Programming. 23 (5): 552–593. doi:10.1017/S095679681300018X. ISSN   0956-7968.
7. Per Martin-Löf, An intuitionistic theory of types, Twenty-five years of constructive type theory (Venice,1995), Oxford Logic Guides, v. 36, pp. 127--172, Oxford Univ. Press, New York, 1998
8. Per Martin-Löf, An intuitionistic theory of types: predicative part, Logic Colloquium '73 (Bristol, 1973), 73--118. Studies in Logic and the Foundations of Mathematics, Vol. 80, North-Holland, Amsterdam,1975
9. Per Martin-Löf, Constructive mathematics and computer programming, Logic, methodology and philosophy of science, VI (Hannover, 1979), Stud. Logic Found. Math., v. 104, pp. 153--175, North-Holland, Amsterdam, 1982
10. Per Martin-Löf, Intuitionistic type theory, Studies in Proof Theory. Lecture Notes, v. 1, Notes by Giovanni Sambin, pp. iv+91, 1984

## Related Research Articles

Propositional calculus is a branch of logic. It is also called propositional logic, statement logic, sentential calculus, sentential logic, or sometimes zeroth-order logic. It deals with propositions and relations between propositions, including the construction of arguments based on them. Compound propositions are formed by connecting propositions by logical connectives. Propositions that contain no logical connectives are called atomic propositions.

In the philosophy of mathematics, constructivism asserts that it is necessary to find a mathematical object to prove that it exists. In classical mathematics, one can prove the existence of a mathematical object without "finding" that object explicitly, by assuming its non-existence and then deriving a contradiction from that assumption. Such a proof by contradiction might be called non-constructive, and a constructivist might reject it. The constructive viewpoint involves a verificational interpretation of the existential quantifier, which is at odds with its classical interpretation.

In mathematics, logic, and computer science, a type system is a formal system in which every term has a "type" which defines its meaning and the operations that may be performed on it. Type theory is the academic study of type systems.

In logic and proof theory, natural deduction is a kind of proof calculus in which logical reasoning is expressed by inference rules closely related to the "natural" way of reasoning. This contrasts with Hilbert-style systems, which instead use axioms as much as possible to express the logical laws of deductive reasoning.

Proof theory is a major branch of mathematical logic that represents proofs as formal mathematical objects, facilitating their analysis by mathematical techniques. Proofs are typically presented as inductively-defined data structures such as plain lists, boxed lists, or trees, which are constructed according to the axioms and rules of inference of the logical system. As such, proof theory is syntactic in nature, in contrast to model theory, which is semantic in nature.

In programming language theory and proof theory, the Curry–Howard correspondence is the direct relationship between computer programs and mathematical proofs.

In mathematical logic and computer science, the calculus of constructions (CoC) is a type theory created by Thierry Coquand. It can serve as both a typed programming language and as constructive foundation for mathematics. For this second reason, the CoC and its variants have been the basis for Coq and other proof assistants.

System F, also known as the (Girard–Reynolds) polymorphic lambda calculus or the second-order lambda calculus, is a typed lambda calculus that differs from the simply typed lambda calculus by the introduction of a mechanism of universal quantification over types. System F thus formalizes the notion of parametric polymorphism in programming languages, and forms a theoretical basis for languages such as Haskell and ML. System F was discovered independently by logician Jean-Yves Girard (1972) and computer scientist John C. Reynolds (1974).

In logic, a logical framework provides a means to define a logic as a signature in a higher-order type theory in such a way that provability of a formula in the original logic reduces to a type inhabitation problem in the framework type theory. This approach has been used successfully for (interactive) automated theorem proving. The first logical framework was Automath; however, the name of the idea comes from the more widely known Edinburgh Logical Framework, LF. Several more recent proof tools like Isabelle are based on this idea. Unlike a direct embedding, the logical framework approach allows many logics to be embedded in the same type system.

In category theory, a natural numbers object (NNO) is an object endowed with a recursive structure similar to natural numbers. More precisely, in a category E with a terminal object 1, an NNO N is given by:

1. a global element z : 1 → N, and
2. an arrow s : NN,

In mathematical logic, the disjunction and existence properties are the "hallmarks" of constructive theories such as Heyting arithmetic and constructive set theories (Rathjen 2005).

In computer science and logic, a dependent type is a type whose definition depends on a value. It is an overlapping feature of type theory and type systems. In intuitionistic type theory, dependent types are used to encode logic's quantifiers like "for all" and "there exists". In functional programming languages like Agda, ATS, Coq, F*, Epigram, and Idris, dependent types may help reduce bugs by enabling the programmer to assign types that further restrain the set of possible implementations.

The simply typed lambda calculus, a form of type theory, is a typed interpretation of the lambda calculus with only one type constructor that builds function types. It is the canonical and simplest example of a typed lambda calculus. The simply typed lambda calculus was originally introduced by Alonzo Church in 1940 as an attempt to avoid paradoxical uses of the untyped lambda calculus, and it exhibits many desirable and interesting properties.

In universal algebra and in model theory, a structure consists of a set along with a collection of finitary operations and relations that are defined on it.

Constructive set theory is an approach to mathematical constructivism following the program of axiomatic set theory. The same first-order language with "" and "" of classical set theory is usually used, so this is not to be confused with a constructive types approach. On the other hand, some constructive theories are indeed motivated by their interpretability in type theories.

An interpretation is an assignment of meaning to the symbols of a formal language. Many formal languages used in mathematics, logic, and theoretical computer science are defined in solely syntactic terms, and as such do not have any meaning until they are given some interpretation. The general study of interpretations of formal languages is called formal semantics.

In proof theory, ordinal analysis assigns ordinals to mathematical theories as a measure of their strength. If theories have the same proof-theoretic ordinal they are often equiconsistent, and if one theory has a larger proof-theoretic ordinal than another it can often prove the consistency of the second theory.

In type theory, a system has inductive types if it has facilities for creating a new type from constants and functions that create terms of that type. The feature serves a role similar to data structures in a programming language and allows a type theory to add concepts like numbers, relations, and trees. As the name suggests, inductive types can be self-referential, but usually only in a way that permits structural recursion.

In mathematical logic and computer science, homotopy type theory refers to various lines of development of intuitionistic type theory, based on the interpretation of types as objects to which the intuition of (abstract) homotopy theory applies.

In intuitionistic type theory (ITT), a discipline within mathematical logic, induction-recursion is a feature for simultaneously declaring a type and function on that type. It allows the creation of larger types, such as universes, than inductive types. The types created still remain predicative inside ITT.