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: .
Related Concepts
- Product Type: The non-dependent special case
- Ordered Tuple: Concrete elements of product types
- Dependent Product: The dual construction where functions have dependent codomains
- Sum Type: The coproduct, dual to the product