Dependent types I › Judgemental structure of dependent types [01CV]
- August 11, 2025
- Jon Sterling
Dependent type theory has two main forms of judgement: describing types and describing elements of a given type.
Form of judgement Describing a type [01CW]
- August 11, 2025
- Jon Sterling
We will write A~\mathit {type} for the judgement that A describes a type.
When we have assumed or presupposed A~\mathit {type}, we will also write A for the type so-described, so we may avoid the wordy phrase “the type described by A”.
Form of judgement Describing an element of a type [01CX]
- August 11, 2025
- Jon Sterling
Presupposing A~\mathit {type}, we will write u:A for the judgement that u describes an element of the type A.
Judgemental equality [01CY]
- August 11, 2025
- Jon Sterling
For both basic forms of judgement, there is an auxiliary form of judgement governing equality.
- Presupposing A~\mathit {type} and B~\mathit {type}, we will write A\equiv B~\mathit {type} for the judgement that A and B are the same description of a type.
- Presupposing A~\mathit {type} and u:A and v:A, we will write u\equiv v:A for the judgement that u and v are the same description of an element of type A.
(Look at the presuppositions carefully: it does not make sense to speak of two elements being equal unless they are elements of the same type!)
Judgemental equality has the following property: if two things are equal, then we are justified in replacing one by the other at any time.
Parameterised and hypothetical judgements [01D3]
- August 11, 2025
- Jon Sterling
Sometimes we will describe a family of judgements by writing a judgement with a placeholder or a parameter in it. In this case we may wish to speak of the judgement holding for all instantiations of this parameter; for example, to describe the body of a function \mathsf {int}\to \mathsf {string} in OCaml we must parameterise a term u[x]:\mathsf {string} in a variable x:\mathsf {int} to obtain the function \lambda {x}\mathpunct {.}u[x]:\mathsf {int}\to \mathsf {string}. The judgement that u[x] describes a string assuming x describes an integer is called a hypothetical judgement, and it is written x:\mathsf {int}\vdash u[x]:\mathsf {string}.
Many formal presentations of type theory make explicit the context \Gamma of parameters that are in scope. This is a perfectly valid, but one of the overarching principles of type theory is that all constructs are arranged so as to be invariant under substitution of paramters; the up-shot is that we can allow the ambient parameters to be implicit, explicitly introducing scopes only when we wish to bind a new parameter.