On Sunday, March 13, 2016 at 3:32:10 PM UTC-7, Eric Gourgoulhon wrote:
>
> Thanks for these detailed explanations.
> I understand that the fix requires some significant work on symbolic 
> functions. 
> This would be quite nice however, since most symbolic computations require 
> simplification at the end. In the current setting, the LaTeX symbol is thus 
> always lost.   
>

Come to think of it, I think the only feasible way forward now is to follow 
the same route for functions as we do for symbols:

sage: f1 = function('f')
sage: f2 = function('f',latex_name="F")
sage: f1 is f2
True
sage: latex(f1)
F

i.e., there is only one symbolic function in SR with the name `f`, and 
hence doing things like setting "latex_name" is an operation with 
side-effects (so you should never do it in library code). It would also 
mean that we need to ditch `nargs` completely, because:

sage: f1 = function('f',nargs=2)
sage: f2:= function('f',nargs=3)

would make f1 refer to the function "f" with 3 parameters. Luckily, "nargs" 
isn't really used productively anywhere anyway, so it's basically a no-op 
already.

Some parts of sage can handle identical names for distinct objects in the 
same parent:

sage: P.<x,x>=QQ[]
sage: P.0^2*P.1-P.0*P.1^2
x^2*x - x*x^2

but I think it will be too challenging for the symbolic ring.


-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to