#9054: create a class for basic function_field arithmetic for Sage
---------------------------------------------------------------------------------+
    Reporter:  was                                                              
 |         Owner:  was          
        Type:  enhancement                                                      
 |        Status:  new          
    Priority:  major                                                            
 |     Milestone:  sage-wishlist
   Component:  algebra                                                          
 |    Resolution:               
    Keywords:                                                                   
 |   Work_issues:               
    Upstream:  N/A                                                              
 |      Reviewer:               
      Author:  William Stein, Robert Bradshaw, Maarten Derickx, Moritz Minzlaff 
 |        Merged:               
Dependencies:                                                                   
 |  
---------------------------------------------------------------------------------+

Comment(by SimonKing):

 Replying to [comment:39 was]:
 > Replying to [comment:37 SimonKing]:
 > > Here are some comments on [attachment:trac_9054-all-parts.patch]:
 > >
 > >  * Please remove the `__contains__` method from the category
 `FunctionFields`. Containment in categories should rely on the default
 implementation, unless there is a compelling reason to do otherwise.
 > ...
 >
 > Technically this is true.   But this category framework instead of
 inheritance -- really two very different approaches to design -- leads
 directly to slow code in some cases in practice, which is *really*
 annoying, IMHO.

 A while ago, I had worked on a ticket #10667 about category containment.
 One purpose was to get a speedup. The trick was (again) to use Cython. For
 some reason, the work on that ticket has stalled. Perhaps it would be
 worth while to resume it.

 Generally, I think it is better to improve the category framework, rather
 than to work around it.

 >  For example, see #11657, where one of the root causes of slowness was
 code in is_Ring that was added to support this category approach, and
 which slowed everything down.

 Then why is the existing `is_Ring` not rewritten along the lines of what
 you do in #11657?

 > is_Ring is only deprecated when used from the top level (i.e., the Sage
 prompt).

 Yes, this is what I meant. I did not mean "deprecated" in the sense of
 "will soon be removed", but in the sense of "please don't try this at
 home".

 >  And the is_Ring function does test for category stuff.

 Actually I have not been aware that category stuff is tested in `is_Ring`.
 I was thinking about various other `is_...` methods that really do nothing
 more than isinstance.

 > >  * Is there a reason why you have a method `base_field` that simply
 returns the function field itself? From the behaviour of the  `base_ring`
 method of polynomial rings, I would rather expect that
 `FunctionField(QQ,['t']).base_field()` returns the rational field.
 > >
 >
 > No.  The base field of a function field is a rational function field in
 1 variable.

 Ouch, so I was mistaken.

 > The base field of that rational function field is then a field such as
 QQ.   Most function fields aren't rational, e.g., they are finite
 extensions K/QQ(t), or even relative extensions L/K.  In the first case,
 the base field is QQ(t) and in the second it is K.
 > If Simon was confused by this, it should be documented better.

 Not needed. What I stated was based on reading the patch "diagonally". I
 only noticed one of the two base_field methods.

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