On Sat, 18 Jul 2009 16:54:34 -0700
William Stein <wst...@gmail.com> wrote:

> 
> On Sat, Jul 18, 2009 at 4:49 PM, Jason
> Grout<jason-s...@creativetrax.com> wrote:
> >
> > Burcin Erocal wrote:
> >
> >> I attached a patch to the trac ticket that contains an initial
> >> attempt at the MMA notation:
> >>
> >> http://trac.sagemath.org/sage_trac/ticket/6344
> >>
> >
> > FYI, a few days ago Burcin uploaded a new patch on 6344 and asked
> > for review.  Here are the examples:
> >
> > OLD:
> >
> >
> > sage: var('x,y')
> > sage: f = function('f')
> > sage: f(x).derivative(x)
> > D[0](f)(x)
> > sage: f(x,x).derivative(x,2)
> > D[0, 0](f)(x, x) + 2*D[0, 1](f)(x, x) + D[1, 1](f)(x, x)
> >
> >
> > NEW:
> >
> > sage: f(x).derivative(x)
> > D[1](f)(x)
> > sage: f(x,x).derivative(x,2)
> > D[2, 0](f)(x, x) + 2*D[1, 1](f)(x, x) + D[0, 2](f)(x, x)
> 
> (1) So the non-latex isn't supposed to change?

It is supposed to change, see below.

> (2) Why are these different?
> 
>   D[0, 0](f)(x, x) + 2*D[0, 1](f)(x, x) + D[1, 1](f)(x, x)
> 
> and
> 
>   D[2, 0](f)(x, x) + 2*D[1, 1](f)(x, x) + D[0, 2](f)(x, x)
> 
> In particular, why is it 2*D[0,1] in one and 2*D[1,1] in another?

In the old representation, D[0, 0](f)(x, y) meant d^2/dx^2 f(x,y). If
you wanted d^5/dx^5 you'd write D[0, 0, 0, 0, 0](f)(x, y). That is now
D[5, 0](f)(x,y).

This also corresponds to the tuple printed as an exponent of the
function in latex mode:


> > NEW LATEX:
> >
> > sage: latex(f(x).derivative(x))
> > f'\left(x\right)
> > sage: latex(f(x,x).derivative(x,2))
> > f^{(2,0)}\left(x, x\right) + 2 \, f^{(1,1)}\left(x, x\right) +
> > f^{(0,2)}\left(x, x\right)


> > More examples:

I did not present these lines below as examples of the new style
printing. These are the bugs we need to fix at some point. They are
present in the current system too.

> > sage: binomial(x,y).derivative(x)
> > <boom>
> > sage: latex(floor(x).derivative(x))
> > D[0]\left \lfloor x \right \rfloor
> > sage: latex(ceil(x).derivative(x))
> > D[0]\left \lceil x \right \rceil
> >
> >
> > If you have an issue with the above printing, please speak now!  If
> > you like this, it'd be great if you'd chime in as well.
> >
> > Burcin indicates that this is a stepping stone, not necessarily a
> > final implementation.  However, Burcin points out that we ought to
> > settle on a suitable output soon and move on from this issue.

In light of the discussion that took place in this thread, I consider
this the final style, not a stepping stone.

In my comments to the trac ticket, I just indicated that there are
problems with printing even with this patch. Since I don't have time to
fix all these now, and the printing of partial derivatives should be
standardized soon, I suggest that this patch is reviewed, and hopefully
merged for 4.1.1.


Cheers,
Burcin

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

Reply via email to