#20749: Use PARI nfeltup() for inclusion of base field into relative number
field
-------------------------------------+-------------------------------------
Reporter: pbruin | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-7.3
Component: number fields | Resolution:
Keywords: relative number | Merged in:
field pari | Reviewers: Stephan Ehlen
Authors: Peter Bruin | Work issues:
Report Upstream: N/A | Commit:
Branch: | 2cb5c94937b32696f607d6cc901b34dabd1e33a8
u/pbruin/20749-pari_nfeltup | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by pbruin):
After applying this ticket together with #20759 and #20791, I get (on a
not so very fast system):
{{{
sage: K.<zeta22> = CyclotomicField(22)
sage: x = polygen(K)
sage: f = f = x^9 + (zeta22^9 - zeta22^6 + zeta22^4 + 1)*x^8 + (2*zeta22^8
+ 4*zeta22^7 - 6*zeta22^5 - 205*zeta22^4 - 6*zeta22^3 + 4*zeta22 + 2)*x^7
+ (181*zeta22^9 - 354*zeta22^8 + 145*zeta22^7 - 253*zeta22^6 +
145*zeta22^5 - 354*zeta22^4 + 181*zeta22^3 + 189*zeta22 - 189)*x^6 +
(902*zeta22^9 + 13116*zeta22^8 + 902*zeta22^7 - 500*zeta22^5 -
322*zeta22^4 - 176*zeta22^3 + 176*zeta22^2 + 322*zeta22 + 500)*x^5 +
(13196*zeta22^9 + 548*zeta22^8 + 9176*zeta22^7 - 17964*zeta22^6 +
8512*zeta22^5 - 8512*zeta22^4 + 17964*zeta22^3 - 9176*zeta22^2 -
548*zeta22 - 13196)*x^4 + (17104*zeta22^9 + 23456*zeta22^8 + 8496*zeta22^7
- 8496*zeta22^6 - 23456*zeta22^5 - 17104*zeta22^4 + 39680*zeta22^2 +
283184*zeta22 + 39680)*x^3 + (118736*zeta22^9 - 118736*zeta22^8 -
93520*zeta22^6 + 225600*zeta22^5 + 66496*zeta22^4 + 373744*zeta22^3 +
66496*zeta22^2 + 225600*zeta22 - 93520)*x^2 + (342176*zeta22^9 +
388928*zeta22^8 + 4800*zeta22^7 - 234464*zeta22^6 - 1601152*zeta22^5 -
234464*zeta22^4 + 4800*zeta22^3 + 388928*zeta22^2 + 342176*zeta22)*x +
431552*zeta22^9 - 1830400*zeta22^8 - 1196800*zeta22^7 - 1830400*zeta22^6 +
431552*zeta22^5 + 1196096*zeta22^3 - 12672*zeta22^2 + 12672*zeta22 -
1196096
sage: %time L.<a> = K.extension(f)
CPU times: user 6.51 s, sys: 4 ms, total: 6.52 s
Wall time: 6.52 s
sage: %time a*zeta22
CPU times: user 2.79 s, sys: 32 ms, total: 2.82 s
Wall time: 2.82 s
zeta22*a
sage: %time a*zeta22
CPU times: user 36 ms, sys: 0 ns, total: 36 ms
Wall time: 33.8 ms
zeta22*a
}}}
Practically all the time for creating the extension is spent in the PARI
function `nf_rnfeq`. For the first multiplication, practically all the
time is spent in the PARI function `nf_nfzk`; subsequent computations are
much faster. Note also that ''printing'' the result of `a*zeta22` takes a
long time; this is due to the conversion from absolute to relative
representation (the PARI function `eltabstorel_lift`).
--
Ticket URL: <http://trac.sagemath.org/ticket/20749#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 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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.