ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 17 May 2020 05:27:09 -0500Elliptic Curve over Tower of Finite Fieldhttps://ask.sagemath.org/question/51434/elliptic-curve-over-tower-of-finite-field/So I was trying to construct a curve and compute arithmetics on different hierachy of extensions.
The problem is, since in my application the characteristic $p$ is so large that the regular `Fq.extension(degree)` runs like forever. I'm not sure why but I could instead compute `irr = PolynomialRing(Fq,'x').irreducible_element(degree)` and then just do the extension `extFq = Fq.extension(irr)` by explicitly specifying a irreducible. However, my curve obtain by `E.change_ring(extFq)` would no longer be recognized over finite field and able to sample a random point. Thus the following snippet fails
q, degree = 6441726727896377540006619567673100761, 8
# q is some priori decided prime power and degree is roughly 8
Fq = GF(q)
E = EllipticCurve(Fq,[1,0])
irr = PolynomialRing(Fq,'x').irreducible_element(degree)
extFq = Fq.extension(irr)
extE = E.change_ring(extFq)
extE.random_element() #this fails
On another hand, if I simply specify the relative extension `extFq = GF(q^degree)` and use the relative extension `RelativeFiniteFieldExtension` to get the embedding, then I'm not sure how to specify the coersion explicitly while using `E.change_ring`.
p, degree = 2538055698343985819, 8
q = p^2
Fq = GF(q)
E = EllipticCurve(Fq,[1,0])
irr = PolynomialRing(GF(p),'x').irreducible_element(2*degree)
extFq = GF(q^degree,'x',irr)
# we could obtain embedding by
# rel = RelativeFiniteFieldExtension(extFq,Fq)
E.change_ring(extFq) # error: no coersion
Is there any way to get around this?Taylor HuangSun, 17 May 2020 05:27:09 -0500https://ask.sagemath.org/question/51434/Pycharm + sage incorrect computationhttps://ask.sagemath.org/question/48503/pycharm-sage-incorrect-computation/I am using sage with Pycharm with sage by choosing Python2.7 from sage /bin directory like in guide in question 39742.
In computation on finite field there is bug or other incorrect behavior:
p = 5256107634024827443646803157596584915370839195839782329597601469354483229307063
j = 3611062252397503822281535488379195436991347721427144349104935225639485573271142
K = GF(p)
a = K((3 * j) / (1728 - j))
`a` is equals `5256107634024827443646803157596584915370839195839782329597601469354483229307059`, but in fact it should be `1674511800600631022371777328069227143110125063664501651628290807871952520681596`.
In stand-alone sage from terminal it works correctly. What should I do for working with sage from Pycharm with correct computation.
Latest version Mac OS, sage 8.9 from Homebrew, latest version Pycharm.SobiegFri, 25 Oct 2019 15:05:04 -0500https://ask.sagemath.org/question/48503/