Remark. Families and their products and sums in programming languages? [01HS]

It has been encouraging to see we can think about both binary products and binary sums in terms of OCaml language features:

Unfortunately there is no such analogue to the concept of a family of sets (A_i)_{i:I} and its product \prod _{i:I}A_i and sum \sum _{i:I}A_i in a language like OCaml. That is because families of sets correspond to dependent types, which are not yet widespread in mainstream programming languages. Nonetheless, you can try them out in more obscure languages like Lean, Rocq, Agda, and Idris. From a dependently typed programmer’s perspective, it is useful to keep in mind the following remarks:

  1. Function sets in terms of big products; the “dependent function” notation
  2. Binary products in terms of big sums; the “dependent pair” notation