Hi all,

I'm trying to use Sage to implement the number field sieve factorization 
algorithm, but I've reached a sticking point with defining polynomials and some 
of their in built functions. I'm running Sage-5.13 through VirtualBox 4.3.8 and 
homogenization does not work as expected. Following the online examples, the 
following commands work as expected:

R.<t,s> = ZZ[]
my_poly = t^2+2*s*t+3*s
hom = my_poly.homogenize('z')
hom += 3*t

I then try to use this structure to build a polynomial from the base [n^(1/d)] 
expansion of n as follows:

n = 100; d=3
load DATA+'my_functions.py'
coefficients = poly_expand(n,int(n**(1/d)),d)
R.<t,s> = ZZ[]
f = 0
for c in coefficients:
    f += c*t^d
    d -= 1
g = f.homogenize('s')

Running this returns "AttributeError: 'GlobalPolynomialRing' object has no 
attribute '_first_ngens'". As far as I'm aware, there is no difference between 
the two ring constructions, yet I still get errors. Any suggestions or pointers 
in the right direction would be much appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" 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-support.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to