Re:Adventures in Category Theory – The algebra of types (2018)
by chriswarbo on Wednesday October 20, 2021 @05:41AM
(#28928701)
One major difference between types and sets (certainly between type theory and set theory) is that set membership is a proposition, e.g. all of the following are perfectly reasonable expressions, which ask whether or not a value exists in a set:
However, type membership is not a question; it's part of a definition. We may choose to add "annotations" to some expressions, but they only act as sanity checks; they are logically/computationally irrelevant:
[ Parent
| on HN ]
Re:Adventures in Category Theory – The algebra of types (2018)
by Koshkin on Wednesday October 20, 2021 @07:04AM
(#28929252)
Another way of stating this is to say that sets are “extensional” and types are “intensional,” which means that a set is defined by imposing conditions (constraints) on the membership or by simply listing the objects, while a type is defined by describing its “meaning,” e.g. by specifying operations on objects.