Why is sum-type a disjunction in the Curry-Howard correspondence?

92 views Asked by At

According to the Curry-Howard correspondence the sum-type aka tagged-union is the equivalent of disjunction, logical OR

Why is this the case? Is it not closer to XOR? (a or b) implies that it could be a or b or both, whereas Either a b must be a or b but never both.

1

There are 1 answers

0
Bartosz Milewski On

Curry-Howard correspondence says that an element of Either a b represents a proof of a or b. To prove a disjunction it's enough to prove (provide an element of) a or b. You do this by constructing Either a b using either Left a or Right b.