Skip to content

minor details in modular/ #40409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 25, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
minor details in modular/
  • Loading branch information
fchapoton committed Jul 13, 2025
commit a737aadf0090be36410bc0c9ce4eaf974813f281
4 changes: 1 addition & 3 deletions src/sage/modular/abvar/abvar.py
Original file line number Diff line number Diff line change
Expand Up @@ -4452,19 +4452,17 @@ def decomposition(self, simple=True, bound=None):
D = []
for N in reversed(divisors(M)):
if N > 1:
isogeny_number = 0
A = amb.modular_symbols_of_level(N).cuspidal_subspace().new_subspace()
if bound is None:
X = factor_new_space(A)
else:
X = A.decomposition(bound=bound)
for B in X:
for isogeny_number, B in enumerate(X):
D.extend(ModularAbelianVariety_modsym(B.degeneracy_map(M, t).image(),
is_simple=True, newform_level=(N, G),
isogeny_number=isogeny_number,
number=(t, M))
for t in divisors(M // N))
isogeny_number += 1
elif A == amb.cuspidal_submodule():
D = [ModularAbelianVariety_modsym(B)
for B in A.decomposition(bound=bound)]
Expand Down
13 changes: 6 additions & 7 deletions src/sage/modular/btquotients/btquotient.py
Original file line number Diff line number Diff line change
Expand Up @@ -2916,29 +2916,28 @@ def _get_hecke_data(self, l):
if prod([self._character(ZZ((v * Matrix(ZZ, 4, 1, g))[0, 0]))
/ self._character(p ** (nninc // 2))
for v in self.get_extra_embedding_matrices()]) == 1]
n_iters = 0

def enumerate_words(v, n=None):
if n is None:
n = []
while True:
add_new = True
for jj in range(len(n)):
n[jj] += 1
if n[jj] != len(v):
for j in range(len(n)):
n[j] += 1
if n[j] != len(v):
add_new = False
break
else:
n[jj] = 0
n[j] = 0
if add_new:
n.append(0)
yield [v[x] for x in n]

for wd in enumerate_words([self._conv(x) for x in letters]):
conv_list = [self._conv(x) for x in letters]
for n_iters, wd in enumerate(enumerate_words(conv_list)):
if len(T) == l + 1:
break
v = prod(wd)
n_iters += 1
v0 = v * alpha0
vinv = self.get_quaternion_algebra()(v0 ** (-1))
new = True
Expand Down
4 changes: 2 additions & 2 deletions src/sage/modular/modform/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -3808,8 +3808,8 @@ def _mul_(self, other):
f_other = other._forms_dictionary
f_mul = defaultdict(int)

for k_self in f_self.keys():
for k_other in f_other.keys():
for k_self in f_self:
for k_other in f_other:
f_mul[k_self + k_other] += f_self[k_self] * f_other[k_other]

return GM(self.parent(), f_mul)
Expand Down
8 changes: 2 additions & 6 deletions src/sage/modular/modsym/ambient.py
Original file line number Diff line number Diff line change
Expand Up @@ -980,16 +980,14 @@ def _compute_hecke_matrix_prime(self, p, rows=None):
K = self.base_ring()
W = R.new_matrix(nrows=len(B), ncols=R.nrows())
syms = self.manin_symbols()
j = 0
for i in B:
for j, i in enumerate(B):
for h in H:
entries = syms.apply(i, h)
for k, x in entries:
f, s = mod2term[k]
if s:
# W[j,f] = W[j,f] + s*K(x)
W.add_to_entry(j, f, s * K(x))
j += 1
tm = verbose("start matrix multiply", tm)
if hasattr(W, '_matrix_times_matrix_dense'):
Tp = W._matrix_times_matrix_dense(R)
Expand Down Expand Up @@ -2937,9 +2935,8 @@ def _compute_hecke_matrix_prime(self, p, rows=None):
mod2term = self._mod2term
R = self.manin_gens_to_basis()
W = R.new_matrix(nrows=len(B), ncols=R.nrows()) # the 0 with given number of rows and cols.
j = 0
tm = verbose("Matrix non-reduced", tm)
for i in B:
for j, i in enumerate(B):
# The following step is where most of the time is spent.
c, d = P1[i]
v = H.apply(c, d, N)
Expand All @@ -2960,7 +2957,6 @@ def _compute_hecke_matrix_prime(self, p, rows=None):
f, s = mod2term[k]
if s != 0:
W[j, f] = W[j, f] + s*m
j += 1
tm = verbose("done making non-reduced matrix", tm)
verbose("start matrix-matrix (%s x %s) times (%s x %s) multiply to get Tp" % (W.nrows(), W.ncols(),
R.nrows(), R.ncols()))
Expand Down
2 changes: 1 addition & 1 deletion src/sage/modular/quasimodform/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ def homogeneous_components(self):
for i, c in enumerate(self._polynomial.coefficients(sparse=False)):
if c:
forms = c._forms_dictionary
for k in forms.keys():
for k in forms:
try:
components[ZZ(k + 2*i)] += QM(forms[k]*(E2**i))
except KeyError:
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy