#10317: how to copy/paste InfinitePolynomialRings?
------------------------------+---------------------------------------------
 Reporter:  zimmerma          |         Owner:  AlexGhitza
     Type:  defect            |        Status:  closed    
 Priority:  minor             |     Milestone:  sage-4.7  
Component:  basic arithmetic  |    Resolution:  wontfix   
 Keywords:                    |        Author:            
 Upstream:  N/A               |      Reviewer:            
   Merged:                    |   Work_issues:            
------------------------------+---------------------------------------------
Changes (by SimonKing):

  * status:  new => closed
  * resolution:  => wontfix


Comment:

 1. I see no reason whatsoever to expect that the string representation of
 any object should return the object by copy-and-paste. Just think of any
 element of a finite prime field: Its string representation will yield an
 integer by copy-and-paste - not a prime field element. Or just think of
 `ZZ`: Try to copy-and-paste its string representation...

 This is why I resolve the ticket as wontfix.

 2. There are two or three reasons why I decided to represent the elements
 of an infinite polynomial ring the way they are.
   (i) In the literature, the notation for the indices of variables is by
 subscript. Hence, Latex style, `_`.

   (ii) The arithmetic and, in particular, the Gröbner machinery, is based
 on finite polynomial rings. It is reasonable to have the same variable
 names both for the finite and the infinite polynomial ring. But `x[3]` is
 no valid variable name of a finite polynomial ring.

   (ii+1/2) I find `x_1` nicer to read than `x[1]`.

 3. Here is your workaround:
 {{{
 sage: R.<a> = InfinitePolynomialRing(ZZ)
 sage: f = a[0]+a[1]+a[2]
 sage: f
 a_2 + a_1 + a_0
 sage: R('a_2 + a_1 + a_0')
 a_2 + a_1 + a_0
 sage: R('a_2 + a_1 + a_0')==f
 True
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10317#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to