Hello,

I want to do some calculations over an extension of the polynomial ring 
Z[q] which many quantum integers have square roots.

Initially I thought that I was going to be easy and that I could do the 
following:

sage: R.<q>=PolynomialRing(QQ)
sage: s3=(1+q+q^2).sqrt(name='s3')
sage: s4=(1+q+q^2+q^3).sqrt(name='s4')
sage: s3*s4    # this blows up:(

Unfortunately, the last line blows up as s3 and s4 do not belong to a 
common ring as far as sage is concerned, which is fair enough.

So then I tried:

sage: R=PolynomialRing(ZZ,'q')
sage: R2.<s2>=R.extension(x^2-1-q,'s2')
sage: R3.<s3>=R2.extension(x^2-1-q-q^2,'s3')
sage: R4.<s4>=R3.extension(x^2-1-q-q^2-q^3,'s4')
sage: (s2*s3)^2
(q + 1)*s2 + q^2 + 3*q + 2

This seems to work but it is quite cumbersome especially as I want to be 
able to adjoin the square roots s2, s3, ..., s<n> for an integer n. 

Two questions:

   1. Is there a better way to do this? Ultimately I want to work with 
   modules defined over this (awful) ring. So, by "better" I do not 
   necessarily mean less cumbersome: I need arithmetic to be efficient.
   2. Second, I really need to work of the fraction of this ring -- or 
   rather, I need s2, s3, ... to be invertible. Unfortunately,
   sage: FractionField(R4)
   
   returns a not implemented error.I can probably get around this by 
   adjoining inverses, but I am hoping that there is a better to do this. Any 
   suggestions?

Cheers,

Andrew

-- 
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 sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to