#7580: bugs in infinite polynomial ring
-----------------------+----------------------------------------------------
   Reporter:  was      |       Owner:  SimonKing                        
       Type:  defect   |      Status:  needs_work                       
   Priority:  major    |   Milestone:  sage-4.3                         
  Component:  algebra  |    Keywords:  infinite polynomial ring coercion
Work_issues:           |      Author:  Simon King                       
   Upstream:  N/A      |    Reviewer:                                   
     Merged:           |  
-----------------------+----------------------------------------------------

Comment(by SimonKing):

 Replying to [comment:13 was]:
 >     sage: InfinitePolynomial(X,alpha_2)
 > Expected:
 >     alpha_0
 > Got:
 >     alpha_1

 As I said, this test was supposed to demonstrate wrong usage, that occurs
 due to an inconsistency in polynomial conversion. Both on my machine and
 on sage.math, one gets
 {{{
 sage: A = ZZ['alpha_2','alpha_1','alpha_0']
 sage: B.<alpha_3,alpha_1,alpha_2> = ZZ[]
 sage: A(alpha_2)
 alpha_0
 sage: A(alpha_1)
 alpha_1
 sage: A(alpha_3)
 alpha_2
 }}}

 So, the conversion is done by position of the variables. But when one has
 one variable more, conversion is based on name:
 {{{
 sage: A2 = ZZ['alpha_2','alpha_1','alpha_0','foo']
 sage: A2(alpha_2)
 alpha_2
 sage: A2(alpha_1)
 alpha_1
 sage: A2(alpha_3)
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 ...
 TypeError:
 }}}

 I think this is documented somewhere. What happens on 32 bit Ubuntu?

 Anyway. The purpose of this test was
  1. make the user alert that a ''direct'' construction of elements of
 infinite polynomial rings is not good -- one should use arithmetic on the
 generators, or conversion.
  2. Demonstrate that, in spite of the oddity of polynomial conversion,
 ''infinite'' polynomial conversion works fine.

 But if the oddity of polynomial conversion is different on different
 platforms (which I would then call a bug) then it might be better to just
 drop that test. What do you think?

 Cheers,

 Simon

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7580#comment:16>
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