Definition

A dependent pair (or dependent sum type) is a generalization of the (simple) product type where the type of the second component may depend on the value of the first component.

The dependent pair type is written or , where is a type and is a type family indexed by .

An element of is a pair where and .

Type Rules

Formation Rule

Introduction Rule

Elimination Rules

-Rules

η-Rule

Examples

  • A vector with length: pairs a natural number with a vector of that length
  • Subtypes: represents elements of satisfying predicate with
  • Existential quantification: The proposition corresponds to

Special Cases

When is a constant type family (does not depend on ), the dependent pair reduces to the ordinary product type: .