Hi Marc, 

Le mercredi 4 février 2015 16:55:39 UTC+1, Marc Mezzarobba a écrit :
>
>
> More examples: 
>
> sage: parent(-infinity) is parent(infinity) 
> True 
> sage: type(infinity) 
> <class 'sage.rings.infinity.PlusInfinity'> 
> sage: type(-infinity) 
> <class 'sage.rings.infinity.MinusInfinity'> 
>
> sage: two = RLF(2) 
> sage: type(two) 
> <type 'sage.rings.real_lazy.LazyWrapper'> 
> sage: type(exp(two)) 
> <type 'sage.rings.real_lazy.LazyNamedUnop'> 
> sage: parent(two) is parent(exp(two)) 
> True 
>

The RLF example is more convincing, since all the tests of TestSuite are 
passed (both for the elements two, exp(two) and the parent RLF), contrary 
to the infinity example. However, I am puzzled by the following:

sage: RLF.element_class
AttributeError: element_class

(Note that RLF.el + <TAB> does return RLF.element_class). 

So it seems that the implementation of RLF does not follow what is 
described in the "How to implement new algebraic structures" tutorial 
<http://www.sagemath.org/doc/thematic_tutorials/coercion_and_categories.html>, 
does it ? 

Eric

-- 
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 sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to