# Why type theory writes dependent pairs with a big sigma and dependent functions with a big pi

Original title: The algebra of dependent types (2025)

> Hacker News story 50623866 · language: en · submitted 2026-11-24
> Web version: https://zeli.app/story/50623866
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 50 · by [todsacerdoti](<https://news.ycombinator.com/user?id=todsacerdoti>) · 💬 9
[original](<https://dotat.at/@/2025-05-28-types.html>) · [HN discussion](<https://news.ycombinator.com/item?id=50623866>)

## Summary

Tony Finch finally found the reason behind the notation: counting a type's inhabitants. Product types multiply, sum types add, and dependent pairs sum over each possible first value, so they get a big sigma. Dependent functions multiply across every argument, so they get a big pi. He also notes why "dependent sum" and "dependent product" are terms best avoided.

## Key quote

> I have avoided the terms "dependent sum" and "dependent product", because they seem perfectly designed to cause confusion over whether I am talking about variants, records, or functions.

## HN discussion (9 comments)

### [rramadass](<https://news.ycombinator.com/item?id=50642059>)

> I think Dependent Types are easier to understand following Curry-Howard Correspondence (https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspon...) where the mapping to Logic is clearly spelled out.
>
> 1) Propositional Logic = Simple Types
>
> 2) Predicate Logic = Dependent Types (https://en.wikipedia.org/wiki/Dependent_type) where;
>
> 2.1) Existential Quantification = Σ-types (aka Dependent Sum/Pair) - https://en.wikipedia.org/wiki/Dependent_type#%CE%A3_type
>
> 2.2) Universal Quantification = Π-types (aka Dependent Product/Function) - https://en.wikipedia.org/wiki/Dependent_type#%CE%A0_type
>
> Note that in order to understand the above you need to grasp "Type of Types" aka "Kinds"/"Universes".
>
> The whole Typed Lambda Calculus to Calculus of Constructions (based on dependent types) is very nicely and succinctly explained by Helmut Brandl in his 100-page booklet Typed Lambda Calculus / Calculus of Constructions - https://hbr.github.io/Lambda-Calculus/index.html

### [mananaysiempre](<https://news.ycombinator.com/item?id=50640316>)

> A couple of notes:
>
> \- There’s also the notation 0 for the empty (never, noreturn) type. In addition to matching the number of members, the notations 0 and 1 make sense also as units (neutral elements) of addition and multiplication respectively: 0 + A ≅ A + 0 ≅ A, 1 × A ≅ A × 1 ≅ A in a natural way[1]; and also 0 × A ≅ A × 0 ≅ 0.
>
> \- That a constant dependent sum is a product, and a constant dependent product is an exponential, is (undeniably confusing at first but) just[2] the naïve schoolbook definition that A × B = B added to itself A times and A^B = A multiplied by itself B times.
>
> \- That a constant dependent product is a function type is just the naïve definition that a function is a table of its values at each input (a tuple, with elements numbered by the possible inputs). A dependent function ( = dependent product), then, is the same thing but the allowable values in each cell of the table vary depending on the cell.
>
> \- That the function type is the exponential type is also part of common set-theory notation. For instance, 2^ℕ is a not-infrequent name for the set in the Cantor theorem (subsets of the naturals).
>
> [1] As in, those are not literally the same type but are one-to-one in a single natural way. The word “natural” here has a surprisingly deep technical meaning but one that corresponds to the colloquial pretty well.
>
> [2] “Just”, “simply”, etc. are as usual terms of art that mean that the statement feels very simple once you get it, and conversely that if it does not fe […]

### [solomonb](<https://news.ycombinator.com/item?id=50639972>)

> This is fun. His array example `Σ len: usize . Array(Int, len)` is the list polynomial functor (1 + X + X² + ...) applied to ints.

---

## Cite

- Page: https://zeli.app/story/50623866
- Date: 2026-11-24
- Source: dotat.at (https://dotat.at/@/2025-05-28-types.html)
- Hacker News: https://news.ycombinator.com/item?id=50623866

## Other languages

- zh: https://zeli.app/zh/story/50623866 · markdown: https://zeli.app/zh/story/50623866.md
- ja: https://zeli.app/ja/story/50623866 · markdown: https://zeli.app/ja/story/50623866.md
- ko: https://zeli.app/ko/story/50623866 · markdown: https://zeli.app/ko/story/50623866.md
- de: https://zeli.app/de/story/50623866 · markdown: https://zeli.app/de/story/50623866.md
- es: https://zeli.app/es/story/50623866 · markdown: https://zeli.app/es/story/50623866.md
- ru: https://zeli.app/ru/story/50623866 · markdown: https://zeli.app/ru/story/50623866.md
