Definition

A dependent product (or dependent function type) is a generalization of Function Type where the output type may depend on the input value.

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

An element of is a function such that for each , we have .

Type Rules

Examples

  • Polymorphic Identity Function: takes a type and returns the identity function on that type
  • vectors: might prepend an element to vectors of any length
  • Universal quantification: The proposition corresponds to

Special Cases

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