The dependent sum is a universal construction in category theory. It generalizes the Cartesian product to the situation where one factor may depend on the other. It is the left adjoint to the base change functor between slice categories.
The dual notion is that of dependent product.
Let be a category and a morphism in such that pullbacks along exist in . These then constitute a base change functor
between the corresponding slice categories.
The dependent sum or dependent coproduct along the morphism is the left adjoint of the base change functor
This is directly seen to be equivalent to the following.
Assume that the category has a terminal object . Let be any object and assume that the terminal morphism admits all pullbacks along it.
Notice that a pullback of some along is simply the product , equipped with its projection morphism . But if we regard this as the image of the base change functor then it is not quite just the product in . Instead we have:
The product is, if it exists, equivalently the dependent sum of the base change of along :
Here we write ”” also for the morphism .
Under the relation between category theory and type theory the dependent is the categorical semantics of dependent sum types .
Notce that under the identification of propositions as types, dependent sum types (or rather their bracket types) correspond to existential quantification .
The following table shows how the natural deduction rules for dependent sum types correspond to their categorical semantics given by the dependent sum universal construction.
| type theory | category theory | |
|---|---|---|
| syntax | semantics | |
| natural deduction | universal construction | |
| dependent sum type | dependent sum | |
| type formation | ![]() | |
| term introduction | ![]() | |
| term elimination | ![]() | |
| computation rule | ![]() |
dependent sum, dependent product
Standard textbook accounts include section A1.5.3 of
and section IV of