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.Thu, 23 Apr 2020 09:07:44 +0200lifting modular symbols for newform of level 35 at p = 5, 7https://ask.sagemath.org/question/48037/lifting-modular-symbols-for-newform-of-level-35-at-p-5-7/Let $f$ be the unique normalised eigenform in $S_2(\Gamma_0(35))$ of dimension $2$. It has split multiplicative reduction at $p = 5$ ($a_p = +1$) [and non-split multiplicative reduction at $p = 7$ ($a_p = -1$)]. The $p$-adic $L$-function should vanish to the order $1$ at $1$ (because the associated abelian variety has rank $0$). I want to compute the valuation of its leading coefficient using Pollack-Stevens. To do so, I use the following code:
from sage.modular.pollack_stevens.space import ps_modsym_from_simple_modsym_space
A = ModularSymbols(35,2,1).cuspidal_submodule().new_subspace().decomposition()[1]
p = 5
prec = 2
phi = ps_modsym_from_simple_modsym_space(A)
ap = phi.Tq_eigenvalue(p,prec)
phi1,psi1 = phi.completions(p,prec)
phi1p = phi1.p_stabilize_and_lift(p,ap = psi1(ap), M = prec)
Unfortunately, the last command fails after a few seconds (also for $p = 7$) with a
> RuntimeError: maximum recursion depth exceeded while calling a Python object
Is there a theoretical problem with computing the $L$-value or is there a problem with the implementation?Mon, 23 Sep 2019 14:08:21 +0200https://ask.sagemath.org/question/48037/lifting-modular-symbols-for-newform-of-level-35-at-p-5-7/Answer by FrédéricC for <p>Let $f$ be the unique normalised eigenform in $S_2(\Gamma_0(35))$ of dimension $2$. It has split multiplicative reduction at $p = 5$ ($a_p = +1$) [and non-split multiplicative reduction at $p = 7$ ($a_p = -1$)]. The $p$-adic $L$-function should vanish to the order $1$ at $1$ (because the associated abelian variety has rank $0$). I want to compute the valuation of its leading coefficient using Pollack-Stevens. To do so, I use the following code:</p>
<pre><code>from sage.modular.pollack_stevens.space import ps_modsym_from_simple_modsym_space
A = ModularSymbols(35,2,1).cuspidal_submodule().new_subspace().decomposition()[1]
p = 5
prec = 2
phi = ps_modsym_from_simple_modsym_space(A)
ap = phi.Tq_eigenvalue(p,prec)
phi1,psi1 = phi.completions(p,prec)
phi1p = phi1.p_stabilize_and_lift(p,ap = psi1(ap), M = prec)
</code></pre>
<p>Unfortunately, the last command fails after a few seconds (also for $p = 7$) with a</p>
<blockquote>
<p>RuntimeError: maximum recursion depth exceeded while calling a Python object</p>
</blockquote>
<p>Is there a theoretical problem with computing the $L$-value or is there a problem with the implementation?</p>
https://ask.sagemath.org/question/48037/lifting-modular-symbols-for-newform-of-level-35-at-p-5-7/?answer=48039#post-id-48039The infinite recursion happens when trying to change the base ring of a polynomial (%debug is your friend)
914 poly = poly.change_ring(new_base_ring)
ipdb> p poly
(1 + O(5^2))*x^2 + (4 + 4*5 + O(5^2))*x + 5 + O(5^3)
ipdb> p new_base_ring
5-adic Field with capped relative precision 3
ipdb> p poly.parent()
Univariate Polynomial Ring in x over 5-adic Unramified Extension Field in a defined by x^2 + x - 4
I have no idea is this makes sense or not.
Mon, 23 Sep 2019 16:22:20 +0200https://ask.sagemath.org/question/48037/lifting-modular-symbols-for-newform-of-level-35-at-p-5-7/?answer=48039#post-id-48039Answer by dan_fulea for <p>Let $f$ be the unique normalised eigenform in $S_2(\Gamma_0(35))$ of dimension $2$. It has split multiplicative reduction at $p = 5$ ($a_p = +1$) [and non-split multiplicative reduction at $p = 7$ ($a_p = -1$)]. The $p$-adic $L$-function should vanish to the order $1$ at $1$ (because the associated abelian variety has rank $0$). I want to compute the valuation of its leading coefficient using Pollack-Stevens. To do so, I use the following code:</p>
<pre><code>from sage.modular.pollack_stevens.space import ps_modsym_from_simple_modsym_space
A = ModularSymbols(35,2,1).cuspidal_submodule().new_subspace().decomposition()[1]
p = 5
prec = 2
phi = ps_modsym_from_simple_modsym_space(A)
ap = phi.Tq_eigenvalue(p,prec)
phi1,psi1 = phi.completions(p,prec)
phi1p = phi1.p_stabilize_and_lift(p,ap = psi1(ap), M = prec)
</code></pre>
<p>Unfortunately, the last command fails after a few seconds (also for $p = 7$) with a</p>
<blockquote>
<p>RuntimeError: maximum recursion depth exceeded while calling a Python object</p>
</blockquote>
<p>Is there a theoretical problem with computing the $L$-value or is there a problem with the implementation?</p>
https://ask.sagemath.org/question/48037/lifting-modular-symbols-for-newform-of-level-35-at-p-5-7/?answer=48048#post-id-48048Here is a piece of code that pushes the computations as far as possible.
import traceback
from sage.modular.pollack_stevens.space import ps_modsym_from_simple_modsym_space
p = 5
prec = 2
precmore = 8
A = ModularSymbols(35, 2, 1).cuspidal_submodule().new_subspace().decomposition()[1]
phi = ps_modsym_from_simple_modsym_space(A)
# sage: phi
# Modular symbol of level 35 with values in
# Sym^0(Number Field in alpha with defining polynomial x^2 + x - 4)^2
ap = phi.Tq_eigenvalue(p, prec) # this is 1 in QQ
phi1, psi1 = phi.completions (p, precmore)
R = psi1.codomain()
eps = 1
poly = PolynomialRing(R, 'x')( [p ** (k + 1) * eps, -ap, 1] )
v0, v1 = poly.roots( multiplicities=False )
if v0.valuation():
v0, v1 = v1, v0
alpha = v0
try:
phi1p = \
phi1.p_stabilize_and_lift(
p
, prec
, ap = psi1(ap)
, alpha = alpha
, check = False
, new_base_ring = R )
except Exception:
traceback.print_exc()
The above code delivers now the following error:
Traceback (most recent call last):
File "<ipython-input-945-35e0bb0e7888>", line 34, in <module>
, new_base_ring = R )
File "/usr/lib/python2.7/site-packages/sage/modular/pollack_stevens/modsym.py", line 1495, in p_stabilize_and_lift
new_base_ring=new_base_ring, check=check)
File "/usr/lib/python2.7/site-packages/sage/modular/pollack_stevens/modsym.py", line 1043, in p_stabilize
V = self.parent()._p_stabilize_parent_space(p, new_base_ring)
File "/usr/lib/python2.7/site-packages/sage/modular/pollack_stevens/space.py", line 557, in _p_stabilize_parent_space
raise ValueError("the level is not prime to p")
ValueError: the level is not prime to p
And looking inside the module with the error, `/usr/lib/python2.7/site-packages/sage/modular/pollack_stevens/space.py` there is an intentioned check that the prime does not divide the level:
N = self.level()
if N % p == 0:
raise ValueError("the level is not prime to p")
Explicitly, the road to the error is as follows.
We submit `phi1` to the method `p_stabilize_and_lift` . After some steps, the code lands in the method `p_stabilize` of this instance of the class `class PSModularSymbolElement_symk(PSModularSymbolElement)` (the instance is `phi1`).
This method builds the space
V = self.parent()._p_stabilize_parent_space(p, new_base_ring)
and we land in the module `space.py`. To see the error, we type explicitly with our data:
sage: phi1
Modular symbol of level 35 with values in Sym^0 (5-adic Unramified Extension Field in a defined by x^2 + x - 4)^2
sage: phi1.parent()
Space of modular symbols for Congruence Subgroup Gamma0(35) with sign 1 and values in Sym^0 (5-adic Unramified Extension Field in a defined by x^2 + x - 4)^2
sage: phi1.parent().level()
35
Note: It is hard to say more, some details on the mathematical part are needed. (It happens to me that finding programming errors becomes easy first after understanding the special cases. From the examples in the method giving the final error, all levels are coprime w.r.t. the submitted prime numbers.) It's all i have. Parts of the code above are adapted to the given example. Guessing the `new_base_ring` is not good enough in the given situation, also the `alpha` had to be declared explicitly. But the space construction was explicitly prohibited and i decided to stop here. (There are too few comments, book / web references in the code, i really have no more chance.)Wed, 25 Sep 2019 03:01:29 +0200https://ask.sagemath.org/question/48037/lifting-modular-symbols-for-newform-of-level-35-at-p-5-7/?answer=48048#post-id-48048Comment by TK for <p>Here is a piece of code that pushes the computations as far as possible.</p>
<pre><code>import traceback
from sage.modular.pollack_stevens.space import ps_modsym_from_simple_modsym_space
p = 5
prec = 2
precmore = 8
A = ModularSymbols(35, 2, 1).cuspidal_submodule().new_subspace().decomposition()[1]
phi = ps_modsym_from_simple_modsym_space(A)
# sage: phi
# Modular symbol of level 35 with values in
# Sym^0(Number Field in alpha with defining polynomial x^2 + x - 4)^2
ap = phi.Tq_eigenvalue(p, prec) # this is 1 in QQ
phi1, psi1 = phi.completions (p, precmore)
R = psi1.codomain()
eps = 1
poly = PolynomialRing(R, 'x')( [p ** (k + 1) * eps, -ap, 1] )
v0, v1 = poly.roots( multiplicities=False )
if v0.valuation():
v0, v1 = v1, v0
alpha = v0
try:
phi1p = \
phi1.p_stabilize_and_lift(
p
, prec
, ap = psi1(ap)
, alpha = alpha
, check = False
, new_base_ring = R )
except Exception:
traceback.print_exc()
</code></pre>
<p>The above code delivers now the following error:</p>
<pre><code>Traceback (most recent call last):
File "<ipython-input-945-35e0bb0e7888>", line 34, in <module>
, new_base_ring = R )
File "/usr/lib/python2.7/site-packages/sage/modular/pollack_stevens/modsym.py", line 1495, in p_stabilize_and_lift
new_base_ring=new_base_ring, check=check)
File "/usr/lib/python2.7/site-packages/sage/modular/pollack_stevens/modsym.py", line 1043, in p_stabilize
V = self.parent()._p_stabilize_parent_space(p, new_base_ring)
File "/usr/lib/python2.7/site-packages/sage/modular/pollack_stevens/space.py", line 557, in _p_stabilize_parent_space
raise ValueError("the level is not prime to p")
ValueError: the level is not prime to p
</code></pre>
<p>And looking inside the module with the error, <code>/usr/lib/python2.7/site-packages/sage/modular/pollack_stevens/space.py</code> there is an intentioned check that the prime does not divide the level:</p>
<pre><code> N = self.level()
if N % p == 0:
raise ValueError("the level is not prime to p")
</code></pre>
<p>Explicitly, the road to the error is as follows.
We submit <code>phi1</code> to the method <code>p_stabilize_and_lift</code> . After some steps, the code lands in the method <code>p_stabilize</code> of this instance of the class <code>class PSModularSymbolElement_symk(PSModularSymbolElement)</code> (the instance is <code>phi1</code>).</p>
<p>This method builds the space</p>
<pre><code> V = self.parent()._p_stabilize_parent_space(p, new_base_ring)
</code></pre>
<p>and we land in the module <code>space.py</code>. To see the error, we type explicitly with our data:</p>
<pre><code>sage: phi1
Modular symbol of level 35 with values in Sym^0 (5-adic Unramified Extension Field in a defined by x^2 + x - 4)^2
sage: phi1.parent()
Space of modular symbols for Congruence Subgroup Gamma0(35) with sign 1 and values in Sym^0 (5-adic Unramified Extension Field in a defined by x^2 + x - 4)^2
sage: phi1.parent().level()
35
</code></pre>
<p>Note: It is hard to say more, some details on the mathematical part are needed. (It happens to me that finding programming errors becomes easy first after understanding the special cases. From the examples in the method giving the final error, all levels are coprime w.r.t. the submitted prime numbers.) It's all i have. Parts of the code above are adapted to the given example. Guessing the <code>new_base_ring</code> is not good enough in the given situation, also the <code>alpha</code> had to be declared explicitly. But the space construction was explicitly prohibited and i decided to stop here. (There are too few comments, book / web references in the code, i really have no more chance.)</p>
https://ask.sagemath.org/question/48037/lifting-modular-symbols-for-newform-of-level-35-at-p-5-7/?comment=50944#post-id-50944One solution would be to express the K-valued modular symbol (K = NumberField(x²+x-4)) as a K-linear combination of QQ-valued modular symbols and do the procedure for the latter ones. I'm working on this.Thu, 23 Apr 2020 09:07:44 +0200https://ask.sagemath.org/question/48037/lifting-modular-symbols-for-newform-of-level-35-at-p-5-7/?comment=50944#post-id-50944Comment by TK for <p>Here is a piece of code that pushes the computations as far as possible.</p>
<pre><code>import traceback
from sage.modular.pollack_stevens.space import ps_modsym_from_simple_modsym_space
p = 5
prec = 2
precmore = 8
A = ModularSymbols(35, 2, 1).cuspidal_submodule().new_subspace().decomposition()[1]
phi = ps_modsym_from_simple_modsym_space(A)
# sage: phi
# Modular symbol of level 35 with values in
# Sym^0(Number Field in alpha with defining polynomial x^2 + x - 4)^2
ap = phi.Tq_eigenvalue(p, prec) # this is 1 in QQ
phi1, psi1 = phi.completions (p, precmore)
R = psi1.codomain()
eps = 1
poly = PolynomialRing(R, 'x')( [p ** (k + 1) * eps, -ap, 1] )
v0, v1 = poly.roots( multiplicities=False )
if v0.valuation():
v0, v1 = v1, v0
alpha = v0
try:
phi1p = \
phi1.p_stabilize_and_lift(
p
, prec
, ap = psi1(ap)
, alpha = alpha
, check = False
, new_base_ring = R )
except Exception:
traceback.print_exc()
</code></pre>
<p>The above code delivers now the following error:</p>
<pre><code>Traceback (most recent call last):
File "<ipython-input-945-35e0bb0e7888>", line 34, in <module>
, new_base_ring = R )
File "/usr/lib/python2.7/site-packages/sage/modular/pollack_stevens/modsym.py", line 1495, in p_stabilize_and_lift
new_base_ring=new_base_ring, check=check)
File "/usr/lib/python2.7/site-packages/sage/modular/pollack_stevens/modsym.py", line 1043, in p_stabilize
V = self.parent()._p_stabilize_parent_space(p, new_base_ring)
File "/usr/lib/python2.7/site-packages/sage/modular/pollack_stevens/space.py", line 557, in _p_stabilize_parent_space
raise ValueError("the level is not prime to p")
ValueError: the level is not prime to p
</code></pre>
<p>And looking inside the module with the error, <code>/usr/lib/python2.7/site-packages/sage/modular/pollack_stevens/space.py</code> there is an intentioned check that the prime does not divide the level:</p>
<pre><code> N = self.level()
if N % p == 0:
raise ValueError("the level is not prime to p")
</code></pre>
<p>Explicitly, the road to the error is as follows.
We submit <code>phi1</code> to the method <code>p_stabilize_and_lift</code> . After some steps, the code lands in the method <code>p_stabilize</code> of this instance of the class <code>class PSModularSymbolElement_symk(PSModularSymbolElement)</code> (the instance is <code>phi1</code>).</p>
<p>This method builds the space</p>
<pre><code> V = self.parent()._p_stabilize_parent_space(p, new_base_ring)
</code></pre>
<p>and we land in the module <code>space.py</code>. To see the error, we type explicitly with our data:</p>
<pre><code>sage: phi1
Modular symbol of level 35 with values in Sym^0 (5-adic Unramified Extension Field in a defined by x^2 + x - 4)^2
sage: phi1.parent()
Space of modular symbols for Congruence Subgroup Gamma0(35) with sign 1 and values in Sym^0 (5-adic Unramified Extension Field in a defined by x^2 + x - 4)^2
sage: phi1.parent().level()
35
</code></pre>
<p>Note: It is hard to say more, some details on the mathematical part are needed. (It happens to me that finding programming errors becomes easy first after understanding the special cases. From the examples in the method giving the final error, all levels are coprime w.r.t. the submitted prime numbers.) It's all i have. Parts of the code above are adapted to the given example. Guessing the <code>new_base_ring</code> is not good enough in the given situation, also the <code>alpha</code> had to be declared explicitly. But the space construction was explicitly prohibited and i decided to stop here. (There are too few comments, book / web references in the code, i really have no more chance.)</p>
https://ask.sagemath.org/question/48037/lifting-modular-symbols-for-newform-of-level-35-at-p-5-7/?comment=50860#post-id-50860I think one does not need to $p$-stabilize when p | N: http://math.bu.edu/people/rpollack/Papers/Overconvergent_modular_symbols.pdf
However, only calling `phi1.lift` instead of `phi1.p_stabilize_and_lift` also fails.
(And sorry for my late response!)Sun, 19 Apr 2020 12:55:46 +0200https://ask.sagemath.org/question/48037/lifting-modular-symbols-for-newform-of-level-35-at-p-5-7/?comment=50860#post-id-50860