Idea
In type theory, an identity type is a the type of proofs that two terms are equal.
Definition
The identity type (or path type) represents the concept of equality between two terms of the same type. For a type and terms , the type is denoted or . Unlike definitional equality, which is a metatheoretic judgment, the identity type is a type within the theory whose terms represent witnesses of equality.
Perspective
In HoTT, terms of are interpreted as paths from to in the space . This view generalizes the notion of a witness to a path in an -groupoid, where multiple distinct paths may exist between the same points.
Formation
Given a type and two terms of that type, we can form the type of identifications between them.
Introduction
For any term , there is a canonical witness of its equality with itself, representing the constant path.
Elimination (Path Induction)
To prove a property for all paths, it suffices to provide a proof for the case where the path is reflexivity. This requires at least one endpoint to be free.
Computation
The eliminator applied to the reflexivity constructor reduces definitionally to the proof provided for the reflexive case.
Properties
- Symmetry: For , there exists .
- Transitivity: For and , there exists .
- Transport: Given and , there is a map .
- hLevel: An identity type is not necessarily a mere proposition. Its complexity depends on the hLevel of .
Cubical Type Theory
In Cubical Type Theory, the path type is not inductive but defined via a map from an abstract interval :
Here, is the constant map . This formulation provides computational content to the Univalence Principle and function extensionality.