help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (*) -> 1


From: Nick Dokos
Subject: Re: (*) -> 1
Date: Tue, 17 Jan 2023 14:11:50 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

Jean Louis <bugs@gnu.support> writes:

> * tomas@tuxteam.de <tomas@tuxteam.de> [2023-01-17 19:45]:
>> Higher maths are a superset of (and sometimes a correction of) what
>> is taught in elementary schools. Lisp takes this inspiration from
>> higher maths. John McCarthy [1] was a mathematician by training and
>> most definitely had no qualms with zero- or one-term products and
>> sums. You have no choice but (believe me, I studied that too). As
>> soon as you have general sum and product formulae, you /need/ to
>> define what happens in border cases, and those conventions you seem
>> to dislike so much have turned out to be the most convenient,
>> probably since the mid-19th century.
>
> Thanks. I am following your hints, but I am not getting answer.
>
> If you know why they are convenient, can you please explain me? That
> is what I am asking.

[ I posted some references that might help, but I posted them in the
wrong thread :( ]

The "empty sum" and "empty product" conventions are described in the
corresponding articles in Wikipedia too - they might help:

   https://en.wikipedia.org/wiki/Empty_sum
   https://en.wikipedia.org/wiki/Empty_product

Do not think of `(+ ...)' in Lisp as the (binary)
addition operator: think of it as the sum operator (denoted Σ in math)
which adds up a whole sequence of numbers. Similarly, think of `(*
...)' in Lisp as the product operator (denoted Π in math). It is more
pre-calculus level math, rather than elementary school math.

The conventions are useful in math because they simplify proofs, by
eliminating special cases. The same conventions are useful in Lisp,
because they make the Lisp operators behave similarly to the math
operators, so everything that you know about them can translate
directly to Lisp.

That's the *whole* point: there is nothing more to it.

-- 
Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]