code stringlengths 17 6.64M |
|---|
class DocTestDispatcher(SageObject):
'\n Creates parallel :class:`DocTestWorker` processes and dispatches\n doctesting tasks.\n '
def __init__(self, controller):
'\n INPUT:\n\n - ``controller`` -- a :class:`sage.doctest.control.DocTestController` instance\n\n EXAMPLES::\... |
class DocTestWorker(multiprocessing.Process):
'\n The DocTestWorker process runs one :class:`DocTestTask` for a given\n source. It returns messages about doctest failures (or all tests if\n verbose doctesting) through a pipe and returns results through a\n ``multiprocessing.Queue`` instance (both thes... |
class DocTestTask():
"\n This class encapsulates the tests from a single source.\n\n This class does not insulate from problems in the source\n (e.g. entering an infinite loop or causing a segfault), that has to\n be dealt with at a higher level.\n\n INPUT:\n\n - ``source`` -- a :class:`sage.doc... |
def RIFtol(*args):
'\n Create an element of the real interval field used for doctest tolerances.\n\n It allows large numbers like 1e1000, it parses strings with spaces\n like ``RIF(" - 1 ")`` out of the box and it carries a lot of\n precision. The latter is useful for testing libraries using\n arbi... |
def parse_optional_tags(string, *, return_string_sans_tags=False):
'\n Return a dictionary whose keys are optional tags from the following\n set that occur in a comment on the first line of the input string.\n\n - ``\'long time\'``\n - ``\'not implemented\'``\n - ``\'not tested\'``\n - ``\'known... |
def parse_file_optional_tags(lines):
'\n Scan the first few lines for file-level doctest directives.\n\n INPUT:\n\n - ``lines`` -- iterable of pairs ``(lineno, line)``.\n\n OUTPUT:\n\n a dictionary whose keys are strings (tags); see :func:`parse_optional_tags`\n\n EXAMPLES::\n\n sage: fro... |
@cached_function
def _standard_tags():
"\n Return the set of the names of all standard features.\n\n EXAMPLES::\n\n sage: from sage.doctest.parsing import _standard_tags\n sage: sorted(_standard_tags())\n [..., 'numpy', ..., 'sage.rings.finite_rings', ...]\n "
from sage.features.... |
def _tag_group(tag):
"\n Classify a doctest tag as belonging to one of 4 groups.\n\n INPUT:\n\n - ``tag`` -- string\n\n OUTPUT:\n\n a string; one of ``'special'``, ``'optional'``, ``'standard'``, ``'sage'``\n\n EXAMPLES::\n\n sage: from sage.doctest.parsing import _tag_group\n sage... |
def unparse_optional_tags(tags, prefix='# '):
"\n Return a comment string that sets ``tags``.\n\n INPUT:\n\n - ``tags`` -- dict or iterable of tags, as output by :func:`parse_optional_tags`\n\n - ``prefix`` -- to be put before a nonempty string\n\n EXAMPLES::\n\n sage: from sage.doctest.pars... |
def update_optional_tags(line, tags=None, *, add_tags=None, remove_tags=None, force_rewrite=False):
"\n Return the doctest ``line`` with tags changed.\n\n EXAMPLES::\n\n sage: from sage.doctest.parsing import update_optional_tags, optional_tag_columns, standard_tag_columns\n sage: ruler = ''\n... |
def parse_tolerance(source, want):
'\n Return a version of ``want`` marked up with the tolerance tags\n specified in ``source``.\n\n INPUT:\n\n - ``source`` -- a string, the source of a doctest\n - ``want`` -- a string, the desired output of the doctest\n\n OUTPUT:\n\n ``want`` if there are n... |
def pre_hash(s):
'\n Prepends a string with its length.\n\n EXAMPLES::\n\n sage: from sage.doctest.parsing import pre_hash\n sage: pre_hash("abc")\n \'3:abc\'\n '
return ('%s:%s' % (len(s), s))
|
def get_source(example):
'\n Return the source with the leading \'sage: \' stripped off.\n\n EXAMPLES::\n\n sage: from sage.doctest.parsing import get_source\n sage: from sage.doctest.sources import DictAsObject\n sage: example = DictAsObject({})\n sage: example.sage_source = "2 ... |
def reduce_hex(fingerprints):
'\n Return a symmetric function of the arguments as hex strings.\n\n The arguments should be 32 character strings consisting of hex\n digits: 0-9 and a-f.\n\n EXAMPLES::\n\n sage: from sage.doctest.parsing import reduce_hex\n sage: reduce_hex(["abc", "12399a... |
class MarkedOutput(str):
'\n A subclass of string with context for whether another string\n matches it.\n\n EXAMPLES::\n\n sage: from sage.doctest.parsing import MarkedOutput\n sage: s = MarkedOutput("abc")\n sage: s.rel_tol\n 0\n sage: s.update(rel_tol = .05)\n ... |
def make_marked_output(s, D):
'\n Auxiliary function for pickling.\n\n EXAMPLES::\n\n sage: from sage.doctest.parsing import make_marked_output\n sage: s = make_marked_output("0.0007401", {\'abs_tol\':.0000001})\n sage: s\n \'0.0007401\'\n sage: s.abs_tol\n 1.000000... |
class OriginalSource():
"\n Context swapping out the pre-parsed source with the original for\n better reporting.\n\n EXAMPLES::\n\n sage: from sage.doctest.sources import FileDocTestSource\n sage: from sage.doctest.control import DocTestDefaults\n sage: from sage.env import SAGE_SRC\... |
class SageDocTestParser(doctest.DocTestParser):
"\n A version of the standard doctest parser which handles Sage's\n custom options and tolerances in floating point arithmetic.\n "
def __init__(self, optional_tags=(), long=False, *, probed_tags=(), file_optional_tags=()):
'\n INPUT:\n\... |
class SageOutputChecker(doctest.OutputChecker):
"\n A modification of the doctest OutputChecker that can check\n relative and absolute tolerance of answers.\n\n EXAMPLES::\n\n sage: from sage.doctest.parsing import SageOutputChecker, MarkedOutput, SageDocTestParser\n sage: import doctest\n ... |
def signal_name(sig):
"\n Return a string describing a signal number.\n\n EXAMPLES::\n\n sage: from signal import SIGSEGV\n sage: from sage.doctest.reporting import signal_name\n sage: signal_name(SIGSEGV)\n 'segmentation fault'\n sage: signal_name(9)\n 'kill signal... |
class DocTestReporter(SageObject):
'\n This class reports to the users on the results of doctests.\n '
def __init__(self, controller):
"\n Initialize the reporter.\n\n INPUT:\n\n - ``controller`` -- a\n :class:`sage.doctest.control.DocTestController` instance.\n ... |
def get_basename(path):
"\n This function returns the basename of the given path, e.g. sage.doctest.sources or doc.ru.tutorial.tour_advanced\n\n EXAMPLES::\n\n sage: from sage.doctest.sources import get_basename\n sage: from sage.env import SAGE_SRC\n sage: import os\n sage: get_... |
class DocTestSource():
'\n This class provides a common base class for different sources of doctests.\n\n INPUT:\n\n - ``options`` -- a :class:`sage.doctest.control.DocTestDefaults`\n instance or equivalent.\n '
def __init__(self, options):
"\n Initialization.\n\n EXAMP... |
class StringDocTestSource(DocTestSource):
'\n This class creates doctests from a string.\n\n INPUT:\n\n - ``basename`` -- string such as \'sage.doctests.sources\', going\n into the names of created doctests and examples.\n\n - ``source`` -- a string, giving the source code to be parsed for\n ... |
class FileDocTestSource(DocTestSource):
'\n This class creates doctests from a file.\n\n INPUT:\n\n - ``path`` -- string, the filename\n\n - ``options`` -- a :class:`sage.doctest.control.DocTestDefaults`\n instance or equivalent.\n\n EXAMPLES::\n\n sage: from sage.doctest.control import... |
class SourceLanguage():
'\n An abstract class for functions that depend on the programming language of a doctest source.\n\n Currently supported languages include Python, ReST and LaTeX.\n '
def parse_docstring(self, docstring, namespace, start):
"\n Return a list of doctest defined i... |
class PythonSource(SourceLanguage):
"\n This class defines the functions needed for the extraction of doctests from python sources.\n\n EXAMPLES::\n\n sage: from sage.doctest.control import DocTestDefaults\n sage: from sage.doctest.sources import FileDocTestSource\n sage: from sage.env ... |
class TexSource(SourceLanguage):
'\n This class defines the functions needed for the extraction of\n doctests from a LaTeX source.\n\n EXAMPLES::\n\n sage: from sage.doctest.control import DocTestDefaults\n sage: from sage.doctest.sources import FileDocTestSource\n sage: filename = "... |
class RestSource(SourceLanguage):
'\n This class defines the functions needed for the extraction of\n doctests from ReST sources.\n\n EXAMPLES::\n\n sage: from sage.doctest.control import DocTestDefaults\n sage: from sage.doctest.sources import FileDocTestSource\n sage: filename = "s... |
class DictAsObject(dict):
"\n A simple subclass of dict that inserts the items from the initializing dictionary into attributes.\n\n EXAMPLES::\n\n sage: from sage.doctest.sources import DictAsObject\n sage: D = DictAsObject({'a':2})\n sage: D.a\n 2\n "
def __init__(self,... |
def count_noun(number, noun, plural=None, pad_number=False, pad_noun=False):
'\n EXAMPLES::\n\n sage: from sage.doctest.util import count_noun\n sage: count_noun(1, "apple")\n \'1 apple\'\n sage: count_noun(1, "apple", pad_noun=True)\n \'1 apple \'\n sage: count_noun(1... |
def dict_difference(self, other):
'\n Return a dict with all key-value pairs occurring in ``self`` but not\n in ``other``.\n\n EXAMPLES::\n\n sage: from sage.doctest.util import dict_difference\n sage: d1 = {1: \'a\', 2: \'b\', 3: \'c\'}\n sage: d2 = {1: \'a\', 2: \'x\', 4: \'c\'}\n ... |
class Timer():
'\n A simple timer.\n\n EXAMPLES::\n\n sage: from sage.doctest.util import Timer\n sage: Timer()\n {}\n sage: TestSuite(Timer()).run()\n '
def start(self):
"\n Start the timer.\n\n Can be called multiple times to reset the timer.\n\n ... |
class RecordingDict(dict):
"\n This dictionary is used for tracking the dependencies of an example.\n\n This feature allows examples in different doctests to be grouped\n for better timing data. It's obtained by recording whenever\n anything is set or retrieved from this dictionary.\n\n EXAMPLES::... |
def make_recording_dict(D, st, gt):
"\n Auxiliary function for pickling.\n\n EXAMPLES::\n\n sage: from sage.doctest.util import make_recording_dict\n sage: D = make_recording_dict({'a':4,'d':42},set([]),set(['not_here']))\n sage: sorted(D.items())\n [('a', 4), ('d', 42)]\n ... |
class NestedName():
"\n Class used to construct fully qualified names based on indentation level.\n\n EXAMPLES::\n\n sage: from sage.doctest.util import NestedName\n sage: qname = NestedName('sage.categories.algebras')\n sage: qname[0] = 'Algebras'; qname\n sage.categories.algebr... |
class DynamicalSystem_affine(SchemeMorphism_polynomial_affine_space, DynamicalSystem):
"\n An endomorphism of affine schemes determined by rational functions.\n\n .. WARNING::\n\n You should not create objects of this class directly because\n no type or consistency checking is performed. The p... |
class DynamicalSystem_affine_field(DynamicalSystem_affine, SchemeMorphism_polynomial_affine_space_field):
@cached_method
def weil_restriction(self):
'\n Compute the Weil restriction of this morphism over some extension field.\n\n If the field is a finite field, then this computes\n ... |
class DynamicalSystem_affine_finite_field(DynamicalSystem_affine_field, SchemeMorphism_polynomial_affine_space_finite_field):
def orbit_structure(self, P):
"\n Every point is preperiodic over a finite field.\n\n This function returns the pair `[m,n]` where `m` is the\n preperiod and ... |
class DynamicalSystem_Berkovich(Element, metaclass=InheritComparisonClasscallMetaclass):
'\n A dynamical system on Berkovich space over `\\CC_p`.\n\n A dynamical system on Berkovich space over `\\CC_p` is\n determined by a dynamical system on `A^1(\\CC_p)` or `P^1(\\CC_p)`,\n which naturally induces a... |
class DynamicalSystem_Berkovich_projective(DynamicalSystem_Berkovich):
'\n A dynamical system on projective Berkovich space over `\\CC_p`.\n\n A dynamical system on projective Berkovich space over `\\CC_p` is\n determined by a dynamical system on `A^1(\\CC_p)` or `P^1(\\CC_p)`,\n which naturally induc... |
class DynamicalSystem_Berkovich_affine(DynamicalSystem_Berkovich):
'\n A dynamical system of the affine Berkovich line over `\\CC_p`.\n\n INPUT:\n\n - ``dynamical_system`` -- A :class:`DynamicalSystem_affine`\n of relative dimension 1.\n\n - ``domain`` -- (optional) affine or projective Berkovich... |
class DynamicalSemigroup(Parent, metaclass=InheritComparisonClasscallMetaclass):
"\n A dynamical semigroup defined by a multiple dynamical systems on projective or affine space.\n\n INPUT:\n\n - ``ds_data`` -- list or tuple of dynamical systems or objects that define dynamical systems\n\n OUTPUT:\n\n ... |
class DynamicalSemigroup_projective(DynamicalSemigroup):
'\n A dynamical semigroup defined by a multiple dynamical systems on projective space.\n\n INPUT:\n\n - ``ds_data`` -- list or tuple of dynamical systems or objects that define dynamical systems\n over projective space.\n\n OUTPUT: :class:`... |
class DynamicalSemigroup_projective_field(DynamicalSemigroup_projective):
pass
|
class DynamicalSemigroup_projective_finite_field(DynamicalSemigroup_projective_field):
pass
|
class DynamicalSemigroup_affine(DynamicalSemigroup):
'\n A dynamical semigroup defined by multiple dynamical systems on affine space.\n\n INPUT:\n\n - ``ds_data`` -- list or tuple of dynamical systems or objects that define dynamical systems\n over affine space.\n\n OUTPUT: :class:`DynamicalSemig... |
class DynamicalSemigroup_affine_field(DynamicalSemigroup_affine):
pass
|
class DynamicalSemigroup_affine_finite_field(DynamicalSemigroup_affine_field):
pass
|
def _standardize_domains_of_(systems):
'\n Coerces dynamical systems to the same domain and have the same generators.\n\n INPUT:\n\n - ``systems`` -- list of dynamical systems\n\n OUTPUT: list of dynamical systems from ``systems`` coerced to the same domain with the same generators\n\n EXAMPLES::\n... |
def automorphism_group_QQ_fixedpoints(rational_function, return_functions=False, iso_type=False):
"\n Compute the automorphism group for ``rational_function`` via the method of fixed points\n\n ALGORITHM:\n\n See Algorithm 3 in Faber-Manes-Viray [FMV]_.\n\n INPUT:\n\n - ``rational_function`` -- Rat... |
def height_bound(polynomial):
'\n Compute the maximum height of the coefficients of an automorphism.\n\n This bounds sets the termination criteria for the Chinese Remainder Theorem step.\n\n Let `f` be a square-free polynomial with coefficients in `K`\n Let `F` be an automorphism of `\\mathbb{P}^1_{Fr... |
def PGL_repn(rational_function):
'\n Take a linear fraction transformation and represent it as a 2x2 matrix.\n\n INPUT:\n\n - ``rational_function`` -- a linear fraction transformation\n\n OUTPUT: a 2x2 matrix representing ``rational_function``\n\n EXAMPLES::\n\n sage: R.<z> = PolynomialRing(... |
def PGL_order(A):
'\n Find the multiplicative order of a linear fractional transformation that\n has a finite order as an element of `PGL_2(R)`.\n\n ``A`` can be represented either as a rational function or a 2x2 matrix\n\n INPUT:\n\n - ``A`` -- a linear fractional transformation\n\n OUTPUT: a p... |
def CRT_helper(automorphisms, moduli):
'\n Lift the given list of automorphisms to `Zmod(M)`.\n\n Given a list of automorphisms over various `Zmod(p^k)` find a list\n of automorphisms over `Zmod(M)` where `M=\\prod p^k` that surjects\n onto every tuple of automorphisms from the various `Zmod(p^k)`.\n\... |
def CRT_automorphisms(automorphisms, order_elts, degree, moduli):
'\n Compute a maximal list of automorphisms over `Zmod(M)`.\n\n Given a list of automorphisms over various `Zmod(p^k)`, a list of the\n elements orders, an integer degree, and a list of the `p^k` values compute\n a maximal list of autom... |
def valid_automorphisms(automorphisms_CRT, rational_function, ht_bound, M, return_functions=False):
'\n Check if automorphism mod `p^k` lifts to automorphism over `\\ZZ`.\n\n Checks whether an element that is an automorphism of ``rational_function`` modulo `p^k` for various\n `p` s and `k` s can be lifte... |
def remove_redundant_automorphisms(automorphisms, order_elts, moduli, integral_autos):
"\n If an element of `Aut_{F_p}` has been lifted to `\\QQ`\n remove that element from `Aut_{F_p}`.\n\n We don't want to attempt to lift that element again unnecessarily.\n\n INPUT:\n\n - ``automorphisms`` -- a li... |
def automorphism_group_QQ_CRT(rational_function, prime_lower_bound=4, return_functions=True, iso_type=False):
'\n Determines the complete group of rational automorphisms (under the conjugation action\n of `PGL(2,\\QQ)`) for a rational function of one variable.\n\n See [FMV]_ for details.\n\n INPUT:\n\... |
def automorphism_group_FF(rational_function, absolute=False, iso_type=False, return_functions=False):
"\n This function computes automorphism groups over finite fields.\n\n ALGORITHM:\n\n See Algorithm 4 in Faber-Manes-Viray [FMV]_.\n\n INPUT:\n\n - ``rational_function`` -- a rational function defi... |
def field_descent(sigma, y):
"\n Function for descending an element in a field `E` to a subfield `F`.\n\n Here `F`, `E` must be finite fields or number fields. This function determines\n the unique image of subfield which is ``y`` by the embedding ``sigma`` if it exists.\n Otherwise returns ``None``.\... |
def rational_function_coefficient_descent(rational_function, sigma, poly_ring):
"\n Function for descending the coefficients of a rational function from field `E`\n to a subfield `F`.\n\n Here `F`, `E` must be finite fields or number fields.\n It determines the unique rational function in fraction fie... |
def rational_function_coerce(rational_function, sigma, S_polys):
'\n Function for coercing a rational function defined over a ring `R` to have\n coefficients in a second ring ``S_polys``.\n\n The fraction field of polynomial ring ``S_polys`` will contain the new rational function.\n\n INPUT:\n\n - ... |
def rational_function_reduce(rational_function):
'\n Force Sage to divide out common factors in numerator and denominator\n of rational function.\n\n INPUT:\n\n - ``rational_function`` -- rational function `= F/G` in univariate polynomial ring\n\n OUTPUT: rational function -- `(F/\\gcd(F,G)) / (G/\... |
def three_stable_points(rational_function, invariant_list):
"\n Implementation of Algorithm 1 for automorphism groups from\n Faber-Manes-Viray [FMV]_.\n\n INPUT:\n\n - ``rational_function`` -- rational function `\\phi` defined over finite\n field `E`\n\n - ``invariant_list`` -- a list of at le... |
def automorphism_group_FF_alg2(rational_function):
"\n Implementation of algorithm for determining the absolute automorphism\n group over a finite field, given an invariant set, see [FMV]_.\n\n INPUT:\n\n - ``rational_function`` -- a rational function defined over a finite field\n\n OUTPUT: absolut... |
def order_p_automorphisms(rational_function, pre_image):
'\n Determine the order-p automorphisms given the input data.\n\n This is algorithm 4 in Faber-Manes-Viray [FMV]_.\n\n INPUT:\n\n - ``rational_function`` -- rational function defined over finite field `F`\n\n - ``pre_image`` -- set of triples... |
def automorphisms_fixing_pair(rational_function, pair, quad):
"\n Compute the set of automorphisms with order prime to the characteristic\n that fix the pair, excluding the identity.\n\n INPUT:\n\n - ``rational_function`` -- rational function defined over finite field `E`\n\n - ``pair`` -- a pair o... |
def automorphism_group_FF_alg3(rational_function):
"\n Implementation of Algorithm 3 in the paper by Faber/Manes/Viray [FMV]_\n for computing the automorphism group over a finite field.\n\n INPUT:\n\n - ``rational_function`` -- a rational function defined over a finite field `F`\n\n OUTPUT: list of... |
def which_group(list_of_elements):
"\n Given a finite subgroup of `PGL_2` determine its isomorphism class.\n\n This function makes heavy use of the classification of finite subgroups of `PGL(2,K)`.\n\n INPUT:\n\n - ``list_of_elements``-- a finite list of elements of `PGL(2,K)`\n that we know a pr... |
def conjugating_set_initializer(f, g):
'\n Return a conjugation invariant set together with information\n to reduce the combinatorics of checking all possible conjugations.\n\n This function constructs the invariant pair (``source``, ``possible_targets``)\n necessary for the conjugating set algorithm ... |
def greedy_independence_check(P, repeated_mult, point_to_mult):
'\n Return an invariant pair together with information\n to reduce the combinatorics of checking all possible conjugations.\n\n Let `f` and `g` be dynamical systems on `\\mathbb{P}^n`.\n An invariant pair is a pair of two sets `U`, `V` su... |
def conjugating_set_helper(f, g, num_cpus, source, possible_targets):
'\n Return the set of elements in PGL over the base ring\n that conjugates ``f`` to ``g``.\n\n This function takes as input the invariant pair\n and multiplier data from ``conjugating_set_initializer``.\n\n Do not call this funct... |
def is_conjugate_helper(f, g, num_cpus, source, possible_targets):
'\n Return if ``f`` is conjugate to ``g``.\n\n This function takes as input the invariant pair\n and multiplier data from ``conjugating_set_initializer``.\n\n Do not call this function directly, instead use ``f.is_conjugate(g)``.\n\n ... |
def bCheck(c, v, p, b):
'\n Compute a lower bound on the value of ``b``.\n\n This value is needed for a transformation\n `A(z) = z*p^k + b` to satisfy `ord_p(Res(\\phi^A)) < ord_p(Res(\\phi))` for a\n rational map `\\phi`. See Theorem 3.3.5 in [Molnar]_.\n\n INPUT:\n\n - ``c`` -- a list of polyn... |
def scale(c, v, p):
"\n Create scaled integer polynomial with respect to prime ``p``.\n\n Given an integral polynomial ``c``, we can write `c = p^i*c'`, where ``p`` does not\n divide ``c``. Return ``c'`` and `v - i` where `i` is the smallest valuation of the\n coefficients of `c`.\n\n INPUT:\n\n ... |
def blift(LF, Li, p, k, S=None, all_orbits=False):
'\n Search for a solution to the given list of inequalities.\n\n If found, lift the solution to\n an appropriate valuation. See Lemma 3.3.6 in [Molnar]_\n\n INPUT:\n\n - ``LF`` -- a list of integer polynomials in one variable (the normalized coeffi... |
def affine_minimal(vp, return_transformation=False, D=None, quick=False):
'\n Determine if given map is affine minimal.\n\n Given vp a scheme morphism on the projective line over the rationals,\n this procedure determines if `\\phi` is minimal. In particular, it determines\n if the map is affine minim... |
def Min(Fun, p, ubRes, conj, all_orbits=False):
'\n Local loop for :func:`affine_minimal`, where we check minimality at the prime `p`.\n\n First we bound the possible `k` in our transformations `A = zp^k + b`.\n See Theorems 3.3.2 and 3.3.3 in [Molnar]_.\n\n INPUT:\n\n - ``Fun`` -- a dynamical syst... |
def BM_all_minimal(vp, return_transformation=False, D=None):
'\n Determine a representative in each `SL(2,\\ZZ)` orbit with minimal\n resultant.\n\n This function modifies the Bruin-Molnar algorithm ([BM2012]_) to solve\n in the inequalities as ``<=`` instead of ``<``. Among the list of\n solutions... |
def HS_minimal(f, return_transformation=False, D=None):
'\n Compute a minimal model for the given projective dynamical system.\n\n This function implements the algorithm in Hutz-Stoll [HS2018]_.\n A representative with minimal resultant in the conjugacy class\n of ``f`` returned.\n\n INPUT:\n\n ... |
def HS_all_minimal_p(p, f, m=None, return_transformation=False):
'\n Find a representative in each distinct `SL(2,\\ZZ)` orbit with\n minimal `p`-resultant.\n\n This function implements the algorithm in Hutz-Stoll [HS2018]_.\n A representatives in each distinct `SL(2,\\ZZ)` orbit with minimal\n val... |
def HS_all_minimal(f, return_transformation=False, D=None):
'\n Determine a representative in each `SL(2,\\ZZ)` orbit with minimal resultant.\n\n This function implements the algorithm in Hutz-Stoll [HS2018]_.\n A representative in each distinct `SL(2,\\ZZ)` orbit is returned.\n The input ``f`` must h... |
def get_bound_dynamical(F, f, m=1, dynatomic=True, prec=53, emb=None):
'\n The hyperbolic distance from `j` which must contain the smallest map.\n\n This defines the maximum possible distance from `j` to the `z_0` covariant\n of the associated binary form `F` in the hyperbolic 3-space\n for which the ... |
def smallest_dynamical(f, dynatomic=True, start_n=1, prec=53, emb=None, algorithm='HS', check_minimal=True):
"\n Determine the poly with smallest coefficients in `SL(2,\\ZZ)` orbit of ``F``\n\n Smallest is in the sense of global height.\n The method is the algorithm in Hutz-Stoll [HS2018]_.\n A binary... |
class DynamicalSystem(SchemeMorphism_polynomial, metaclass=InheritComparisonClasscallMetaclass):
"\n Base class for dynamical systems of schemes.\n\n INPUT:\n\n - ``polys_or_rat_fncts`` -- a list of polynomials or rational functions,\n all of which should have the same parent\n\n - ``domain`` -- ... |
class DynamicalSystem_product_projective(DynamicalSystem, ProductProjectiveSpaces_morphism_ring):
'\n The class of dynamical systems on products of projective spaces.\n\n .. WARNING::\n\n You should not create objects of this class directly because\n no type or consistency checking is performe... |
class DynamicalSystem_product_projective_field(DynamicalSystem_product_projective):
pass
|
class DynamicalSystem_product_projective_finite_field(DynamicalSystem_product_projective_field):
def cyclegraph(self):
'\n Return the digraph of all orbits of this morphism mod `p`.\n\n OUTPUT: a digraph\n\n EXAMPLES::\n\n sage: P.<a,b,c,d> = ProductProjectiveSpaces(GF(3),... |
class DynamicalSystem_projective(SchemeMorphism_polynomial_projective_space, DynamicalSystem):
"A dynamical system of projective schemes determined by homogeneous\n polynomials that define what the morphism does on points in the\n ambient projective space.\n\n .. WARNING::\n\n You should not creat... |
class DynamicalSystem_projective_field(DynamicalSystem_projective, SchemeMorphism_polynomial_projective_space_field):
def lift_to_rational_periodic(self, points_modp, B=None):
'\n Given a list of points in projective space over `\\GF{p}`,\n determine if they lift to `\\QQ`-rational periodic... |
class DynamicalSystem_projective_finite_field(DynamicalSystem_projective_field, SchemeMorphism_polynomial_projective_space_finite_field):
def is_postcritically_finite(self, **kwds):
'\n Every point is postcritically finite in a finite field.\n\n INPUT: None. ``kwds`` is to parallel the over... |
def WehlerK3Surface(polys):
'\n Defines a K3 Surface over `\\mathbb{P}^2 \\times \\mathbb{P}^2` defined as\n the intersection of a bilinear and biquadratic form. [Weh1998]_\n\n INPUT: Bilinear and biquadratic polynomials as a tuple or list\n\n OUTPUT: :class:`WehlerK3Surface_ring`\n\n EXAMPLES::\n\... |
def random_WehlerK3Surface(PP):
"\n Produces a random K3 surface in `\\mathbb{P}^2 \\times \\mathbb{P}^2` defined as the\n intersection of a bilinear and biquadratic form. [Weh1998]_\n\n INPUT: Projective space cartesian product\n\n OUTPUT: :class:`WehlerK3Surface_ring`\n\n EXAMPLES::\n\n sa... |
class WehlerK3Surface_ring(AlgebraicScheme_subscheme_product_projective):
'\n A K3 surface in `\\mathbb{P}^2 \\times \\mathbb{P}^2` defined as the\n intersection of a bilinear and biquadratic form. [Weh1998]_\n\n EXAMPLES::\n\n sage: R.<x,y,z,u,v,w> = PolynomialRing(QQ, 6)\n sage: L = x*u -... |
class WehlerK3Surface_field(WehlerK3Surface_ring):
pass
|
class WehlerK3Surface_finite_field(WehlerK3Surface_field):
def cardinality(self):
'\n Count the total number of points on the K3 surface.\n\n ALGORITHM:\n\n Enumerate points over `\\mathbb{P}^2`, and then count the points on the fiber of\n each of those points.\n\n OUTP... |
class ElementaryCellularAutomata(SageObject):
"\n Elementary cellular automata.\n\n An *elementary cellular automaton* is a 1-dimensional cellular\n deterministic automaton with two possible values: `X := \\{0,1\\}`.\n A *state* is therefore a sequence `s \\in X^n`, and the *evolution*\n of a state... |
class GraftalLaceCellularAutomata(SageObject):
"\n Graftal Lace Cellular Automata (GLCA).\n\n A GLCA is a deterministic cellular automaton whose rule is given\n by an 8-digit octal number `r_7 \\cdots r_0`. For a node `s_i`, let\n `b_k`, for `k = -1,0,1` denote if there is an edge from `s_i` to\n `... |
class SolitonCellularAutomata(SageObject):
"\n Soliton cellular automata.\n\n Fix an affine Lie algebra `\\mathfrak{g}` with index `I` and\n classical index set `I_0`. Fix some `r \\in I_0`. A *soliton\n cellular automaton* (SCA) is a discrete (non-linear) dynamical\n system given as follows. The *... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.