Definition - “there exists”

A dependent pair type is the “pair” analogue of a dependent function type: the type of pairs where the type of the second component depends on the first component.

Given a type and a type family we construct a type of dependent pair:

A term consists of

  • a first component
  • a second component

so it is a pair where the second entry’s type is allowed to depend on the first.

if is constant then

Projections

if , then

Example

let be and be the type “vectors of length n”, then: is the type of “a length together with a vector of that length” an example term would be

Example: Magma

We often use dependent pair types to define types of mathematical structures

this means the type of magmas is a pair where is a binary operation and has type

Further example: axiom of choice

read as

if for all x : A there is a y : B such that R(x, y), then there is a function f : A → B such that for all x : A we have R(x, f (x)) OR

(set theory version: Axiom of Choice)