Yes Stavros,
It is an interesting philosophical question whether 1/2, 1+%i, 2^(1/2), etc are really atomic. David Tall calls operators like "/" procepts to merge the process/concept, or in maxim parlance verb/noun.
"By using the notation ambiguously to represent either process or product, whichever is convenient at the time, the mathematician manages to encompass both --- neatly side-stepping a possible object/process dichotomy. E.~Gray & D.~Tall (1994)"
I guess we all know this! We don't have that luxury in code though.
I was surprised about map, and the apparent inconsistency here. Whatever we think, 1/2 isn't atomic in Maxima, just as 1+%pi isn't. However they are just as "real". So, my vote would be for consistency of behaviour rather than dogma on the nature of 1/2 even though I have my views....
Chris
From: macrakis at gmail.com [mailto:macrakis at gmail.com] On Behalf Of Stavros Macrakis
Sent: 26 September 2012 21:45
To: Richard Fateman
Cc: Christopher Sangwin; maxima at math.utexas.edu
Subject: Re: [Maxima] Problems with map.
On Wed, Sep 26, 2012 at 2:31 PM, Richard Fateman <fateman at eecs.berkeley.edu<mailto:fateman at eecs.berkeley.edu>> wrote:
...The internal operator in 1/2 is 'rat' which requires 2 integer operands. A special case
could be set to create f(1)/f(2) which is really f(1) * f(2)^(-1) in this example, but
I'm not sure that map should do that.
Well, part/args/op treat 1/2 as "/"(1,2) already, even though ?caar(1/2) = RAT and ?caar(a/b) = MTIMES.
One weird thing here is that mapatom treats 1/2 as atomic even though part/args/op are perfectly content to treat it as composite; understandable in the a[i] case, but why the 1/2 case?
Actually, I think that 1/2 is "a number" and thus atom(1/2) should be true. But this atom
concept is not very accurately portrayed. Atoms should be non-decomposable, except
by nuclear fission..
Sure, but you might also want to think of 1+%i, 2^(1/2), and 1+%pi as number literals... :-)
-s