I just tried to run:

sage: m = random_prime(10^5)
sage: K.<r> = CyclotomicField(m)

and I ran out of RAM! Doing a smaller example:

sage: m = random_prime(10^4)
sage: %prun K.<r> = CyclotomicField(m)

puts 

sage.rings.number_field.number_field_morphisms.create_embedding_from_approx

as the most expensive function call. Continuing to:

sage: m = random_prime(2*10^3)
sage: K.<r> = CyclotomicField(m)
sage: %prun K.ring_of_integers()

puts

sage.matrix.matrix_integer_dense.Matrix_integer_dense._solve_right_nonsingular_square

as the most expensive function call, which would imply John's assumption is 
right.

Cheers,
Martin

On Tuesday 15 Apr 2014 13:04:27 François Colas wrote:
> Hi Vincent,
> 
> In fact that's exactly what I want to do!
> 
> But I am using morphisms:
> 
> m = ZZ(int(random()*10^5+1))
> 
> R.<r> = NumberField(cyclotomic_polynomial(m))
> 
> Idl = []
> 
> for (p, e) in factor(m):
>     Idl.append(cyclotomic_polynomial(p))
> 
> K = NumberField(Idl, 'k')
> 
> F = Hom(R, K)
> 
> f = F([...])
> 
> Unfortunately I also need K with big m for cryptographic purpose... :'(
> 
> Note that even if you have 3 cyclotomic polynomials in Idl (e.g. 11, 13,
> 17) it's always slow.
> 
> Le mardi 15 avril 2014 18:48:11 UTC+2, vdelecroix a écrit :
> > Hi François,
> > 
> > Might be related to the ticket #16116 on trac
> > (http://trac.sagemath.org/ticket/16116). Note that for performance, it
> > is possible to use multivariate polynomials as described in the
> > ticket.
> > 
> > Best
> > Vincent
> > 
> > 2014-04-15 18:30 UTC+02:00, François Colas <fco...@gmail.com 
<javascript:>>:
> > > Hello group,
> > > 
> > > I am playing with quotient ring of Z over cyclotomic polynomial but it
> > 
> > is
> > 
> > > strangely slow:
> > > 
> > > sage: m = random_prime(10^4); m
> > > 2437
> > > sage: %time R.<r> = ZZ['z'].quotient(cyclotomic_polynomial(m))
> > > CPU times: user 2.50 s, sys: 0.00 s, total: 2.50 s
> > > Wall time: 2.50 s
> > > 
> > > cyclotomic_polynomial(m) is created instantly whatever the size of m but
> > > the quotient becomes very long:
> > > 
> > > sage: m = random_prime(10^5); m
> > > 16231
> > > sage: %time R.<r> = ZZ['z'].quotient(cyclotomic_polynomial(m))
> > > CPU times: user 217.82 s, sys: 0.00 s, total: 217.82 s
> > > Wall time: 217.65 s
> > > 
> > > 
> > > I am using Sage Version 6.1.1, does anyone could confirm this problem?
> > 
> > Groups
> > 
> > > "sage-devel" group.
> > > To unsubscribe from this group and stop receiving emails from it, send
> > 
> > an
> > 
> > > email to sage-devel+...@googlegroups.com <javascript:>.
> > > To post to this group, send email to
> > > sage-...@googlegroups.com<javascript:>.
> > > 
> > > Visit this group at http://groups.google.com/group/sage-devel.
> > > For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to