code
stringlengths
17
6.64M
def _check_issue_number(issue_number): "\n Check that the argument is likely to be a valid github issue number.\n\n INPUT:\n\n - ``issue_number`` -- anything.\n\n OUTPUT:\n\n This function returns nothing. A ``ValueError`` or ``TypeError`` is\n raised if the argument cannot be a valid issue numb...
def deprecation(issue_number, message, stacklevel=4): "\n Issue a deprecation warning.\n\n INPUT:\n\n - ``issue_number`` -- integer. The github issue number where the\n deprecation is introduced.\n\n - ``message`` -- string. An explanation why things are deprecated\n and by what it should be...
def deprecation_cython(issue_number, message, stacklevel=3): '\n Issue a deprecation warning -- for use in cython functions\n\n TESTS:\n\n We check that `deprecation_cython` in a cython function generates a warning\n with the same callsite reference as `deprecation` in a python function, whereas\n ...
def warning(issue_number, message, warning_class=Warning, stacklevel=3): "\n Issue a warning.\n\n INPUT:\n\n - ``issue_number`` -- integer. The github issue number where the\n deprecation is introduced.\n\n - ``message`` -- string. An explanation what is going on.\n\n - ``warning_class`` -- (d...
def experimental_warning(issue_number, message, stacklevel=4): "\n Issue a warning that the functionality or class is experimental\n and might change in future.\n\n INPUT:\n\n - ``issue_number`` -- an integer. The github issue number where the\n experimental functionality was introduced.\n\n -...
class experimental(): def __init__(self, issue_number, stacklevel=4): '\n A decorator which warns about the experimental/unstable status of\n the decorated class/method/function.\n\n INPUT:\n\n - ``issue_number`` -- an integer. The github issue number where this\n cod...
class __experimental_self_test(): '\n This is a class only to demonstrate with a doc-test that the @experimental\n decorator only issues a warning message once (see :trac:`20601`).\n\n The test below does not issue a warning message because that warning has\n already been issued by a previous doc-test...
class DeprecatedFunctionAlias(): '\n A wrapper around methods or functions which automatically prints a\n deprecation message. See :func:`deprecated_function_alias`.\n\n AUTHORS:\n\n - Florent Hivert (2009-11-23), with the help of Mike Hansen.\n - Luca De Feo (2011-07-11), printing the full module ...
def deprecated_function_alias(issue_number, func): '\n Create an aliased version of a function or a method which raises a\n deprecation warning message.\n\n If f is a function or a method, write\n ``g = deprecated_function_alias(issue_number, f)``\n to make a deprecated aliased version of f.\n\n ...
class table(SageObject): '\n Display a rectangular array as a table, either in plain text, LaTeX,\n or html.\n\n INPUT:\n\n - ``rows`` (default ``None``) - a list of lists (or list of tuples,\n etc.), containing the data to be displayed.\n - ``columns`` (default ``None``) - a list of lists (et...
def tmp_dir(name='dir_', ext=''): '\n Create and return a temporary directory in\n ``$HOME/.sage/temp/hostname/pid/``\n\n The temporary directory is deleted automatically when Sage exits.\n\n INPUT:\n\n - ``name`` -- (default: ``"dir_"``) A prefix for the directory name.\n\n - ``ext`` -- (defaul...
def tmp_filename(name='tmp_', ext=''): '\n Create and return a temporary file in\n ``$HOME/.sage/temp/hostname/pid/``\n\n The temporary file is deleted automatically when Sage exits.\n\n .. warning::\n\n If you need a particular file extension always use\n ``tmp_filename(ext=".foo")``, t...
class atomic_write(): '\n Write to a given file using a temporary file and then rename it\n to the target file. This renaming should be atomic on modern\n operating systems. Therefore, this class can be used to avoid race\n conditions when a file might be read while it is being written.\n It also a...
class atomic_dir(): '\n Write to a given directory using a temporary directory and then rename it\n to the target directory. This is for creating a directory whose contents\n are determined uniquely by the directory name. If multiple threads or\n processes attempt to create it in parallel, then it doe...
def spyx_tmp(): '\n The temporary directory used to store pyx files.\n\n We cache the result of this function "by hand" so that the same\n temporary directory will always be returned. A function is used to\n delay creating a directory until (if) it is needed. The temporary\n directory is removed wh...
class bar(): pass
def metaclass(name, bases): '\n Creates a new class in this metaclass\n\n INPUT:\n\n - name -- a string\n - bases -- a tuple of classes\n\n EXAMPLES::\n\n sage: from sage.misc.test_class_pickling import metaclass, bar\n sage: c = metaclass("foo2", (bar, object))\n constructing ...
class Metaclass(type): '\n This metaclass illustrates the customization of how a class is pickled.\n It requires a slightly patched version of cPickle.\n\n See:\n\n - https://docs.python.org/3/library/copyreg.html#module-copyreg\n - http://groups.google.com/group/comp.lang.python/browse_thread/thre...
class TestParent1(Parent): def __init__(self): '\n EXAMPLES::\n\n sage: sage.misc.test_nested_class.TestParent1()\n <sage.misc.test_nested_class.TestParent1_with_category object at ...>\n ' from sage.categories.sets_cat import Sets Parent.__init__(self,...
class TestParent2(Parent, metaclass=NestedClassMetaclass): def __init__(self): '\n EXAMPLES::\n\n sage: sage.misc.test_nested_class.TestParent2()\n Traceback (most recent call last):\n ...\n TypeError: metaclass conflict: the metaclass of a derived class...
class TestParent3(UniqueRepresentation, Parent): def __init__(self): '\n EXAMPLES::\n\n sage: sage.misc.test_nested_class.TestParent3()\n <sage.misc.test_nested_class.TestParent3_with_category object at ...>\n ' from sage.categories.sets_cat import Sets ...
class TestParent4(Parent, metaclass=ClasscallMetaclass): def __init__(self): '\n EXAMPLES::\n\n sage: sage.misc.test_nested_class.TestParent4()\n <sage.misc.test_nested_class.TestParent4_with_category object at ...>\n ' from sage.categories.sets_cat import Sets...
class B(): '\n A normal external class.\n ' pass
class ABB(): class B(): "\n This class is broken and can't be pickled.\n A warning is emmited during compilation.\n " pass
class ABL(): '\n There is no problem here.\n ' B = B
class ALB(): "\n There is a nested class just below. Which can't be properly sphinxed.\n " class C(): '\n Internal C class.\n\n Thanks to the links below this class is pickled ok.\n But it is sphinxed wrong: It is typeset as a link to an outer class.\n ' pass...
class ABBMeta(metaclass=NestedClassMetaclass): class B(): '\n B interne\n ' pass
class ABLMeta(metaclass=NestedClassMetaclass): B = B
class ALBMeta(metaclass=NestedClassMetaclass): '\n There is a nested class just below which is properly sphinxed.\n ' class CMeta(): '\n B interne\n ' pass
class TestNestedParent(UniqueRepresentation, Parent): '\n This is a dummy for testing source inspection of nested classes.\n\n See the test in ``sage.misc.sageinspect.sage_getsourcelines``.\n ' class Element(): 'This is a dummy element class' pass
def cputime(t=0, subprocesses=False): '\n Return the time in CPU seconds since Sage started, or with\n optional argument ``t``, return the time since ``t``. This is how\n much time Sage has spent using the CPU. If ``subprocesses=False``\n this does not count time spent in subprocesses spawned by Sage...
class GlobalCputime(): "\n Container for CPU times of subprocesses.\n\n AUTHOR:\n\n - Martin Albrecht - (2008-12): initial version\n\n EXAMPLES:\n\n Objects of this type are returned if ``subprocesses=True`` is\n passed to :func:`cputime`::\n\n sage: cputime(subprocesses=True) # in...
def walltime(t=0): '\n Return the wall time in second, or with optional argument ``t``, return\n the wall time since time ``t``. "Wall time" means the time on a wall\n clock, i.e., the actual time.\n\n INPUT:\n\n\n - ``t`` -- (optional) float, time in CPU seconds\n\n OUTPUT:\n\n - ``float``...
def trace(code, preparse=True): '\n Evaluate Sage code using the interactive tracer and return the\n result. The string ``code`` must be a valid expression\n enclosed in quotes (no assignments - the result of the expression\n is returned). In the Sage notebook this just raises a\n NotImplementedExc...
class UnknownError(TypeError): '\n Raised whenever :class:`Unknown` is used in a boolean operation.\n\n EXAMPLES::\n\n sage: not Unknown\n Traceback (most recent call last):\n ...\n UnknownError: Unknown does not evaluate in boolean context\n ' pass
@richcmp_method class UnknownClass(UniqueRepresentation): '\n The Unknown truth value\n\n The ``Unknown`` object is used in Sage in several places as return value\n in addition to ``True`` and ``False``, in order to signal uncertainty\n about or inability to compute the result. ``Unknown`` can be iden...
def verbose(mesg='', t=0, level=1, caller_name=None): '\n Print a message if the current verbosity is at least level.\n\n INPUT:\n\n\n - ``mesg`` - str, a message to print\n\n - ``t`` - int, optional, if included, will also print\n cputime(t), - which is the time since time t. Thus t should ha...
def set_verbose(level, files='all'): '\n Set the global Sage verbosity level.\n\n INPUT:\n\n - ``level`` -- an integer between 0 and 2, inclusive.\n\n - ``files`` (default: \'all\'): list of files to make verbose, or\n \'all\' to make ALL files verbose (the default).\n\n OUTPUT: changes the s...
def set_verbose_files(file_name): '\n\n ' if (not isinstance(file_name, list)): file_name = [file_name] global verbose_files verbose_files = file_name
def get_verbose_files(): '\n\n ' return verbose_files
def unset_verbose_files(file_name): '\n\n ' if (not isinstance(file_name, list)): file_name = [file_name] for X in file_name: verbose_files.remove(X)
def get_verbose(): '\n Return the global Sage verbosity level.\n\n INPUT: int level: an integer between 0 and 2, inclusive.\n\n OUTPUT: changes the state of the verbosity flag.\n\n EXAMPLES::\n\n sage: get_verbose()\n 0\n sage: set_verbose(2)\n sage: get_verbose()\n ...
def default_viewer(viewer=None): "\n Set up default programs for opening web pages, PDFs, PNGs, and DVI files.\n\n INPUT:\n\n - ``viewer``: ``None`` or a string: one of 'browser', 'pdf', 'png',\n 'dvi' -- return the name of the corresponding program. ``None``\n is treated the same as 'browser'...
class Viewer(SageObject): "\n Set defaults for various viewing applications: a web browser, a\n dvi viewer, a pdf viewer, and a png viewer.\n\n EXAMPLES::\n\n sage: from sage.misc.viewer import viewer\n sage: old_browser = viewer.browser() # indirect doctest\n sage: viewer.browser('...
def browser(): "\n Return the program used to open a web page. By default, the\n program used depends on the platform and other factors, like\n settings of certain environment variables. To use a different\n program, call ``viewer.browser('PROG')``, where 'PROG' is the\n desired program.\n\n E...
def dvi_viewer(): "\n Return the program used to display a dvi file. By default, the\n program used depends on the platform and other factors, like\n settings of certain environment variables. To use a different\n program, call ``viewer.dvi_viewer('PROG')``, where 'PROG' is the\n desired program....
def pdf_viewer(): "\n Return the program used to display a pdf file. By default, the\n program used depends on the platform and other factors, like\n settings of certain environment variables. To use a different\n program, call ``viewer.pdf_viewer('PROG')``, where 'PROG' is the\n desired program....
def png_viewer(): "\n Return the program used to display a png file. By default, the\n program used depends on the platform and other factors, like\n settings of certain environment variables. To use a different\n program, call ``viewer.png_viewer('PROG')``, where 'PROG' is the\n desired program.\...
def is_ModularAbelianVariety(x) -> bool: "\n Return True if x is a modular abelian variety.\n\n INPUT:\n\n - ``x`` - object\n\n EXAMPLES::\n\n sage: from sage.modular.abvar.abvar import is_ModularAbelianVariety\n sage: is_ModularAbelianVariety(5)\n False\n sage: is_Modular...
@richcmp_method class ModularAbelianVariety_abstract(Parent): def __init__(self, groups, base_field, is_simple=None, newform_level=None, isogeny_number=None, number=None, check=True): "\n Abstract base class for modular abelian varieties.\n\n INPUT:\n\n\n - ``groups`` - a tuple of c...
class ModularAbelianVariety(ModularAbelianVariety_abstract): def __init__(self, groups, lattice=None, base_field=QQ, is_simple=None, newform_level=None, isogeny_number=None, number=None, check=True): '\n Create a modular abelian variety with given level and base field.\n\n INPUT:\n\n\n ...
class ModularAbelianVariety_modsym_abstract(ModularAbelianVariety_abstract): def _modular_symbols(self): "\n Return the space of modular symbols corresponding to this modular\n symbols abelian variety.\n\n EXAMPLES: This function is in the abstract base class, so it raises\n a...
class ModularAbelianVariety_modsym(ModularAbelianVariety_modsym_abstract): def __init__(self, modsym, lattice=None, newform_level=None, is_simple=None, isogeny_number=None, number=None, check=True): '\n Modular abelian variety that corresponds to a Hecke stable space of\n cuspidal modular s...
def sqrt_poly(f): '\n Return the square root of the polynomial `f`.\n\n .. note::\n\n At some point something like this should be a member of the\n polynomial class. For now this is just used internally by some\n charpoly functions above.\n\n EXAMPLES::\n\n sage: R.<x> = QQ[]\...
def random_hecke_operator(M, t=None, p=2): '\n Return a random Hecke operator acting on `M`, got by adding\n to `t` a random multiple of `T_p`\n\n INPUT:\n\n\n - ``M`` - modular symbols space\n\n - ``t`` - None or a Hecke operator\n\n - ``p`` - a prime\n\n\n OUTPUT: Hecke operator prime\n\...
def factor_new_space(M): '\n Given a new space `M` of modular symbols, return the\n decomposition into simple of `M` under the Hecke\n operators.\n\n INPUT:\n\n\n - ``M`` - modular symbols space\n\n\n OUTPUT: list of factors\n\n EXAMPLES::\n\n sage: M = ModularSymbols(37).cuspidal_sub...
def factor_modsym_space_new_factors(M): '\n Return the factorizations of all the new subspaces of `M`.\n\n INPUT:\n\n - ``M`` -- ambient modular symbols space\n\n OUTPUT: list of decompositions corresponding to each new space.\n\n EXAMPLES::\n\n sage: M = ModularSymbols(33)\n sage: sa...
def simple_factorization_of_modsym_space(M, simple=True): '\n Return the canonical factorization of `M` into (simple) subspaces.\n\n INPUT:\n\n - ``M`` -- ambient modular symbols space\n\n - ``simple`` -- boolean (default: ``True``); if set to ``False``,\n isogenous simple factors are grouped tog...
def modsym_lattices(M, factors): '\n Append lattice information to the output of\n simple_factorization_of_modsym_space.\n\n INPUT:\n\n\n - ``M`` - modular symbols spaces\n\n - ``factors`` - Sequence\n (simple_factorization_of_modsym_space)\n\n\n OUTPUT: sequence with more information fo...
def ModAbVar_ambient_jacobian(group): '\n Return the ambient Jacobian attached to a given congruence\n subgroup.\n\n The result is cached using a weakref. This function is called\n internally by modular abelian variety constructors.\n\n INPUT:\n\n\n - ``group`` - a congruence subgroup.\n\n\n ...
class ModAbVar_ambient_jacobian_class(ModularAbelianVariety_modsym_abstract): '\n An ambient Jacobian modular abelian variety attached to a\n congruence subgroup.\n ' def __init__(self, group): "\n Create an ambient Jacobian modular abelian variety.\n\n EXAMPLES::\n\n ...
class ModularAbelianVariety_newform(ModularAbelianVariety_modsym_abstract): '\n A modular abelian variety attached to a specific newform.\n ' def __init__(self, f, internal_name=False): "\n Create the modular abelian variety `A_f` attached to the\n newform `f`.\n\n INPUT:\n...
def _get(key): "\n Returns the cached abelian variety with given key. This is used\n internally by the abelian varieties constructor.\n\n INPUT:\n\n\n - ``key`` - hashable\n\n\n EXAMPLES::\n\n sage: sage.modular.abvar.constructor._saved('a', J0(37))\n Abelian variety J0(37) of dimens...
def _saved(key, J): "\n Returns the cached abelian variety with given key. This is used\n internally by the abelian varieties constructor.\n\n INPUT:\n\n\n - ``key`` - hashable\n\n - ``J`` - modular abelian variety\n\n\n OUTPUT:\n\n\n - ``J`` - returns the modabvar, to make code that uses\...
def J0(N): '\n Return the Jacobian `J_0(N)` of the modular curve\n `X_0(N)`.\n\n EXAMPLES::\n\n sage: J0(389)\n Abelian variety J0(389) of dimension 32\n\n The result is cached::\n\n sage: J0(33) is J0(33)\n True\n ' key = ('J0(%s)' % N) try: return _get(...
def J1(N): '\n Return the Jacobian `J_1(N)` of the modular curve\n `X_1(N)`.\n\n EXAMPLES::\n\n sage: J1(389)\n Abelian variety J1(389) of dimension 6112\n ' key = ('J1(%s)' % N) try: return _get(key) except ValueError: from sage.modular.arithgroup.all import ...
def JH(N, H): '\n Return the Jacobian `J_H(N)` of the modular curve\n `X_H(N)`.\n\n EXAMPLES::\n\n sage: JH(389,[16])\n Abelian variety JH(389,[16]) of dimension 64\n ' key = ('JH(%s,%s)' % (N, H)) try: return _get(key) except ValueError: from sage.modular.ari...
def AbelianVariety(X): "\n Create the abelian variety corresponding to the given defining\n data.\n\n INPUT:\n\n\n - ``X`` - an integer, string, newform, modsym space,\n congruence subgroup or tuple of congruence subgroups\n\n\n OUTPUT: a modular abelian variety\n\n EXAMPLES::\n\n ...
class CuspidalSubgroup_generic(FiniteSubgroup): def _compute_lattice(self, rational_only=False, rational_subgroup=False): '\n Return a list of vectors that define elements of the rational\n homology that generate this finite subgroup.\n\n INPUT:\n\n\n - ``rational_only`` - bo...
class CuspidalSubgroup(CuspidalSubgroup_generic): '\n EXAMPLES::\n\n sage: a = J0(65)[2]\n sage: t = a.cuspidal_subgroup()\n sage: t.order()\n 6\n ' def _repr_(self): "\n String representation of the cuspidal subgroup.\n\n EXAMPLES::\n\n sage...
class RationalCuspSubgroup(CuspidalSubgroup_generic): '\n EXAMPLES::\n\n sage: a = J0(65)[2]\n sage: t = a.rational_cusp_subgroup()\n sage: t.order()\n 6\n ' def _repr_(self): "\n String representation of the cuspidal subgroup.\n\n EXAMPLES::\n\n ...
class RationalCuspidalSubgroup(CuspidalSubgroup_generic): '\n EXAMPLES::\n\n sage: a = J0(65)[2]\n sage: t = a.rational_cuspidal_subgroup()\n sage: t.order()\n 6\n ' def _repr_(self): "\n String representation of the cuspidal subgroup.\n\n EXAMPLES::\n\...
def is_rational_cusp_gamma0(c, N, data): "\n Return True if the rational number c is a rational cusp of level N.\n\n This uses remarks in Glenn Steven's Ph.D. thesis.\n\n INPUT:\n\n\n - ``c`` - a cusp\n\n - ``N`` - a positive integer\n\n - ``data`` - the list [n for n in range(2,N) if\n ...
@richcmp_method class FiniteSubgroup(Module): "\n A finite subgroup of a modular abelian variety.\n\n INPUT:\n\n - ``abvar`` -- a modular abelian variety\n\n - ``field_of_definition`` -- a field over which this group is defined\n\n EXAMPLES:\n\n This is an abstract base class, so there are no in...
class FiniteSubgroup_lattice(FiniteSubgroup): def __init__(self, abvar, lattice, field_of_definition=None, check=True): '\n A finite subgroup of a modular abelian variety that is defined by a\n given lattice.\n\n INPUT:\n\n\n - ``abvar`` - a modular abelian variety\n\n ...
@richcmp_method class Homology(HeckeModule_free_module): '\n A homology group of an abelian variety, equipped with a Hecke\n action.\n ' def hecke_polynomial(self, n, var='x'): "\n Return the n-th Hecke polynomial in the given variable.\n\n INPUT:\n\n\n - ``n`` - positi...
class Homology_abvar(Homology): '\n The homology of a modular abelian variety.\n ' def __init__(self, abvar, base): "\n This is an abstract base class, so it is called implicitly in the\n following examples.\n\n EXAMPLES::\n\n sage: H = J0(43).integral_homology()...
class IntegralHomology(Homology_abvar): '\n The integral homology `H_1(A,\\ZZ)` of a modular\n abelian variety.\n ' def __init__(self, abvar): "\n Create the integral homology of a modular abelian variety.\n\n INPUT:\n\n\n - ``abvar`` - a modular abelian variety\n\n\n ...
class RationalHomology(Homology_abvar): '\n The rational homology `H_1(A,\\QQ)` of a modular\n abelian variety.\n ' def __init__(self, abvar): '\n Create the rational homology of a modular abelian variety.\n\n INPUT:\n\n\n - ``abvar`` - a modular abelian variety\n\n\n ...
class Homology_over_base(Homology_abvar): '\n The homology over a modular abelian variety over an arbitrary base\n commutative ring (not `\\ZZ` or `\\QQ`).\n ' def __init__(self, abvar, base_ring): "\n Called when creating homology with coefficients not\n `\\ZZ` or `\\QQ`.\n\n ...
class Homology_submodule(Homology): '\n A submodule of the homology of a modular abelian variety.\n ' def __init__(self, ambient, submodule): '\n Create a submodule of the homology of a modular abelian variety.\n\n INPUT:\n\n\n - ``ambient`` - the homology of some modular ...
class Homspace(HomsetWithBase): '\n A space of homomorphisms between two modular abelian varieties.\n ' Element = morphism.Morphism def __init__(self, domain, codomain, cat): "\n Create a homspace.\n\n INPUT:\n\n\n - ``domain, codomain`` - modular abelian varieties\n\n...
class EndomorphismSubring(Homspace, Ring): def __init__(self, A, gens=None, category=None): '\n A subring of the endomorphism ring.\n\n INPUT:\n\n\n - ``A`` - an abelian variety\n\n - ``gens`` - (default: None); optional; if given\n should be a tuple of the generat...
class Lseries(SageObject): '\n Base class for `L`-series attached to modular abelian varieties.\n\n This is a common base class for complex and `p`-adic `L`-series\n of modular abelian varieties.\n ' def __init__(self, abvar): '\n Called when creating an L-series.\n\n INPUT:...
class Lseries_complex(Lseries): '\n A complex `L`-series attached to a modular abelian variety.\n\n EXAMPLES::\n\n sage: A = J0(37)\n sage: A.lseries()\n Complex L-series attached to Abelian variety J0(37) of dimension 2\n ' def __call__(self, s, prec=53): '\n Eva...
class Lseries_padic(Lseries): '\n A `p`-adic `L`-series attached to a modular abelian variety.\n ' def __init__(self, abvar, p): '\n Create a `p`-adic `L`-series.\n\n EXAMPLES::\n\n sage: J0(37)[0].padic_lseries(389)\n 389-adic L-series attached to Simple abe...
class Morphism_abstract(sage.modules.matrix_morphism.MatrixMorphism_abstract): '\n A morphism between modular abelian varieties.\n\n EXAMPLES::\n\n sage: t = J0(11).hecke_operator(2)\n sage: from sage.modular.abvar.morphism import Morphism\n sage: isinstance(t, Morphism)\n True\n...
class Morphism(Morphism_abstract, sage.modules.matrix_morphism.MatrixMorphism): def restrict_domain(self, sub): '\n Restrict self to the subvariety sub of self.domain().\n\n EXAMPLES::\n\n sage: J = J0(37) ; A, B = J.decomposition()\n sage: A.lattice().matrix()\n ...
class DegeneracyMap(Morphism): def __init__(self, parent, A, t, side='left'): '\n Create the degeneracy map of index t in parent defined by the\n matrix A.\n\n INPUT:\n\n\n - ``parent`` - a space of homomorphisms of abelian\n varieties\n\n - ``A`` - a matrix...
class HeckeOperator(Morphism): '\n A Hecke operator acting on a modular abelian variety.\n ' def __init__(self, abvar, n, side='left'): '\n Create the Hecke operator of index `n` acting on the\n abelian variety abvar.\n\n INPUT:\n\n\n - ``abvar`` - a modular abelian...
class TorsionPoint(ModuleElement): "\n An element of a finite subgroup of a modular abelian variety.\n\n INPUT:\n\n - ``parent`` -- a finite subgroup of a modular abelian variety\n\n - ``element`` -- a `\\QQ`-vector space element that represents\n this element in terms of the ambient rational hom...
@richcmp_method class RationalTorsionSubgroup(FiniteSubgroup): '\n The torsion subgroup of a modular abelian variety.\n ' def __init__(self, abvar): "\n Create the torsion subgroup.\n\n INPUT:\n\n\n - ``abvar`` - a modular abelian variety\n\n\n EXAMPLES::\n\n ...
class QQbarTorsionSubgroup(Module): Element = TorsionPoint def __init__(self, abvar): '\n Group of all torsion points over the algebraic closure on an\n abelian variety.\n\n INPUT:\n\n\n - ``abvar`` - an abelian variety\n\n\n EXAMPLES::\n\n sage: A = J0(...
def is_ArithmeticSubgroup(x): '\n Return ``True`` if ``x`` is of type :class:`ArithmeticSubgroup`.\n\n EXAMPLES::\n\n sage: from sage.modular.arithgroup.all import is_ArithmeticSubgroup\n sage: is_ArithmeticSubgroup(GL(2, GF(7)))\n False\n sage: is_ArithmeticSubgroup(Gamma0(4))\n...
class ArithmeticSubgroup(Group): '\n Base class for arithmetic subgroups of `\\SL_2(\\ZZ)`. Not\n intended to be used directly, but still includes quite a few\n general-purpose routines which compute data about an arithmetic subgroup\n assuming that it has a working element testing routine.\n ' ...
def sl2z_word_problem(A): '\n Given an element of `\\SL_2(\\ZZ)`, express it as a word in the generators L =\n [1,1,0,1] and R = [1,0,1,1].\n\n The return format is a list of pairs ``(a,b)``, where ``a = 0`` or ``1``\n denoting ``L`` or ``R`` respectively, and ``b`` is an integer exponent.\n\n See ...
def eval_sl2z_word(w): '\n Given a word in the format output by :func:`sl2z_word_problem`, convert it back\n into an element of `\\SL_2(\\ZZ)`.\n\n EXAMPLES::\n\n sage: from sage.modular.arithgroup.arithgroup_perm import eval_sl2z_word\n sage: eval_sl2z_word([(0, 1), (1, -1), (0, 0), (1, 3)...
def word_of_perms(w, p1, p2): "\n Given a word `w` as a list of 2-tuples ``(index,power)`` and permutations\n ``p1`` and ``p2`` return the product of ``p1`` and ``p2`` that corresponds\n to ``w``.\n\n EXAMPLES::\n\n sage: import sage.modular.arithgroup.arithgroup_perm as ap\n sage: S2 = ...
def _equalize_perms(l): '\n Transform a list of lists into a list of lists with identical length. Each\n list ``p`` in the argument is completed with ``range(len(p),n)`` where\n ``n`` is the maximal length of the lists in ``l``. Note that the lists are\n modified in-place (rather than returning new li...
def ArithmeticSubgroup_Permutation(L=None, R=None, S2=None, S3=None, relabel=False, check=True): '\n Construct a subgroup of `\\SL_2(\\ZZ)` from the action of generators on its\n right cosets.\n\n Return an arithmetic subgroup knowing the action, given by permutations, of\n at least two standard gener...