ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 06 Aug 2014 20:22:23 +0200$p$-adic regulator calculationshttps://ask.sagemath.org/question/23697/p-adic-regulator-calculations/Why can't some $p$-adic regulators be calculated? The first case where this happens is the curve 3314b3. I received the following error message after using this code:
x = EllipticCurve("3314b3"); x
r = x.rank(); r
p = 7
x.is_good(p) and x.is_ordinary(p)
reg = x.padic_regulator(p,prec=7); reg
RuntimeError: Unable to compute the rank, hence generators, with certainty (lower bound=0, generators found=[]). This could be because Sha(E/Q)[2] is nontrivial.
Try increasing descent_second_limit then trying this command again. Tue, 05 Aug 2014 12:38:17 +0200https://ask.sagemath.org/question/23697/p-adic-regulator-calculations/Answer by yeohaikal for <p>Why can't some $p$-adic regulators be calculated? The first case where this happens is the curve 3314b3. I received the following error message after using this code:</p>
<pre><code>x = EllipticCurve("3314b3"); x
r = x.rank(); r
p = 7
x.is_good(p) and x.is_ordinary(p)
reg = x.padic_regulator(p,prec=7); reg
</code></pre>
<p>RuntimeError: Unable to compute the rank, hence generators, with certainty (lower bound=0, generators found=[]). This could be because Sha(E/Q)[2] is nontrivial.
Try increasing descent_second_limit then trying this command again. </p>
https://ask.sagemath.org/question/23697/p-adic-regulator-calculations/?answer=23704#post-id-23704I was thinking I should add an answer of my own since it's too long for a comment. I did some digging into the github library files and got the following comment:
# when gens() calls mwrank it passes the command-line
# parameter "-p 100" which helps curves with large
# coefficients and 2-torsion and is otherwise harmless.
# This is pending a more intelligent handling of mwrank
# options in gens() (which is nontrivial since gens() needs
# to parse the output from mwrank and this is seriously
# affected by what parameters the user passes!).
# In fact it would be much better to avoid the mwrank console at
# all for gens() and just use the library. This is in
# progress (see trac #1949).
on lines 1907-1916 of this. So in effect, there is currently no code yet for taking the generators directly from the Cremona Database.
I have very limited knowledge in programming and coding but based on my experimentation so far, this is what I got on SAGE in terms of trying to get the code from the generators in the database:
D = CremonaDatabase()
x = EllipticCurve();
N = x.conductor();
y = str(N);
z = len(y);
a = x.cremona_label()[z:]; a
P = D.allgens(N)[a]; P
R0 = P[0]; R0
# R1 = P[1]; R1
Q0 = x(R0)
# Q1 = x(R1)
h = x.padic_height(p, prec)
h(Q0)
# h(Q1)
Then essentially P are the generators that we need, except that they are in the form of a nested list, ie. [[a,b,c],[d,e,f],...] as opposed to when using E.gens() and getting output as [(a : b : c),(d : e : f),...]
With this workaround, I can now obtain padic heights -> the padic height matrix and the discriminant -> padic regulator. Of course this hasn't been written into a proper code yet but it is a workaround.Wed, 06 Aug 2014 20:22:23 +0200https://ask.sagemath.org/question/23697/p-adic-regulator-calculations/?answer=23704#post-id-23704Answer by tmonteil for <p>Why can't some $p$-adic regulators be calculated? The first case where this happens is the curve 3314b3. I received the following error message after using this code:</p>
<pre><code>x = EllipticCurve("3314b3"); x
r = x.rank(); r
p = 7
x.is_good(p) and x.is_ordinary(p)
reg = x.padic_regulator(p,prec=7); reg
</code></pre>
<p>RuntimeError: Unable to compute the rank, hence generators, with certainty (lower bound=0, generators found=[]). This could be because Sha(E/Q)[2] is nontrivial.
Try increasing descent_second_limit then trying this command again. </p>
https://ask.sagemath.org/question/23697/p-adic-regulator-calculations/?answer=23700#post-id-23700Unfortunately, the `padic_regulator` method does not handle the `descent_second_limit` argument, which can not be directly increased :
sage: reg = x.padic_regulator(p,prec=7, descent_second_limit=20); reg
TypeError: padic_regulator() got an unexpected keyword argument 'descent_second_limit'
A workaround can be the following,
There is also a problem when computing the `gens` of `x` as well:
sage: x.gens()
RuntimeError: Unable to compute the rank, hence generators, with certainty (lower bound=0, generators found=[]). This could be because Sha(E/Q)[2] is nontrivial.
Try increasing descent_second_limit then trying this command again.
But you can compute the `gens` of `x` with a higher `descent_second_limit` argument:
sage: x.gens(descent_second_limit=20)
[(94248114183274/1566972225 : 912499854364645191562/62028595526625 : 1)]
Fortunately the gens are cached so further calls of this method will not require a higher `descent_second_limit` argument to be set:
sage: x.gens()
[(94248114183274/1566972225 : 912499854364645191562/62028595526625 : 1)]
In particular, now you can compute the `padic_regulator`:
sage: reg = x.padic_regulator(p,prec=7); reg
2*7 + 5*7^2 + 6*7^3 + 5*7^4 + 3*7^5 + 3*7^6 + O(7^7)
I agree that this is tricky, and i consider your problem as a bug.
Wed, 06 Aug 2014 10:43:39 +0200https://ask.sagemath.org/question/23697/p-adic-regulator-calculations/?answer=23700#post-id-23700Comment by yeohaikal for <p>Unfortunately, the <code>padic_regulator</code> method does not handle the <code>descent_second_limit</code> argument, which can not be directly increased :</p>
<pre><code>sage: reg = x.padic_regulator(p,prec=7, descent_second_limit=20); reg
TypeError: padic_regulator() got an unexpected keyword argument 'descent_second_limit'
</code></pre>
<p>A workaround can be the following,</p>
<p>There is also a problem when computing the <code>gens</code> of <code>x</code> as well:</p>
<pre><code>sage: x.gens()
RuntimeError: Unable to compute the rank, hence generators, with certainty (lower bound=0, generators found=[]). This could be because Sha(E/Q)[2] is nontrivial.
Try increasing descent_second_limit then trying this command again.
</code></pre>
<p>But you can compute the <code>gens</code> of <code>x</code> with a higher <code>descent_second_limit</code> argument:</p>
<pre><code>sage: x.gens(descent_second_limit=20)
[(94248114183274/1566972225 : 912499854364645191562/62028595526625 : 1)]
</code></pre>
<p>Fortunately the gens are cached so further calls of this method will not require a higher <code>descent_second_limit</code> argument to be set:</p>
<pre><code>sage: x.gens()
[(94248114183274/1566972225 : 912499854364645191562/62028595526625 : 1)]
</code></pre>
<p>In particular, now you can compute the <code>padic_regulator</code>:</p>
<pre><code>sage: reg = x.padic_regulator(p,prec=7); reg
2*7 + 5*7^2 + 6*7^3 + 5*7^4 + 3*7^5 + 3*7^6 + O(7^7)
</code></pre>
<p>I agree that this is tricky, and i consider your problem as a bug.</p>
https://ask.sagemath.org/question/23697/p-adic-regulator-calculations/?comment=23701#post-id-23701Do you mean I can just call the generator(s) by
D=Cremona Database
D.allgens()[]
and use x.padic_regulator or do I then have compute the padic_regulator from there manually (which means there's a string of code that you didn't show)?Wed, 06 Aug 2014 12:39:14 +0200https://ask.sagemath.org/question/23697/p-adic-regulator-calculations/?comment=23701#post-id-23701