2009/9/4 Golam Mortuza Hossain <gmhoss...@gmail.com>:
>
> Hi,
>
> I am working on a patch that exposes few more properties
> of GiNaC symbols in Sage. This will allow users to specify
> their domains as well as custom latex_names.
>
> Using Stan's example, it would be possible to do
> -------
> sui = var('sui', domain='real', latex_name="\\color{red}\\s_{u,i}")
> -------

Feature request -- can you make it so the *docstring* for the variable
can be specified?  I will have to do this soon anyways if you don't,
since it is needed for the units package.

E.g.,

  meter = var('meter', docstring="A meter is...", latex_name="m")

> However, there are some issues that needs to be discussed.
> It seem that in GiNaC, its not possible to update the domain
> of an already defined variable. On the hand one can have
> different variables with same name (but different serial).
> Thus, we need to move pynac symbol directory within Sage to allow
> flexible usage but still keep unique variable names.
>
> Consider the following situation
> ---------
> sage: xc = var('x')
> sage: xr = var('x', domain='real')
> sage: xc
> x
> sage: xr
> x
> sage x
> x
> ---------
>
> Here we have two choices
>
> (1)
> ---------
> sage xr is xc
> True
> sage: xr - xc
> 0
> ---------
>
> (2)
> -----------
> sage: xr is xc
> False
> sage: xr - xc
> x - x
> -----------
>
> Now my question is whether we should allow (2) or (1) ?

I don't know.  I'm curious -- what does Maxima do?  Note that if
Maxima can't do this, i.e. ,have one variable name with two domains,
it will make using Maxima for anything more complicated, though not
impossible, since we just name mangle the variable when moving it back
and forth to Maxima.

William

>
>
> See also Burcin's this mail for related discussion
>
> http://groups.google.com/group/pynac-devel/browse_thread/thread/76868c8ad5ae5b70
>
>
> Cheers,
> Golam
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an 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