IANAM (I am not a mathematician), but from what I see, all the problem
comes from the fact that mathematical notation itself (in paper) may be
ambiguous. Imagine for example that you see in a paper $f(a+b)$. From
common notation one would guess that f is a function and that I'm
replacing it's variable with (a+b). However, if one sees $x(a+b)$ the
most common interpretation would be the same as $x*(a+b)$. So, what's
the difference? Just a name change. As robert put it, x^3(10) could be
x(x(x(10))) if that meant x*(x*x*(10))), but in paper we usually don't
write the multiplication operators, using implicit multiplication like
William himself explained:

sage: implicit_multiplication(True)
sage: var('x')
x
sage: 3x^3 + 5x - 2
3*x^3 + 5*x - 2

though writing xx wouldn't give the desired result.

Then, it becomes important that a computer doesn't have the same parsing
system as we humans do (and any attempt to replicate that would, well,
you can imagine). The thing is that we are building a computer system to
deal with those problems, and in that we must make design decisions
based on what's easier/common/fast/etc.

In my opinion, it would be better to have all functions be declared like
$ f(x) = x^3 + x + 1 $ or just use python's def for functions and "*"
for multiplication to make all cases clear. After all, quoting import
this: "There should be one-- and preferably only one --obvious way to do
it."

Ronan Paixão


Em Qua, 2008-11-05 às 21:10 -0800, Nick Alexander escreveu:
> 
> On 5-Nov-08, at 8:55 PM, Robert Dodier wrote:
> 
> >
> > William Stein wrote:
> >
> >> Would you consider this weird if you read it in a paper, or
> >> would you know how to interpret it?
> >>
> >>  "Let $f = x^3 + x + 1$ and consider $f(10)$."
> >
> > I'm not so sure I know what to do with that.
> 
> I find this bizarre.  I am absolutely certain that I want to view $f$  
> as a polynomial in one variable and evaluate it at 10.
> 
> I can think of lots of alternate ideas (evaluate everything to  
> bottom!) but I believe none of them are common.  Can you cite a paper  
> that uses the notion of $x^3$ denoting the three-fold composition of a  
> function $x$ and considering $f = x^3$ and $f(10)$ intending the three- 
> fold composition of $x$?
> 
> Nick
> 
> > 


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to