#4329: class numbers of non-maximal orders -- should return NotImplementedError
for now
---------------------------+------------------------------------------------
Reporter: was | Owner: was
Type: defect | Status: new
Priority: major | Milestone: sage-3.2
Component: number theory | Keywords:
---------------------------+------------------------------------------------
This is just wrong (and easy to fix):
{{{
sage: R = ZZ[3*sqrt(-3)]
sage: R.class_number??
Type: instancemethod
Base Class: <type 'instancemethod'>
String Form: <bound method AbsoluteOrder.class_number of Order in
Number Field in a with defining polynomial x^2 + 27>
Namespace: Interactive
File: /home2/sage/build/sage-3.1.4/local/lib/python2.5/site-
packages/sage/rings/number_field/order.py
Definition: R.class_number(self, proof=None)
Source:
def class_number(self, proof=None):
"""
EXAMPLES:
sage: ZZ[2^(1/3)].class_number()
1
sage: ZZ[sqrt(-23)].class_number()
3
"""
return self.number_field().class_number(proof=proof)
}}}
For a non-maximal order, the class_number (and class group) commands
should return NotImplementedError, rather than give a wrong or meaningless
answer.
To fix this, all you have to do is make these function raise
NotImplementedError, except in the case of the maximal order.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4329>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---