#14489: _S_class_group_and_units is mathematically incorrect
---------------------------------+------------------------------------------
Reporter: robharron | Owner: davidloeffler
Type: defect | Status: needs_review
Priority: critical | Milestone: sage-5.10
Component: number fields | Resolution:
Keywords: S-class group | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Robert Harron | Merged in:
Dependencies: | Stopgaps:
---------------------------------+------------------------------------------
Comment (by robharron):
Running the long tests, I got a doctest failure in
polynomial_quotient_ring.py (since it has a function
_S_class_group_and_units that uses the function I changed to compute such
things for quotients of polynomial rings over number fields by not
necessarily irreducible polynomials):
{{{
**********************************************************************
File
"/Users/rharron/sages/sage-5.8/devel/sage/sage/rings/polynomial/polynomial_quotient_ring.py",
line 984:
sage: S.S_class_group([])
Expected:
[((1/4*xbar^2 + 31/4, (-1/8*a + 1/8)*xbar^2 - 31/8*a + 31/8,
1/16*xbar^3 + 1/16*xbar^2 + 31/16*xbar + 31/16, -1/16*a*xbar^3 + (1/16*a +
1/8)*xbar^2 - 31/16*a*xbar + 31/16*a + 31/8), 6, -1/16*xbar^3 +
1/16*xbar^2 - 31/16*xbar + 47/16), ((-1/4*xbar^2 - 23/4, (1/8*a -
1/8)*xbar^2 + 23/8*a - 23/8, -1/16*xbar^3 - 1/16*xbar^2 - 23/16*xbar -
23/16, 1/16*a*xbar^3 + (-1/16*a - 1/8)*xbar^2 + 23/16*a*xbar - 23/16*a -
23/8), 6, 1/16*xbar^3 + 3/16*xbar^2 + 23/16*xbar + 85/16), ((-5/4*xbar^2 -
115/4, 5/4*a*xbar^2 + 115/4*a, -5/16*xbar^3 + 5/16*xbar^2 - 115/16*xbar +
115/16, 1/16*a*xbar^3 + 7/16*a*xbar^2 + 23/16*a*xbar + 161/16*a), 2,
5/16*xbar^3 + 37/16*xbar^2 + 115/16*xbar + 867/16)]
Got:
[((1/4*xbar^2 + 31/4, (-1/8*a + 1/8)*xbar^2 - 31/8*a + 31/8,
1/16*xbar^3 + 1/16*xbar^2 + 31/16*xbar + 31/16, -1/16*a*xbar^3 + (1/16*a +
1/8)*xbar^2 - 31/16*a*xbar + 31/16*a + 31/8), 6, 1/16*xbar^3 - 5/16*xbar^2
+ 31/16*xbar - 139/16), ((-1/4*xbar^2 - 23/4, (1/8*a - 1/8)*xbar^2 +
23/8*a - 23/8, -1/16*xbar^3 - 1/16*xbar^2 - 23/16*xbar - 23/16,
1/16*a*xbar^3 + (-1/16*a - 1/8)*xbar^2 + 23/16*a*xbar - 23/16*a - 23/8),
6, 1/16*xbar^3 + 3/16*xbar^2 + 23/16*xbar + 85/16), ((-5/4*xbar^2 - 115/4,
5/4*a*xbar^2 + 115/4*a, -5/16*xbar^3 + 5/16*xbar^2 - 115/16*xbar + 115/16,
1/16*a*xbar^3 + 7/16*a*xbar^2 + 23/16*a*xbar + 161/16*a), 2, 5/16*xbar^3 +
37/16*xbar^2 + 115/16*xbar + 867/16)]
**********************************************************************
File
"/Users/rharron/sages/sage-5.8/devel/sage/sage/rings/polynomial/polynomial_quotient_ring.py",
line 990:
sage: S.S_class_group([K.ideal(a)])
Expected:
[((1/4*xbar^2 + 31/4, (-1/8*a + 1/8)*xbar^2 - 31/8*a + 31/8,
1/16*xbar^3 + 1/16*xbar^2 + 31/16*xbar + 31/16, -1/16*a*xbar^3 + (1/16*a +
1/8)*xbar^2 - 31/16*a*xbar + 31/16*a + 31/8), 6, -1/16*xbar^3 +
1/16*xbar^2 - 31/16*xbar + 47/16), ((-1/4*xbar^2 - 23/4, (1/8*a -
1/8)*xbar^2 + 23/8*a - 23/8, -1/16*xbar^3 - 1/16*xbar^2 - 23/16*xbar -
23/16, 1/16*a*xbar^3 + (-1/16*a - 1/8)*xbar^2 + 23/16*a*xbar - 23/16*a -
23/8), 2, -1/8*xbar^2 - 15/8)]
Got:
[((1/4*xbar^2 + 31/4, (-1/8*a + 1/8)*xbar^2 - 31/8*a + 31/8,
1/16*xbar^3 + 1/16*xbar^2 + 31/16*xbar + 31/16, -1/16*a*xbar^3 + (1/16*a +
1/8)*xbar^2 - 31/16*a*xbar + 31/16*a + 31/8), 6, -1/16*xbar^3 +
1/16*xbar^2 - 31/16*xbar + 47/16), ((-1/4*xbar^2 - 23/4, (1/8*a -
1/8)*xbar^2 + 23/8*a - 23/8, -1/16*xbar^3 - 1/16*xbar^2 - 23/16*xbar -
23/16, 1/16*a*xbar^3 + (-1/16*a - 1/8)*xbar^2 + 23/16*a*xbar - 23/16*a -
23/8), 2, -1/16*a*xbar^3 + (-13/16*a + 1/8)*xbar^2 - 23/16*a*xbar -
299/16*a + 31/8)]
**********************************************************************
}}}
It is understandable that the output has changed given that it uses a my
new version of the function for number fields. However(!) when I open sage
and run the code in the doctest, I get the expected output of the doctest,
not the new one. Why is the doctest giving a different result than running
the same commands in sage?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14489#comment:6>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.