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

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

Re: (*) -> 1


From: Michael Heerdegen
Subject: Re: (*) -> 1
Date: Tue, 17 Jan 2023 18:17:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Jean Louis <bugs@gnu.support> writes:

> Every elementary school is there to prove that convention of having at
> least two addends for addition and two factors for multiplication
> exists.

Ok...

My neighbor has one garage with 2 Ferraris.  Altogether he has (+ 2) ==>
2 Ferraris.  Not an undefined number of Ferraris.  So you see that
extending the sum operator to one summand is natural and makes sense.

I OTOH have no garage.  The number of my Ferraris in all my garages is
(+) -> 0 Ferraries.  The count of my Ferraris in all of my garages is
actually defined, as the number of my garages is.  It is really 0, not
undefined.  I can't write to the tax office that the number of Ferraris
in my garages is undefined because there are zero summands and thus I
can't calculate the number.

> By chance, I am providing roomt to mathematics teacher who was not
> introduced to this discussion, and I just called him and asked him if
> there is anything that he knows that in absence of factors, the
> multiplication operation would yield with anything, and he has no idea
> what we are talking about.

This convention is not so useful in elementary school, at least not
literally.  And unfortunately, at least here in Germany, a lot of
mathematics teachers don't understand math very well.

But you might have learned that multiplication is repeated summation (I
think I already gave this example a couple of times but never got a
response):


  2*9 = 9 + 9 (two summands)
  1*9 = 9     (one summand)
  0*9 = ???   (it's 0 at least)

When it's allowed for `*' to handle cases that could be interpreted (!)
as the sum of zero arguments, why should a _generalization_ of `+' not
be allowed to?  Note that adding things like Ferraris is only an
_interpretation_ of a formula.  A product with zero factors might not
have a useful direct interpretation in the real world, but complex
numbers also don't have, and that doesn't mean that it can't be useful
to extend the formalisms that once were _inspired_ by things in the real
world.  What sum corresponds pi^2 to?

So what you fail to see is that not everything in maths can be directly
demonstrated using apples and pears.  But that doesn't mean that it's
not worth to include these parts of maths in programming languages.

If you are really doing maths, or are really working with sums in
programming, you'll see why and where these convention make sense.  And
in programming, it's a bit like with everything new you learn: you don't
miss it before you get to know it.

> What idea he has is that there must be 2 known factors for
> multiplications and similar for addition.

That doesn't mean that it can't be _extended_.  Like the natural numbers
can be extended to the whole numbers etc.  It's generalization and
abstraction.  You don't learn all of that in elementary school.

> That there may be some convention is not excluded, and that there is
> identity element in mathematics is fine, but even the page of identity
> element does not speak of creation of identity elements, but of usage
> of identity elements.

It's just not important enough, it's a little detail.  Like in Elisp.
It might sound super important and big to you right now but we are
speaking about a tiny corner case all the time.  We don't mention that
(* 0 n) returns 0 in the docstring of `*', for example.

> Then we have contradiction that description of functions `*' and `+'
> and `-' does not speak of any sets or group theory. And we have people
> speaking yes, group theory, sets. 
>
> But not description of relation from sets to Lisp function, why?

We have argument _lists_ that play the role of sets.

> I am asking why is it in (some) Lisps?

Because it's more convenient than raising an error.  Examples had been
outlined in this thread.


Michael.




reply via email to

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