It's very not intuitive but I think they're following the usual mathematical convention. The max of no elements is odd to think about, but the supremum of the empty set is just its least upper bound. Because everything is an upper (and lower) bound of nothing, the least such value is -Infinity. Similarly the greatest lower bound, or infimum, or min, of the empty set is +Infinity.
It's very not intuitive but I think they're following the usual mathematical convention. The max of no elements is odd to think about, but the supremum of the empty set is just its least upper bound. Because everything is an upper (and lower) bound of nothing, the least such value is
-Infinity
. Similarly the greatest lower bound, or infimum, or min, of the empty set is+Infinity
.See also this StackExchange discussion.
Thank you, William.
As I was reading John's message, I ran into a concept called,
monoid
.It seems like monoid stems from the "mathemtical convention" as you pointed out.
monoid
is the first of many steps down the road that leads to functional programming. Join us.🙂🤝