Homotopy Type Theory
definitional equality


Definitional equality, or judgmental equality, is a metatheoretic relation between terms and types in type theories. In contrast with the identity type, which is a type a=ba=b inside the theory whose inhabitants are witnesses? that aa and bb are the same, or “identifications” of aa with bb, judgmental equality is a judgment? aba\equiv b that (traditionally, at least) does not come with witnesses.

A distinguishing feature of judgmental equality is that it “controls type-checking”, e.g. if a:Aa:A, and ABA\equiv B are judgmentally equal types, then also a:Ba:B. By contrast, if only p:A=Bp:A=B, then instead of a:Ba:B we have p *(a):Bp_*(a):B1.


We present some references/motivations for the notion of definitional equality and for the rule that a:B follows from a:A and A = B.

The notion of definitional equality was introduced first in AUTOMATH?. The following paper presents a suggestive explanation of this notion and how proof-checking was designed in this system (especially section 10):

On the roles of types in mathematics

The notion of definitional equality was later introduced by Per Martin-Löf, first in the context of normalization proofs for higher-order logic in the paper Hauptsatz for Intuitionistic Simple Type Theory and generalized in Type Theory. He discusses this notion in the paper About Models for Intuitionistic Type Theory and The notion of Definitional Equality.

The extension from AUTOMATH is that one adds the notion of data type (natural number), of constructors (zero and successor) and primitive recursion as definitional equality. The motivation is that one can consider the schema of primitive recursion as a definition of a function.

This was also influenced by natural deduction, where constructors correspond to introduction rules and the work of Gödel on system T.

With this extension, one obtains a programming language with dependent types and where computations correspond to unfolding of definitions (that can be primitive recursive definitions). This programming language has the feature that all computations terminate. This has been also considered in functional programming, see e.g. the discussion in this paper.

A description of the evaluation algorithm using techniques from functional programming can be found in this work of Gregoire and Leroy.

  1. The HoTT book, lemma 2.3.1: “(Transport). Suppose that PP is a type family over AA and that p:x= Ayp\,:\,x =_A y. Then there is a function p *:P(x)P(y)p_*\,:\,P(x) \rightarrow P(y).”

Revised on May 21, 2014 07:37:06 by Mike Shulman (