I\'ve been studying dependent types and I understand the following:
∀(x:A).B(x)
Building on Petr Pudlák’s answer, another angle to see this in a purely non-dependent fashion is to notice that the type Either a a
is isomorphic to the type (Bool, a)
. Although the latter is, at first glance, a product, it makes sense to say it’s a sum type, as it is the sum of two instances of a
.
I have to do this example with Either a a
instead of Either a b
, because for the latter to be expressed as a product, we need – well – dependent types.