Dependent types I › Forms of judgement describe kinds of construction [01CP]

In a programming language like OCaml or Haskell, there are places in the grammar where you need to place a type, and there are other places where you need to place an element of a particular type. For example, when you write

let square : int -> int =
  fun x -> x * x
in OCaml, you are asserting two things:

  1. You are asserting that the code int -> int describes a type. A theoretician might write this as \mathsf {int}\to \mathsf {int}~\mathit {type}.
  2. Moreover, you are asserting that the code fun x -> x * x describes an element of the type described by int -> int. A theoretician might write this as \lambda x\mathpunct {.}x*x:\mathsf {int}\to \mathsf {int}.

The second assertion only makes sense when the first assertion obtains. Indeed, if I had changed int -> int to a bogus piece of code that does not describe a type, then it would not be meaningful to ask whether some other code describes an “element” of this non-type! That’s because only types can have elements.

Per Martin-Löf came up with some terminology that keeps all of this straight. Inspired by him, we define the following:

Context

Lecture. Dependent types I [01CO]

Backlinks

Lecture. Dependent types I [01CO]

Dependent types I › Formal vs. informal mathematics [01CT]

Related

Person. Per Martin-Löf [https://www.jonmsterling.com/permartinlöf/]