Re:Where does the name "algebraic data type" come from?
by marcosdumay on Wednesday July 31, 2024 @07:03PM
(#41124459)
That's not a good assumption, and even the original example is Bool + Bool; len(Bool ∪ Bool) = 2 * len(Bool) is trivially false.
About the Cartesian product, the tags create that rule. Untagged multiplication again has fewer elements.
Yes, a Cartesian product is tagged (each axis is), but it does not affect the fact that len(A * B) = len(A) * len(B), hence it's logical to use multiplication to denote "record types".