max(), sum(), next()

Ken Starks straton at lampsacos.demon.co.uk
Fri Sep 5 13:54:52 EDT 2008


David C. Ullrich wrote:
> In article <g9r7hq$ri6$1$8302bc10 at news.demon.co.uk>,
>  Ken Starks <straton at lampsacos.demon.co.uk> wrote:
> 
>> David C. Ullrich wrote:
>>
>>> I don't see why you feel the two should act the same.
>>> At least in mathematics, the sum of the elements of
>>> the empty set _is_ 0, while the maximum element of the
>>> empty set is undefined. 
>>>
>>> And both for good reason:
>>>
>>> (i) If A and B are disjoint sets we certainly want to
>>> have sum(A union B) = sum(A) + sum(B). This requires
>>> sum(empty set) = 0.
>>>
>>> (ii) If A is a subset of B then we should have
>>> max(A) <= max(B). This requires that max(empty set)
>>> be something that's smaller than everything else.
>>> So we give up on that.
>> Do we give up? Really ?
> 
> Erm, thanks. I was aware of all that below. If we're
> being technical what's below is talking about the sup
> and inf, which are not the same as max and min. More
> relevant to the present context, I didn't mention what's
> below because it doesn't seem likely that saying max([])
> = -infinity and min([]) = +infinity is going to make the
> OP happy...
> 

Of course you were aware, I have seen enough of your posts
to know that. And I agree that, whatever Wikipedia seems to
imply, max and supremum should be distiguished.

It was your prelude, "At least in mathematics ..." that
made me prick up my ears. So I couldn't resist responding,
without _any_ malice I assure you.

Cheers,
Ken.




More information about the Python-list mailing list