code
stringlengths
17
6.64M
class ModularSymbolsSubspace(sage.modular.modsym.space.ModularSymbolsSpace, hecke.HeckeSubmodule): '\n Subspace of ambient space of modular symbols\n ' def __init__(self, ambient_hecke_module, submodule, dual_free_module=None, check=False): "\n INPUT:\n\n\n - ``ambient_hecke_modu...
class Test(): '\n Modular symbol testing class.\n ' def __init__(self, levels=20, weights=4, onlyg0=False, onlyg1=False, onlychar=False): '\n Create a modular symbol testing object.\n\n INPUT:\n\n - levels -- list or int\n - weights -- list or int\n - onlyg0 ...
def coproduct_iterator(paire) -> Iterator[list]: '\n Return an iterator for terms in the coproduct.\n\n This is an auxiliary function.\n\n INPUT:\n\n - ``paire`` -- a pair (list of indices, end of word)\n\n OUTPUT:\n\n iterator for terms in the motivic coproduct\n\n Each term is seen as a lis...
def composition_to_iterated(w, reverse=False) -> tuple[(int, ...)]: '\n Convert a composition to a word in 0 and 1.\n\n By default, the chosen convention maps (2,3) to (1,0,1,0,0),\n respecting the reading order from left to right.\n\n The inverse map is given by :func:`iterated_to_composition`.\n\n ...
def iterated_to_composition(w, reverse=False) -> tuple[(int, ...)]: '\n Convert a word in 0 and 1 to a composition.\n\n By default, the chosen convention maps (1,0,1,0,0) to (2,3).\n\n The inverse map is given by :func:`composition_to_iterated`.\n\n EXAMPLES::\n\n sage: from sage.modular.multip...
def dual_composition(c) -> tuple[(int, ...)]: '\n Return the dual composition of ``c``.\n\n This is an involution on compositions such that associated\n multizetas are equal.\n\n INPUT:\n\n - ``c`` -- a composition\n\n OUTPUT:\n\n a composition\n\n EXAMPLES::\n\n sage: from sage.mod...
def minimize_term(w, cf): '\n Return the largest among ``w`` and the dual word of ``w``.\n\n INPUT:\n\n - ``w`` -- a word in the letters 0 and 1\n\n - ``cf`` -- a coefficient\n\n OUTPUT:\n\n (word, coefficient)\n\n The chosen order is lexicographic with 1 < 0.\n\n If the dual word is chose...
class MultizetaValues(Singleton): '\n Custom cache for numerical values of multiple zetas.\n\n Computations are performed using the PARI/GP :pari:`zetamultall` (for the\n cache) and :pari:`zetamult` (for indices/precision outside of the cache).\n\n EXAMPLES::\n\n sage: from sage.modular.multipl...
def extend_multiplicative_basis(B, n) -> Iterator: '\n Extend a multiplicative basis into a basis.\n\n This is an iterator.\n\n INPUT:\n\n - ``B`` -- function mapping integer to list of tuples of compositions\n\n - ``n`` -- an integer\n\n OUTPUT:\n\n Each term is a tuple of tuples of composit...
def Multizeta(*args): '\n Common entry point for multiple zeta values.\n\n If the argument is a sequence of 0 and 1, an element of\n :class:`Multizetas_iterated` will be returned.\n\n Otherwise, an element of :class:`Multizetas` will be returned.\n\n The base ring is `\\QQ`.\n\n EXAMPLES::\n\n ...
class Multizetas(CombinatorialFreeModule): "\n Main class for the algebra of multiple zeta values.\n\n The convention is chosen so that `\\zeta(1,2)` is convergent.\n\n EXAMPLES::\n\n sage: M = Multizetas(QQ)\n sage: x = M((2,))\n sage: y = M((4,3))\n sage: x+5*y\n ζ(2)...
class Multizetas_iterated(CombinatorialFreeModule): '\n Secondary class for the algebra of multiple zeta values.\n\n This is used to represent multiple zeta values as iterated integrals\n of the differential forms `\\omega_0 = dt/t` and `\\omega_1 = dt/(t-1)`.\n\n EXAMPLES::\n\n sage: from sage...
class All_iterated(CombinatorialFreeModule): '\n Auxiliary class for multiple zeta value as generalized iterated integrals.\n\n This is used to represent multiple zeta values as possibly\n divergent iterated integrals\n of the differential forms `\\omega_0 = dt/t` and `\\omega_1 = dt/(t-1)`.\n\n Th...
def coeff_phi(w): '\n Return the coefficient of `f_k` in the image by ``phi``.\n\n INPUT:\n\n - ``w`` -- a word in 0 and 1 with `k` letters (where `k` is odd)\n\n OUTPUT:\n\n a rational number\n\n EXAMPLES::\n\n sage: from sage.modular.multiple_zeta import coeff_phi\n sage: coeff_p...
def phi_on_multiplicative_basis(compo): '\n Compute ``phi`` on one single multiple zeta value.\n\n INPUT:\n\n - ``compo`` -- a composition (in the hardcoded multiplicative base)\n\n OUTPUT:\n\n an element in :func:`F_ring` with rational coefficients\n\n EXAMPLES::\n\n sage: from sage.modu...
def phi_on_basis(L): '\n Compute the value of phi on the hardcoded basis.\n\n INPUT:\n\n a list of compositions, each composition in the hardcoded basis\n\n This encodes a product of multiple zeta values.\n\n OUTPUT:\n\n an element in :func:`F_ring`\n\n EXAMPLES::\n\n sage: from sage.m...
def D_on_compo(k, compo): '\n Return the value of the operator `D_k` on a multiple zeta value.\n\n This is now only used as a place to keep many doctests.\n\n INPUT:\n\n - ``k`` -- an odd integer\n\n - ``compo`` -- a composition\n\n EXAMPLES::\n\n sage: from sage.modular.multiple_zeta imp...
def compute_u_on_compo(compo): '\n Compute the value of the map ``u`` on a multiple zeta value.\n\n INPUT:\n\n - ``compo`` -- a composition\n\n OUTPUT:\n\n an element of :func:`F_ring` over `\\QQ`\n\n EXAMPLES::\n\n sage: from sage.modular.multiple_zeta import compute_u_on_compo\n ...
def compute_u_on_basis(w): '\n Compute the value of ``u`` on a multiple zeta value.\n\n INPUT:\n\n - ``w`` -- a word in 0,1\n\n OUTPUT:\n\n an element of :func:`F_ring` over `\\QQ`\n\n EXAMPLES::\n\n sage: from sage.modular.multiple_zeta import compute_u_on_basis\n sage: compute_u_...
@cached_function def rho_matrix_inverse(n): '\n Return the matrix of the inverse of ``rho``.\n\n This is the matrix in the chosen bases, namely the hardcoded basis\n of multiple zeta values and the natural basis of the F ring.\n\n INPUT:\n\n - ``n`` -- an integer\n\n EXAMPLES::\n\n sage: ...
def rho_inverse(elt): '\n Return the image by the inverse of ``rho``.\n\n INPUT:\n\n - ``elt`` -- an homogeneous element of the F ring\n\n OUTPUT:\n\n a linear combination of multiple zeta values\n\n EXAMPLES::\n\n sage: from sage.modular.multiple_zeta import rho_inverse\n sage: fr...
def W_Odds(start=3): '\n Indexing set for the odd generators.\n\n This is the set of pairs\n (integer power of `f_2`, word in `s, s+2, s+4, \\ldots`)\n where `s` is the chosen odd start index.\n\n INPUT:\n\n - ``start`` -- (default: ``3``) odd start index for odd generators\n\n EXAMPLES::\n\n...
def str_to_index(x: str) -> tuple: '\n Convert a string to an index.\n\n Every letter ``"2"`` contributes to the power of `f_2`. Other letters\n are odd and define a word in `f_1, f_3, f_5, \\ldots`\n\n Usually the letters ``"2"`` form a prefix of the input.\n\n EXAMPLES::\n\n sage: from sag...
def basis_f_odd_iterator(n, start=3) -> Iterator[tuple]: '\n Return an iterator over compositions of ``n`` with odd parts.\n\n Let `s` be the chosen odd start index. The allowed parts are the\n odd integers at least equal to `s`, in the set `s,s+2,s+4,s+6,\\ldots`.\n\n This set of compositions is used...
def basis_f_iterator(n, start=3) -> Iterator[tuple]: '\n Return an iterator for decompositions of ``n`` using ``2`` and odd integers.\n\n Let `s` be the chosen odd start index. The allowed odd parts are the\n odd integers at least equal to `s`, in the set `s,s+2,s+4,s+6,\\ldots`.\n\n The means that ea...
def morphism_constructor(data: dict, start=3): '\n Build a morphism from the F-algebra to some codomain.\n\n Let `s` be the chosen odd start index.\n\n INPUT:\n\n - ``data`` -- a dictionary with integer keys containing the images of\n `f_2, f_s, f_{s+2}, f_{s+4}, \\ldots`\n\n - ``start`` -- (d...
class F_algebra(CombinatorialFreeModule): '\n Auxiliary algebra for the study of motivic multiple zeta values.\n\n INPUT:\n\n - ``R`` -- ring\n\n - ``start`` -- (default: ``3``) odd start index for odd generators\n\n EXAMPLES::\n\n sage: from sage.modular.multiple_zeta_F_algebra import F_alg...
def OverconvergentModularForms(prime, weight, radius, base_ring=QQ, prec=20, char=None): '\n Create a space of overconvergent `p`-adic modular forms of level\n `\\Gamma_0(p)`, over the given base ring. The base ring need not be a\n `p`-adic ring (the spaces we compute with typically have bases over\n ...
class OverconvergentModularFormsSpace(Module): "\n A space of overconvergent modular forms of level `\\Gamma_0(p)`,\n where `p` is a prime such that `X_0(p)` has genus 0.\n\n Elements are represented as power series, with a formal power series `F`\n corresponding to the modular form `E_k^\\ast \\times...
class OverconvergentModularFormElement(ModuleElement): "\n A class representing an element of a space of overconvergent modular forms.\n\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n sage: K.<w> = Qp(5).extension(x^7 - 5)\n sage: s = OverconvergentModularForms(5, 6, 1/21, base_ring=K).0...
def compute_G(p, F): '\n Given a power series `F \\in R[[q]]^\\times`, for some ring `R`, and an\n integer `p`, compute the quotient\n\n .. MATH::\n\n \\frac{F(q)}{F(q^p)}.\n\n Used by :func:`level1_UpGj` and by :func:`higher_level_UpGj`, with `F` equal\n to the Eisenstein series `E_{p-1}`.\...
def low_weight_bases(N, p, m, NN, weightbound): '\n Return a list of integral bases of modular forms of level `N` and (even)\n weight at most ``weightbound``, as `q`-expansions modulo `(p^m,q^{NN})`.\n\n These forms are obtained by reduction mod `p^m` from an integral basis in\n Hermite normal form (s...
def random_low_weight_bases(N, p, m, NN, weightbound): '\n Returns list of random integral bases of modular forms of level `N` and\n (even) weight at most weightbound with coefficients reduced modulo\n `(p^m,q^{NN})`.\n\n INPUT:\n\n - ``N`` -- positive integer (level).\n - ``p`` -- prime.\n -...
def low_weight_generators(N, p, m, NN): '\n Returns a list of lists of modular forms, and an even natural number.\n\n The first output is a list of lists of modular forms reduced modulo\n `(p^m,q^{NN})` which generate the `(\\ZZ / p^m \\ZZ)`-algebra of mod `p^m`\n modular forms of weight at most 8, an...
def random_solution(B, K): '\n Returns a random solution in non-negative integers to the equation `a_1 + 2\n a_2 + 3 a_3 + ... + B a_B = K`, using a greedy algorithm.\n\n Note that this is *much* faster than using\n ``WeightedIntegerVectors.random_element()``.\n\n INPUT:\n\n - ``B``, ``K`` -- no...
def ech_form(A, p): '\n Return echelon form of matrix ``A`` over the ring of integers modulo\n `p^m`, for some prime `p` and `m \\ge 1`.\n\n .. TODO::\n\n This should be moved to :mod:`sage.matrix.matrix_modn_dense` at some\n point.\n\n INPUT:\n\n - ``A`` -- matrix over ``Zmod(p^m)`` ...
def random_new_basis_modp(N, p, k, LWBModp, TotalBasisModp, elldash, bound): '\n Returns a list of lists of lists ``[j, a]`` encoding a choice of basis for\n the ith complementary space `W_i`, as explained in the documentation for the\n function :func:`complementary_spaces_modp`.\n\n INPUT:\n\n - `...
def complementary_spaces_modp(N, p, k0, n, elldash, LWBModp, bound): '\n Returns a list of lists of lists of lists ``[j, a]``. The pairs ``[j, a]``\n encode the choice of the `a`-th element in the `j`-th list of the input\n ``LWBModp``, i.e., the `a`-th element in a particular basis modulo\n `(p,q^\\t...
def complementary_spaces(N, p, k0, n, mdash, elldashp, elldash, modformsring, bound): '\n Returns a list ``Ws``, each element in which is a list ``Wi`` of\n q-expansions modulo `(p^\\text{mdash},q^\\text{elldashp})`. The list ``Wi`` is\n a basis for a choice of complementary space in level `\\Gamma_0(N)`...
def higher_level_katz_exp(p, N, k0, m, mdash, elldash, elldashp, modformsring, bound): '\n Returns a matrix `e` of size ``ell x elldashp`` over the integers modulo\n `p^\\text{mdash}`, and the Eisenstein series `E_{p-1} = 1 + .\\dots \\bmod\n (p^\\text{mdash},q^\\text{elldashp})`. The matrix `e` contains...
def compute_elldash(p, N, k0, n): '\n Returns the "Sturm bound" for the space of modular forms of level\n `\\Gamma_0(N)` and weight `k_0 + n(p-1)`.\n\n .. SEEALSO::\n\n :meth:`~sage.modular.modform.space.ModularFormsSpace.sturm_bound`\n\n INPUT:\n\n - ``p`` -- prime.\n - ``N`` -- positive...
def hecke_series_degree_bound(p, N, k, m): '\n Returns the ``Wan bound`` on the degree of the characteristic series of the\n Atkin operator on p-adic overconvergent modular forms of level\n `\\Gamma_0(N)` and weight `k` when reduced modulo `p^m`.\n\n This bound depends only upon `p, k \\pmod{p-1}`, an...
def higher_level_UpGj(p, N, klist, m, modformsring, bound, extra_data=False): '\n Return a list ``[A_k]`` of square matrices over ``IntegerRing(p^m)``\n parameterised by the weights `k` in ``klist``.\n\n The matrix `A_k` is the finite square matrix which occurs on input\n `p, k, N` and `m` in Step 6 o...
def compute_Wi(k, p, h, hj, E4, E6): '\n This function computes a list `W_i` of q-expansions, together with an\n auxiliary quantity `h^j` (see below) which is to be used on the next\n call of this function. (The precision is that of input q-expansions.)\n\n The list `W_i` is a certain subset of a basi...
def katz_expansions(k0, p, ellp, mdash, n): '\n Returns a list `e` of `q`-expansions, and the Eisenstein series `E_{p-1} = 1 +\n \\dots`, all modulo `(p^\\text{mdash},q^\\text{ellp})`. The list `e` contains\n the elements `e_{i,s}` in the Katz expansions basis in Step 3 of Algorithm\n 1 in [Lau2011]_ ...
def level1_UpGj(p, klist, m, extra_data=False): '\n Return a list `[A_k]` of square matrices over ``IntegerRing(p^m)``\n parameterised by the weights `k` in ``klist``.\n\n The matrix `A_k` is the finite square matrix which occurs on input\n `p, k` and `m` in Step 6 of Algorithm 1 in [Lau2011]_.\n\n ...
def is_valid_weight_list(klist, p): '\n This function checks that ``klist`` is a nonempty list of integers all of\n which are congruent modulo `(p-1)`. Otherwise, it will raise a ValueError.\n\n INPUT:\n\n - ``klist`` -- list of integers.\n - ``p`` -- prime.\n\n EXAMPLES::\n\n sage: from ...
def hecke_series(p, N, klist, m, modformsring=False, weightbound=6): '\n Returns the characteristic series modulo `p^m` of the Atkin operator `U_p`\n acting upon the space of p-adic overconvergent modular forms of level\n `\\Gamma_0(N)` and weight ``klist``.\n\n The input ``klist`` may also be a list ...
def WeightSpace_constructor(p, base_ring=None): '\n Construct the p-adic weight space for the given prime p.\n\n A `p`-adic weight\n is a continuous character `\\ZZ_p^\\times \\to \\CC_p^\\times`.\n These are the `\\CC_p`-points of a rigid space over `\\QQ_p`,\n which is isomorphic to a disjoint un...
class WeightSpace_class(Parent): '\n The space of `p`-adic weight-characters `\\mathcal{W} = {\\rm\n Hom}(\\ZZ_p^\\times, \\CC_p^\\times)`.\n\n This is isomorphic to a\n disjoint union of `(p-1)` open discs of radius 1 (or 2 such discs if `p =\n 2`), with the parameter on the open disc correspondin...
class WeightCharacter(Element): '\n Abstract base class representing an element of the p-adic weight space\n `Hom(\\ZZ_p^\\times, \\CC_p^\\times)`.\n ' def __init__(self, parent): '\n Initialisation function.\n\n EXAMPLES::\n\n sage: pAdicWeightSpace(17)(0)\n ...
class AlgebraicWeight(WeightCharacter): '\n A point in weight space corresponding to a locally algebraic character, of\n the form `x \\mapsto \\chi(x) x^k` where `k` is an integer and `\\chi` is a\n Dirichlet character modulo `p^n` for some `n`.\n\n TESTS::\n\n sage: w = pAdicWeightSpace(23)(12...
class ArbitraryWeight(WeightCharacter): def __init__(self, parent, w, t): '\n Create the element of p-adic weight space in the given component\n mapping 1 + p to w.\n\n Here w must be an element of a p-adic field, with finite\n precision.\n\n EXAMPLES::\n\n s...
class OverconvergentDistributions_factory(UniqueFactory): "\n Create a space of distributions.\n\n INPUT:\n\n - ``k`` -- nonnegative integer\n - ``p`` -- prime number or None\n - ``prec_cap`` -- positive integer or None\n - ``base`` -- ring or None\n - ``character`` -- a Dirichlet character o...
class Symk_factory(UniqueFactory): "\n Create the space of polynomial distributions of degree `k`\n (stored as a sequence of `k + 1` moments).\n\n INPUT:\n\n - ``k`` - (integer): the degree (degree `k` corresponds to weight `k + 2` modular forms)\n - ``base`` - (ring, default None): the base ring (...
class OverconvergentDistributions_abstract(Module): "\n Parent object for distributions. Not to be used directly, see derived\n classes :class:`Symk_class` and :class:`OverconvergentDistributions_class`.\n\n INPUT:\n\n - ``k`` -- integer; `k` is the usual modular forms weight minus 2\n - ...
class Symk_class(OverconvergentDistributions_abstract): def __init__(self, k, base, character, adjuster, act_on_left, dettwist, act_padic, implementation): '\n EXAMPLES::\n\n sage: D = sage.modular.pollack_stevens.distributions.Symk(4); D\n Sym^4 Q^2\n sage: TestSu...
class OverconvergentDistributions_class(OverconvergentDistributions_abstract): '\n The class of overconvergent distributions\n\n This class represents the module of finite approximation modules, which are finite-dimensional\n spaces with a `\\Sigma_0(N)` action which approximate the module of overconverg...
def M2Z(x): '\n Create an immutable `2 \\times 2` integer matrix from ``x``.\n\n INPUT: anything that can be converted into a `2 \\times 2` matrix.\n\n EXAMPLES::\n\n sage: from sage.modular.pollack_stevens.fund_domain import M2Z\n sage: M2Z([1,2,3,4])\n [1 2]\n [3 4]\n ...
class PollackStevensModularDomain(SageObject): "\n The domain of a modular symbol.\n\n INPUT:\n\n - ``N`` -- a positive integer, the level of the congruence subgroup\n `\\Gamma_0(N)`\n\n - ``reps`` -- a list of `2 \\times 2` matrices, the coset\n representatives of `Div^0(P^1(\\QQ))`\n\n ...
class ManinRelations(PollackStevensModularDomain): '\n This class gives a description of `Div^0(P^1(\\QQ))` as a\n `\\ZZ[\\Gamma_0(N)]`-module.\n\n INPUT:\n\n - ``N`` -- a positive integer, the level of `\\Gamma_0(N)` to work with\n\n EXAMPLES::\n\n sage: from sage.modular.pollack_stevens.fu...
def basic_hecke_matrix(a, l): '\n Return the `2 \\times 2` matrix with entries ``[1, a, 0, l]`` if ``a<l``\n and ``[l, 0, 0, 1]`` if ``a>=l``.\n\n INPUT:\n\n - `a` -- an integer or Infinity\n - ``l`` -- a prime\n\n OUTPUT:\n\n A `2 \\times 2` matrix of determinant l\n\n EXAMPLES::\n\n ...
def unimod_matrices_to_infty(r, s): "\n Return a list of matrices whose associated unimodular paths connect `0` to ``r/s``.\n\n INPUT:\n\n - ``r``, ``s`` -- rational numbers\n\n OUTPUT:\n\n - a list of matrices in `SL_2(\\ZZ)`\n\n EXAMPLES::\n\n sage: v = sage.modular.pollack_stevens.mani...
def unimod_matrices_from_infty(r, s): "\n Return a list of matrices whose associated unimodular paths connect `\\infty` to ``r/s``.\n\n INPUT:\n\n - ``r``, ``s`` -- rational numbers\n\n OUTPUT:\n\n - a list of `SL_2(\\ZZ)` matrices\n\n EXAMPLES::\n\n sage: v = sage.modular.pollack_stevens...
class ManinMap(): '\n Map from a set of right coset representatives of `\\Gamma_0(N)` in\n `SL_2(\\ZZ)` to a coefficient module that satisfies the Manin\n relations.\n\n INPUT:\n\n - ``codomain`` -- coefficient module\n - ``manin_relations`` -- a :class:`sage.modular.pollack_stevens.fund_domain....
def _iterate_Up(Phi, p, M, ap, q, aq, check): "\n Return an overconvergent Hecke-eigensymbol lifting self -- self must be a\n `p`-ordinary eigensymbol\n\n INPUT:\n\n - ``p`` -- prime\n\n - ``M`` -- integer equal to the number of moments\n\n - ``ap`` -- Hecke eigenvalue at `p`\n\n - ``q`` -- p...
class PSModSymAction(Action): def __init__(self, actor, MSspace): "\n Create the action\n\n EXAMPLES::\n\n sage: E = EllipticCurve('11a')\n sage: phi = E.pollack_stevens_modular_symbol()\n sage: g = phi._map._codomain._act._Sigma0(matrix(ZZ,2,2,[1,2,3,4]))\n...
class PSModularSymbolElement(ModuleElement): def __init__(self, map_data, parent, construct=False): "\n Initialize a modular symbol\n\n EXAMPLES::\n\n sage: E = EllipticCurve('37a')\n sage: phi = E.pollack_stevens_modular_symbol()\n " ModuleElement.__ini...
class PSModularSymbolElement_symk(PSModularSymbolElement): def _find_alpha(self, p, k, M=None, ap=None, new_base_ring=None, ordinary=True, check=True, find_extraprec=True): "\n Find `\\alpha`, a `U_p` eigenvalue, which is found as a root of\n the polynomial `x^2 - a_p * x + p^{k+1} \\chi(p)...
class PSModularSymbolElement_dist(PSModularSymbolElement): def reduce_precision(self, M): '\n Only hold on to `M` moments of each value of self\n\n EXAMPLES::\n\n sage: D = OverconvergentDistributions(0, 5, 10)\n sage: M = PollackStevensModularSymbols(Gamma0(5), coeffi...
class pAdicLseries(SageObject): '\n The `p`-adic `L`-series associated to an overconvergent eigensymbol.\n\n INPUT:\n\n - ``symb`` -- an overconvergent eigensymbol\n - ``gamma`` -- topological generator of `1 + p\\ZZ_p`\n (default: `1+p` or 5 if `p=2`)\n - ``quadratic_twist`` -- conductor of q...
def log_gamma_binomial(p, gamma, n, M): '\n Return the list of coefficients in the power series\n expansion (up to precision `M`) of `\\binom{\\log_p(z)/\\log_p(\\gamma)}{n}`\n\n INPUT:\n\n - ``p`` -- prime\n - ``gamma`` -- topological generator, e.g. `1+p`\n - ``n`` -- nonnegative integer\n ...
class Sigma0ActionAdjuster(UniqueRepresentation): @abstract_method def __call__(self, x): '\n Given a :class:`Sigma0element` ``x``, return four integers.\n\n This is used to allow for other conventions for the action of Sigma0\n on the space of distributions.\n\n EXAMPLES:...
class _default_adjuster(Sigma0ActionAdjuster): '\n A callable object that does nothing to a matrix, returning its entries\n in the natural, by-row, order.\n\n INPUT:\n\n - ``g`` -- a `2 \times 2` matrix\n\n OUTPUT:\n\n - a 4-tuple consisting of the entries of the matrix\n\n EXAMPLES::\n\n ...
class Sigma0_factory(UniqueFactory): '\n Create the monoid of non-singular matrices, upper triangular mod `N`.\n\n INPUT:\n\n - ``N`` (integer) -- the level (should be strictly positive)\n - ``base_ring`` (commutative ring, default `\\ZZ`) -- the base\n ring (normally `\\ZZ` or a `p`-adic ring)\n...
class Sigma0Element(MonoidElement): '\n An element of the monoid Sigma0. This is a wrapper around a `2 \\times 2` matrix.\n\n EXAMPLES::\n\n sage: from sage.modular.pollack_stevens.sigma0 import Sigma0\n sage: S = Sigma0(7)\n sage: g = S([2,3,7,1])\n sage: g.det()\n -19\n ...
class _Sigma0Embedding(Morphism): '\n A Morphism object giving the natural inclusion of `\\Sigma_0` into the\n appropriate matrix space. This snippet of code is fed to the coercion\n framework so that "x * y" will work if ``x`` is a matrix and ``y`` is a `\\Sigma_0`\n element (returning a matrix, *not...
class Sigma0_class(Parent): '\n The class representing the monoid `\\Sigma_0(N)`.\n\n EXAMPLES::\n\n sage: from sage.modular.pollack_stevens.sigma0 import Sigma0\n sage: S = Sigma0(5); S\n Monoid Sigma0(5) with coefficients in Integer Ring\n sage: S([1,2,1,1])\n Traceback ...
class PollackStevensModularSymbols_factory(UniqueFactory): '\n Create a space of Pollack-Stevens modular symbols.\n\n INPUT:\n\n - ``group`` -- integer or congruence subgroup\n\n - ``weight`` -- integer `\\ge 0`, or ``None``\n\n - ``sign`` -- integer; -1, 0, 1\n\n - ``base_ring`` -- ring or ``N...
class PollackStevensModularSymbolspace(Module): "\n A class for spaces of modular symbols that use Glenn Stevens' conventions.\n This class should not be instantiated directly by the user: this is handled\n by the factory object :class:`PollackStevensModularSymbols_factory`.\n\n INPUT:\n\n - ``grou...
def cusps_from_mat(g): "\n Return the cusps associated to an element of a congruence subgroup.\n\n INPUT:\n\n - ``g`` -- an element of a congruence subgroup or a matrix\n\n OUTPUT:\n\n A tuple of cusps associated to ``g``.\n\n EXAMPLES::\n\n sage: from sage.modular.pollack_stevens.space i...
def ps_modsym_from_elliptic_curve(E, sign=0, implementation='eclib'): "\n Return the overconvergent modular symbol associated to\n an elliptic curve defined over the rationals.\n\n INPUT:\n\n - ``E`` -- an elliptic curve defined over the rationals\n\n - ``sign`` -- the sign (default: 0). If nonzero...
def ps_modsym_from_simple_modsym_space(A, name='alpha'): "\n Returns some choice -- only well defined up a nonzero scalar (!) -- of an overconvergent modular symbol that corresponds to ``A``.\n\n INPUT:\n\n - ``A`` -- nonzero simple Hecke equivariant new space of modular symbols,\n which need not be...
class QuasiModularFormsElement(ModuleElement): '\n A quasimodular forms ring element. Such an element is describbed by SageMath\n as a polynomial\n\n .. MATH::\n\n f_0 + f_1 E_2 + f_2 E_2^2 + \\cdots + f_m E_2^m\n\n where each `f_i` a graded modular form element\n (see :class:`~sage.modular....
class QuasiModularForms(Parent, UniqueRepresentation): '\n The graded ring of quasimodular forms for the full modular group\n `\\SL_2(\\ZZ)`, with coefficients in a ring.\n\n EXAMPLES::\n\n sage: QM = QuasiModularForms(1); QM\n Ring of Quasimodular Forms for Modular Group SL(2,Z) over Ratio...
def BrandtModule(N, M=1, weight=2, base_ring=QQ, use_cache=True): '\n Return the Brandt module of given weight associated to the prime\n power `p^r` and integer `M`, where `p` and `M` are coprime.\n\n INPUT:\n\n - `N` -- a product of primes with odd exponents\n - `M` -- an integer coprime to `q` (d...
def class_number(p, r, M): '\n Return the class number of an order of level `N = p^r M` in the\n quaternion algebra over `\\QQ` ramified precisely at `p` and infinity.\n\n This is an implementation of Theorem 1.12 of [Piz1980]_.\n\n INPUT:\n\n - `p` -- a prime\n - `r` -- an odd positive integer ...
def maximal_order(A): "\n Return a maximal order in the quaternion algebra ramified\n at `p` and infinity.\n\n This is an implementation of Proposition 5.2 of [Piz1980]_.\n\n INPUT:\n\n - `A` -- quaternion algebra ramified precisely at `p` and infinity\n\n OUTPUT:\n\n a maximal order in `A`\n...
def basis_for_left_ideal(R, gens): '\n Return a basis for the left ideal of `R` with given generators.\n\n INPUT:\n\n - `R` -- quaternion order\n - ``gens`` -- list of elements of `R`\n\n OUTPUT:\n\n list of four elements of `R`\n\n EXAMPLES::\n\n sage: B = BrandtModule(17); A = B.quat...
def right_order(R, basis): '\n Given a basis for a left ideal `I`, return the right order in the\n quaternion order `R` of elements `x` such that `I x` is contained in `I`.\n\n INPUT:\n\n - `R` -- order in quaternion algebra\n - ``basis`` -- basis for an ideal `I`\n\n OUTPUT:\n\n order in qua...
def quaternion_order_with_given_level(A, level): '\n Return an order in the quaternion algebra A with given level.\n\n This is implemented only when the base field is the rational numbers.\n\n INPUT:\n\n - ``level`` -- The level of the order to be returned. Currently this\n is only implemented wh...
class BrandtSubmodule(HeckeSubmodule): def _repr_(self): "\n Return string representation of this Brandt submodule.\n\n EXAMPLES::\n\n sage: BrandtModule(11)[0]._repr_()\n 'Subspace of dimension 1 of Brandt module of dimension 2 of level 11 of weight 2 over Rational Fi...
class BrandtModuleElement(HeckeModuleElement): def __init__(self, parent, x): '\n EXAMPLES::\n\n sage: B = BrandtModule(37)\n sage: x = B([1,2,3]); x\n (1, 2, 3)\n sage: parent(x)\n Brandt module of dimension 3 of level 37 of weight 2 over Rat...
@richcmp_method class BrandtModule_class(AmbientHeckeModule): '\n A Brandt module.\n\n EXAMPLES::\n\n sage: BrandtModule(3, 10)\n Brandt module of dimension 4 of level 3*10 of weight 2 over Rational Field\n ' def __init__(self, N, M, weight, base_ring): '\n INPUT:\n\n ...
def benchmark_magma(levels, silent=False): "\n INPUT:\n\n - ``levels`` -- list of pairs `(p,M)` where `p` is a prime not\n dividing `M`\n - ``silent`` -- bool, default ``False``; if ``True`` suppress\n printing during computation\n\n OUTPUT:\n\n list of 4-tuples ('magma', p, M, tm), where...
def benchmark_sage(levels, silent=False): "\n INPUT:\n\n - ``levels`` -- list of pairs `(p,M)` where `p` is a prime\n not dividing `M`\n - ``silent`` -- bool, default ``False``; if ``True`` suppress\n printing during computation\n\n OUTPUT:\n\n list of 4-tuples ('sage', p, M, tm), where t...
def Phi2_quad(J3, ssJ1, ssJ2): "\n Return a certain quadratic polynomial over a finite\n field in indeterminate J3.\n\n The roots of the polynomial along with ssJ1 are the\n neighboring/2-isogenous supersingular j-invariants of ssJ2.\n\n INPUT:\n\n - ``J3`` -- indeterminate of a univariate polyn...
def Phi_polys(L, x, j): "\n Return a certain polynomial of degree `L+1` in the\n indeterminate x over a finite field.\n\n The roots of the **modular** polynomial `\\Phi(L, x, j)` are the\n `L`-isogenous supersingular j-invariants of j.\n\n INPUT:\n\n - ``L`` -- integer\n\n - ``x`` -- indeterm...
def dimension_supersingular_module(prime, level=1): '\n Return the dimension of the Supersingular module, which is\n equal to the dimension of the space of modular forms of weight `2`\n and conductor equal to ``prime`` times ``level``.\n\n INPUT:\n\n - ``prime`` -- integer, prime\n\n - ``level``...
def supersingular_D(prime): "\n Return a fundamental discriminant `D` of an\n imaginary quadratic field, where the given prime does not split.\n\n See Silverman's Advanced Topics in the Arithmetic of Elliptic\n Curves, page 184, exercise 2.30(d).\n\n INPUT:\n\n - prime -- integer, prime\n\n O...