encyclopegia.org

type theory

In mathematical logic, and theoretical computer science, type theory is the study of formal systems that classify expressions or mathematical objects by their types.[src] Roughly speaking, a type plays a similar role to that played by a data type in programming: it specifies what kind of thing an expression is and how it may be used.[src] Type theories are used in the study of programming languages (type systems), formal logic, and the formalization of mathematics.[src] Some type theories have been proposed as alternatives to set theory as a foundation of mathematics.[src] Examples include Alonzo Church's simple theory of types and Per Martin-Löf's intuitionistic type theory.[src] Many proof assistants are based on type theory.[src] For example, the underlying formal language of Rocq (formerly Coq) is the calculus of inductive constructions, while Lean is based on dependent type theory.[src]

In mathematical logic, and theoretical computer science, type theory is the study of formal systems that classify expressions or mathematical objects by their types.[src] Roughly speaking, a type plays a similar role to that played by a data type in programming: it specifies what kind of thing an expression is and how it may be used.[src] Type theories are used in the study of programming languages (type systems), formal logic, and the formalization of mathematics.[src] Some type theories have been proposed as alternatives to set theory as a foundation of mathematics.[src] Examples include Alonzo Church's simple theory of types and Per Martin-Löf's intuitionistic type theory.[src] Many proof assistants are based on type theory.[src] For example, the underlying formal language of Rocq (formerly Coq) is the calculus of inductive constructions, while Lean is based on dependent type theory.[src] x:\mathsf{bool},y:\mathsf{nat}\vdash(\mathrm{if}\,x\,y\,y): \mathsf{nat} If there are no assumptions, there will be nothing to the left of the turnstile.[src] \vdash \mathrm{S}:\mathsf{nat}\to\mathsf{nat} The list of assumptions on the left is the context of the judgment.[src] Capital greek letters, such as \Gamma and \Delta , are common choices to represent some or all of the assumptions.[src] The 4 different judgments are thus usually written as follows.[src] Some textbooks use a triple equal sign \equiv to stress that this is judgmental equality and thus an extrinsic notion of equality.[src] The judgments enforce that every term has a type.[src] The type will restrict which rules can be applied to a term.[src] A type theory's inference rules say what judgments can be made, based on the existence of other judgments.[src] Rules are expressed as a Gentzen-style deduction using a horizontal line, with the required input judgments above the line and the resulting judgment below the line.[src] For example, the following inference rule states a substitution rule for judgmental equality.[src] \begin{array}{c} \Gamma\vdash t:T_1 \qquad \Delta\vdash T_1 = T_2 \\ \hline \Gamma,\Delta\vdash t:T_2 \end{array} The rules are syntactic and work by rewriting.[src] The metavariables , , , , and may actually consist of complex terms and types that contain many function applications, not just single symbols.[src] To generate a particular judgment in type theory, there must be a rule to generate it, as well as rules to generate all of that rule's required inputs, and so on.[src] The applied rules form a proof tree, where the top-most rules need no assumptions.[src] One example of a rule that does not require any inputs is one that states the type of a constant term.[src] For example, to assert that there is a term 0 of type , one would write the following.[src] \begin{array}{c} \hline \vdash 0 : \mathsf{nat} \\ \end{array} \mathrm{add}:\mathsf{nat}\to (\mathsf{nat}\to\mathsf{nat}) Strictly speaking, a simple type only allows for one input and one output, so a more faithful reading of the above type is that \mathrm{add} is a function which takes in a natural number and returns a function of the form .[src] The parentheses clarify that \mathrm{add} does not have the type , which would be a function which takes in a function of natural numbers and returns a natural number.[src] The convention is that the arrow is right associative, so the parentheses may be dropped from 's type.[src] (\lambda x.\mathrm{add}\,x\,x): \mathsf{nat}\to\mathsf{nat} The variable is x and (implicit from the lambda term's type) must have type .[src] The term \mathrm{add}\,x\,x has type , which is seen by applying the function application inference rule twice.[src] Thus, the lambda term has type \mathsf{nat}\to\mathsf{nat} , which means it is a function taking a natural number as an argument and returning a natural number.[src] A lambda term is an anonymous function because it lacks a name.[src] The concept of anonymous functions appears in many programming languages.[src] (\lambda v.[src] t)\,s\rightarrow t[v \colon= s] ( -reduction).[src] (\lambda v.[src] t\, v)\rightarrow t , if v is not a free variable in t ( -reduction).[src] The first reduction describes how to evaluate a lambda term: if a lambda expression (\lambda v .t) is applied to a term , one replaces every occurrence of v in t with .[src] The second reduction makes explicit the relationship between lambda expressions and function types: if (\lambda v.[src] t\, v) is a lambda term, then it must be that t is a function term because it is being applied to .[src] Therefore, the lambda expression is equivalent to just , as both take in one argument and apply t to it.[src] For example, the following term may be \beta -reduced.[src] (\lambda x.\mathrm{add}\,x\,x)\,2\rightarrow \mathrm{add}\,2\,2 In type theories that also establish notions of equality for types and terms, there are corresponding inference rules of \beta -equality and \eta -equality.[src] An identity type requires two terms of the same type and is written with the symbol .[src] For example, if x+1 and 1+x are terms, then x+1=1+x is a possible type.[src] Canonical terms are created with a reflexivity function, .[src] For a term , the call \mathrm{refl}\,t returns the canonical term inhabiting the type .[src] The complexities of equality in type theory make it an active research topic; homotopy type theory is a notable area of research that mainly deals with equality in type theory.[src] Type theory has a built-in notion of computation.[src] Thus, "1+1" and "2" are different terms in type theory, but they compute to the same value.[src] Moreover, functions are defined computationally as lambda terms.[src] In set theory, "1+1=2" means that "1+1" is just another way to refer the value "2".[src] Type theory's computation does require a complicated concept of equality.[src] Set theory encodes numbers as sets.[src] Type theory can encode numbers as functions using Church encoding, or more naturally as inductive types, and the construction closely resembles Peano's axioms.[src] In type theory, proofs have types whereas in set theory, proofs are part of the underlying first-order logic.[src] Proponents of type theory will also point out its connection to constructive mathematics through the BHK interpretation, its connection to logic by the Curry–Howard isomorphism, and its connections to category theory.[src] Summer 2013 lectures including Robert Harper's talks on YouTube Summer 2015 Types, Logic, Semantics, and Verification Andrej Bauer's blog[src]

63 sentences · 63 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"type theory." encyclopegia.org, 2026, https://encyclopegia.org/wiki/type-theory. Accessed 28 November 2026.

Chicago

"type theory." encyclopegia.org. Accessed November 28, 2026. https://encyclopegia.org/wiki/type-theory.

APA

encyclopegia.org. (2026). type theory. Retrieved November 28, 2026, from https://encyclopegia.org/wiki/type-theory

Accessed November 28, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Hybrid Theory

stub · references available

Theory X and Theory Y

stub · references available

Semiotic theory of complexity

stub · references available

architectural theory

stub · references available

blood type

stub · references available

Type 69 tank

stub · references available

inhibition theory

stub · references available

solar-type star

stub · references available
CC BY-SA 4.0 · tier1-factual · https://en.wikipedia.org/w/index.php?oldid=1375730930 · 0.55 · snapshot type-theory-122686-fd61b032aeef19d7 · QID Q1056428

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.