code stringlengths 17 6.64M |
|---|
def bidirectional_merge_overlapping(A, B, key=None):
"\n Merge the two overlapping tuples/lists.\n\n INPUT:\n\n - ``A`` -- a list or tuple (type has to coincide with type of ``B``).\n\n - ``B`` -- a list or tuple (type has to coincide with type of ``A``).\n\n - ``key`` -- (default: ``None``) a func... |
def bidirectional_merge_sorted(A, B, key=None):
"\n Merge the two tuples/lists, keeping the orders provided by them.\n\n INPUT:\n\n - ``A`` -- a list or tuple (type has to coincide with type of ``B``).\n\n - ``B`` -- a list or tuple (type has to coincide with type of ``A``).\n\n - ``key`` -- (defau... |
def log_string(element, base=None):
"\n Return a representation of the log of the given element to the\n given base.\n\n INPUT:\n\n - ``element`` -- an object.\n\n - ``base`` -- an object or ``None``.\n\n OUTPUT:\n\n A string.\n\n EXAMPLES::\n\n sage: from sage.rings.asymptotic.misc... |
def strip_symbolic(expression):
"\n Return, if possible, the underlying (numeric) object of\n the symbolic expression.\n\n If ``expression`` is not symbolic, then ``expression`` is returned.\n\n INPUT:\n\n - ``expression`` -- an object\n\n OUTPUT:\n\n An object.\n\n EXAMPLES::\n\n s... |
class NotImplementedOZero(NotImplementedError):
'\n A special :python:`NotImplementedError<library/exceptions.html#exceptions.NotImplementedError>`\n which is raised when the result is O(0) which means 0\n for sufficiently large values of the variable.\n '
def __init__(self, asymptotic_ring=None,... |
class NotImplementedBZero(NotImplementedError):
'\n A special :python:`NotImplementedError<library/exceptions.html#exceptions.NotImplementedError>`\n which is raised when the result is B(0) which means 0\n for sufficiently large values of the variable.\n '
def __init__(self, asymptotic_ring=None,... |
def transform_category(category, subcategory_mapping, axiom_mapping, initial_category=None):
"\n Transform ``category`` to a new category according to the given\n mappings.\n\n INPUT:\n\n - ``category`` -- a category.\n\n - ``subcategory_mapping`` -- a list (or other iterable) of triples\n ``(... |
class Locals(dict):
"\n A frozen dictionary-like class for storing locals\n of an :class:`~sage.rings.asymptotic.asymptotic_ring.AsymptoticRing`.\n\n EXAMPLES::\n\n sage: from sage.rings.asymptotic.misc import Locals\n sage: locals = Locals({'a': 42})\n sage: locals['a']\n 42\... |
class WithLocals(SageObject):
"\n A class extensions for handling local values; see also\n :class:`Locals`.\n\n This is used in the\n :class:`~sage.rings.asymptotic.asymptotic_ring.AsymptoticRing`.\n\n EXAMPLES::\n\n sage: A.<n> = AsymptoticRing('n^ZZ', QQ, locals={'a': 42})\n sage: A... |
class ZeroCoefficientError(ValueError):
pass
|
def absorption(left, right):
"\n Let one of the two passed terms absorb the other.\n\n Helper function used by\n :class:`~sage.rings.asymptotic.asymptotic_ring.AsymptoticExpansion`.\n\n .. NOTE::\n\n If neither of the terms can absorb the other, an\n :python:`ArithmeticError<library/exce... |
def can_absorb(left, right):
"\n Return whether one of the two input terms is able to absorb the\n other.\n\n Helper function used by\n :class:`~sage.rings.asymptotic.asymptotic_ring.AsymptoticExpansion`.\n\n INPUT:\n\n - ``left`` -- an asymptotic term.\n\n - ``right`` -- an asymptotic term.\... |
class GenericTerm(MultiplicativeGroupElement):
"\n Base class for asymptotic terms. Mainly the structure and\n several properties of asymptotic terms are handled here.\n\n INPUT:\n\n - ``parent`` -- the parent of the asymptotic term.\n\n - ``growth`` -- an asymptotic growth element.\n\n EXAMPLES... |
class GenericTermMonoid(UniqueRepresentation, Parent, WithLocals):
"\n Parent for generic asymptotic terms.\n\n INPUT:\n\n - ``growth_group`` -- a growth group (i.e. an instance of\n :class:`~sage.rings.asymptotic.growth_group.GenericGrowthGroup`).\n\n - ``coefficient_ring`` -- a ring which conta... |
class OTerm(GenericTerm):
"\n Class for an asymptotic term representing an `O`-term with\n specified growth. For the mathematical properties of `O`-terms\n see :wikipedia:`Big_O_Notation`.\n\n `O`-terms can *absorb* terms of weaker or equal growth.\n\n INPUT:\n\n - ``parent`` -- the parent of th... |
class OTermMonoid(GenericTermMonoid):
"\n Parent for asymptotic big `O`-terms.\n\n INPUT:\n\n - ``growth_group`` -- a growth group.\n\n - ``category`` -- The category of the parent can be specified\n in order to broaden the base structure. It has to be a subcategory\n of ``Join of Category o... |
class TermWithCoefficient(GenericTerm):
"\n Base class for asymptotic terms possessing a coefficient. For\n example, :class:`ExactTerm` directly inherits from this class.\n\n INPUT:\n\n - ``parent`` -- the parent of the asymptotic term.\n\n - ``growth`` -- an asymptotic growth element of\n the... |
class TermWithCoefficientMonoid(GenericTermMonoid):
"\n This class implements the base structure for parents of\n asymptotic terms possessing a coefficient from some coefficient\n ring. In particular, this is also the parent for\n :class:`TermWithCoefficient`.\n\n INPUT:\n\n - ``growth_group`` -... |
class ExactTerm(TermWithCoefficient):
"\n Class for asymptotic exact terms. These terms primarily consist of\n an asymptotic growth element as well as a coefficient.\n\n INPUT:\n\n - ``parent`` -- the parent of the asymptotic term.\n\n - ``growth`` -- an asymptotic growth element from\n ``pare... |
class ExactTermMonoid(TermWithCoefficientMonoid):
"\n Parent for asymptotic exact terms, implemented in\n :class:`ExactTerm`.\n\n INPUT:\n\n - ``growth_group`` -- a growth group.\n\n - ``category`` -- The category of the parent can be specified\n in order to broaden the base structure. It has ... |
class BTerm(TermWithCoefficient):
"\n Class for asymptotic B-terms.\n\n A B-term represents all functions which (in absolute value) are bounded\n by the given ``growth`` and ``coefficient`` for the parameters\n given by ``valid_from``.\n For example, we have terms that represent functions\n\n - ... |
class BTermMonoid(TermWithCoefficientMonoid):
"\n Parent for asymptotic B-terms.\n\n INPUT:\n\n - ``growth_group`` -- a growth group\n\n - ``coefficient_ring`` -- the ring which contains the\n coefficients of the elements\n\n - ``category`` -- The category of the parent can be specified\n ... |
class TermMonoidFactory(UniqueRepresentation, UniqueFactory):
"\n Factory for asymptotic term monoids. It can generate the following\n term monoids:\n\n - :class:`OTermMonoid`,\n\n - :class:`ExactTermMonoid`,\n\n - :class:`BTermMonoid`.\n\n .. NOTE::\n\n An instance of this factory is ava... |
def O(*x, **kwds):
"\n Big O constructor for various types.\n\n EXAMPLES:\n\n This is useful for writing power series elements::\n\n sage: R.<t> = ZZ[['t']]\n sage: (1+t)^10 + O(t^5)\n 1 + 10*t + 45*t^2 + 120*t^3 + 210*t^4 + O(t^5)\n\n A power series ring is created implicitly if ... |
def CFiniteSequences(base_ring, names=None, category=None):
'\n Return the commutative ring of C-Finite sequences.\n\n The ring is defined over a base ring (`\\ZZ` or `\\QQ` )\n and each element is represented by its ordinary generating function (ogf)\n which is a rational function over the base ring.... |
class CFiniteSequence(FieldElement, metaclass=InheritComparisonClasscallMetaclass):
"\n Create a C-finite sequence given its ordinary generating function.\n\n INPUT:\n\n - ``ogf`` -- a rational function, the ordinary generating function\n (can be an element from the symbolic ring, fraction field or ... |
class CFiniteSequences_generic(Parent, UniqueRepresentation):
"\n The class representing the ring of C-Finite Sequences\n\n TESTS::\n\n sage: C.<x> = CFiniteSequences(QQ)\n sage: from sage.rings.cfinite_sequence import CFiniteSequences_generic\n sage: isinstance(C,CFiniteSequences_gener... |
def is_CommutativeAlgebra(x):
"\n Check to see if ``x`` is a :class:`CommutativeAlgebra`.\n\n EXAMPLES::\n\n sage: from sage.rings.commutative_algebra import is_CommutativeAlgebra\n sage: from sage.rings.ring import CommutativeAlgebra\n sage: is_CommutativeAlgebra(CommutativeAlgebra(ZZ)... |
def ComplexIntervalField(prec=53, names=None):
'\n Return the complex interval field with real and imaginary parts having\n ``prec`` *bits* of precision.\n\n EXAMPLES::\n\n sage: ComplexIntervalField()\n Complex Interval Field with 53 bits of precision\n sage: ComplexIntervalField(10... |
class ComplexIntervalField_class(sage.rings.abc.ComplexIntervalField):
'\n The field of complex (interval) numbers.\n\n EXAMPLES::\n\n sage: C = ComplexIntervalField(); C\n Complex Interval Field with 53 bits of precision\n sage: Q = RationalField()\n sage: C(1/3)\n 0.3333... |
def last_two_convergents(x):
'\n Given the list ``x`` that consists of numbers, return the two last\n convergents `p_{n-1}, q_{n-1}, p_n, q_n`.\n\n This function is principally used to compute the value of a ultimately\n periodic continued fraction.\n\n OUTPUT: a 4-tuple of Sage integers\n\n EXA... |
def rat_interval_cf_list(r1, r2):
'\n Return the common prefix of the rationals ``r1`` and ``r2`` seen as\n continued fractions.\n\n OUTPUT: a list of Sage integers.\n\n EXAMPLES::\n\n sage: from sage.rings.continued_fraction import rat_interval_cf_list\n sage: rat_interval_cf_list(257/1... |
@richcmp_method
class ContinuedFraction_base(SageObject):
'\n Base class for (standard) continued fractions.\n\n If you want to implement your own continued fraction, simply derived from\n this class and implement the following methods:\n\n - ``def quotient(self, n)``: return the ``n``-th quotient of ... |
class ContinuedFraction_periodic(ContinuedFraction_base):
'\n Continued fraction associated with rational or quadratic number.\n\n A rational number has a finite continued fraction expansion (or ultimately\n 0). The one of a quadratic number, ie a number of the form `a + b \\sqrt{D}`\n with `a` and `b... |
class ContinuedFraction_real(ContinuedFraction_base):
'\n Continued fraction of a real (exact) number.\n\n This class simply wraps a real number into an attribute (that can be\n accessed through the method :meth:`value`). The number is assumed to be\n irrational.\n\n EXAMPLES::\n\n sage: cf ... |
class ContinuedFraction_infinite(ContinuedFraction_base):
'\n A continued fraction defined by an infinite sequence of partial quotients.\n\n EXAMPLES::\n\n sage: t = continued_fraction(words.ThueMorseWord([1,2])); t # needs sage.combinat\n [1; 2, 2, 1, 2, 1, 1, 2, 2, 1...]\... |
def check_and_reduce_pair(x1, x2=None):
'\n There are often two ways to represent a given continued fraction. This\n function makes it canonical.\n\n In the very special case of the number `0` we return the pair\n ``((0,),(0,))``.\n\n TESTS::\n\n sage: from sage.rings.continued_fraction impo... |
def continued_fraction_list(x, type='std', partial_convergents=False, bits=None, nterms=None):
'\n Return the (finite) continued fraction of ``x`` as a list.\n\n The continued fraction expansion of ``x`` are the coefficients `a_i` in\n\n .. MATH::\n\n x = a_0 + 1/(a_1 + 1/(...))\n\n with `a_0` ... |
def continued_fraction(x, value=None):
'\n Return the continued fraction of `x`.\n\n INPUT:\n\n - ``x`` -- a number or a list of partial quotients (for finite\n development) or two list of partial quotients (preperiod and period\n for ultimately periodic development)\n\n EXAMPLES:\n\n A f... |
def convergents(x):
'\n Return the (partial) convergents of the number ``x``.\n\n EXAMPLES::\n\n sage: from sage.rings.continued_fraction import convergents\n sage: convergents(143/255)\n [0, 1, 1/2, 4/7, 5/9, 9/16, 14/25, 23/41, 60/107, 143/255]\n '
return continued_fraction(x).... |
class gosper_iterator():
'\n Iterable for the partial quotients of `(a*x+b)/(c*x+d)`, where `a, b, c, d`\n are integers, and `x` is a continued fraction.\n '
def __init__(self, a, b, c, d, x):
'\n Construct the class.\n\n INPUT:\n\n - ``a, b, c, d`` -- integer coefficien... |
class RingDerivationModule(Module, UniqueRepresentation):
'\n A class for modules of derivations over a commutative ring.\n '
def __init__(self, domain, codomain, twist=None):
'\n Initialize this module of derivation.\n\n TESTS::\n\n sage: A.<x,y> = QQ[]\n sa... |
class RingDerivation(ModuleElement):
'\n An abstract class for twisted and untwisted derivations over\n commutative rings.\n\n TESTS::\n\n sage: R.<x,y> = ZZ[]\n sage: f = R.derivation(x) + 2*R.derivation(y); f\n d/dx + 2*d/dy\n sage: f(x*y)\n 2*x + y\n\n '
def ... |
class RingDerivationWithoutTwist(RingDerivation):
'\n An abstract class for untwisted derivations.\n '
def _repr_(self):
'\n Return a string representation of this derivation.\n\n EXAMPLES::\n\n sage: R.<x,y> = ZZ[]\n sage: R.derivation(x)\n d/dx\n... |
class RingDerivationWithoutTwist_zero(RingDerivationWithoutTwist):
'\n This class can only represent the zero derivation.\n\n It is used when the parent is the zero derivation module\n (e.g., when its domain is ``ZZ``, ``QQ``, a finite field, etc.)\n '
def __init__(self, parent, arg=None):
... |
class RingDerivationWithoutTwist_wrapper(RingDerivationWithoutTwist):
'\n This class is a wrapper for derivation.\n\n It is useful for changing the parent without changing the\n computation rules for derivations. It is used for derivations\n over fraction fields and quotient rings.\n '
def __i... |
class RingDerivationWithoutTwist_function(RingDerivationWithoutTwist):
'\n A class for untwisted derivations over rings whose elements\n are either polynomials, rational fractions, power series or\n Laurent series.\n '
def __init__(self, parent, arg=None):
'\n Initialize this deriv... |
class RingDerivationWithoutTwist_fraction_field(RingDerivationWithoutTwist_wrapper):
'\n This class handles derivations over fraction fields.\n '
def __hash__(self):
'\n Return a hash of this derivation.\n\n EXAMPLES::\n\n sage: R.<x,y> = ZZ[]\n sage: f = R.d... |
class RingDerivationWithoutTwist_quotient(RingDerivationWithoutTwist_wrapper):
'\n This class handles derivations over quotient rings.\n '
def __hash__(self):
'\n Return a hash of this derivation.\n\n EXAMPLES::\n\n sage: R.<x,y> = ZZ[]\n sage: f = R.derivati... |
class RingDerivationWithTwist_generic(RingDerivation):
'\n The class handles `\\theta`-derivations of the form\n `\\lambda (\\theta - \\iota)` (where `\\iota` is the defining\n morphism of the codomain over the domain) for a scalar\n `\\lambda` varying in the codomain.\n '
def __init__(self, p... |
def conway_polynomial(p, n):
'\n Return the Conway polynomial of degree `n` over ``GF(p)``.\n\n If the requested polynomial is not known, this function raises a\n ``RuntimeError`` exception.\n\n INPUT:\n\n - ``p`` -- prime number\n\n - ``n`` -- positive integer\n\n OUTPUT:\n\n - the Conway... |
def exists_conway_polynomial(p, n):
'\n Check whether the Conway polynomial of degree `n` over ``GF(p)``\n is known.\n\n INPUT:\n\n - ``p`` -- prime number\n\n - ``n`` -- positive integer\n\n OUTPUT:\n\n - boolean: ``True`` if the Conway polynomial of degree `n` over\n ``GF(p)`` is in th... |
class PseudoConwayLattice(WithEqualityById, SageObject):
'\n A pseudo-Conway lattice over a given finite prime field.\n\n The Conway polynomial `f_n` of degree `n` over `\\Bold{F}_p` is\n defined by the following four conditions:\n\n - `f_n` is irreducible.\n\n - In the quotient field `\\Bold{F}_p[... |
def _find_pow_of_frobenius(p, n, x, y):
'\n Find the power of Frobenius which yields `x` when applied to `y`.\n\n INPUT:\n\n - ``p`` -- prime number\n\n - ``n`` -- positive integer\n\n - ``x`` -- an element of a field `K` of `p^n` elements so that\n the multiplicative order of `x` is `p^n - 1`... |
def _crt_non_coprime(running, a):
'\n Extension of the ``crt`` method of ``IntegerMod`` to the case of\n non-relatively prime modulus.\n\n EXAMPLES::\n\n sage: from sage.rings.finite_rings.conway_polynomials import _crt_non_coprime\n sage: a = _crt_non_coprime(mod(14, 18), mod(20,30)); a\n ... |
def _frobenius_shift(K, generators, check_only=False):
"\n Given a field `K` of degree `n` over ``GF(p)`` and a dictionary\n holding, for each divisor `q` of `n`, an element with minimal\n polynomial a pseudo-Conway polynomial of degree `n/q`, modify\n these generators into a compatible system.\n\n ... |
class FiniteFieldFactory(UniqueFactory):
'\n Return the globally unique finite field of given order with\n generator labeled by the given name and possibly with given\n modulus.\n\n INPUT:\n\n - ``order`` -- a prime power\n\n - ``name`` -- string, optional. Note that there can be a\n subst... |
def is_PrimeFiniteField(x):
"\n Return ``True`` if ``x`` is a prime finite field.\n\n This function is deprecated.\n\n EXAMPLES::\n\n sage: from sage.rings.finite_rings.finite_field_constructor import is_PrimeFiniteField\n sage: is_PrimeFiniteField(QQ)\n doctest:...: DeprecationWarni... |
class FiniteField_givaro(FiniteField):
"\n Finite field implemented using Zech logs and the cardinality must be\n less than `2^{16}`. By default, Conway polynomials are used as minimal\n polynomials.\n\n INPUT:\n\n - ``q`` -- `p^n` (must be prime power)\n\n - ``name`` -- (default: ``'a'``) varia... |
def late_import():
'\n Imports various modules after startup.\n\n EXAMPLES::\n\n sage: sage.rings.finite_rings.finite_field_ntl_gf2e.late_import()\n sage: sage.rings.finite_rings.finite_field_ntl_gf2e.GF2 is None # indirect doctest\n False\n '
if ('GF2' in globals()):
return... |
class FiniteField_ntl_gf2e(FiniteField):
"\n Finite Field of characteristic 2 and order `2^n`.\n\n INPUT:\n\n - ``q`` -- `2^n` (must be 2 power)\n\n - ``names`` -- variable used for poly_repr (default: ``'a'``)\n\n - ``modulus`` -- A minimal polynomial to use for reduction.\n\n - ``repr`` -- con... |
class FiniteField_pari_ffelt(FiniteField):
"\n Finite fields whose cardinality is a prime power (not a prime),\n implemented using PARI's ``FFELT`` type.\n\n INPUT:\n\n - ``p`` -- prime number\n\n - ``modulus`` -- an irreducible polynomial of degree at least 2\n over the field of `p` elements\... |
class FiniteField_prime_modn(FiniteField_generic, integer_mod_ring.IntegerModRing_generic):
'\n Finite field of order `p` where `p` is prime.\n\n EXAMPLES::\n\n sage: FiniteField(3)\n Finite Field of size 3\n\n sage: FiniteField(next_prime(1000)) ... |
class GaloisGroup_GFElement(AbelianGroupElement):
def as_hom(self):
'\n Return the automorphism of the finite field corresponding to this element.\n\n EXAMPLES::\n\n sage: GF(3^6).galois_group()([4]).as_hom()\n Frobenius endomorphism z6 |--> z6^(3^4) on Finite Field in... |
class GaloisGroup_GF(GaloisGroup_cyc):
'\n The Galois group of a finite field.\n '
Element = GaloisGroup_GFElement
def __init__(self, field):
'\n Create a Galois group.\n\n TESTS::\n\n sage: TestSuite(GF(9).galois_group()).run()\n '
GaloisGroup_cyc.__... |
class FiniteFieldHomset(RingHomset_generic):
'\n Set of homomorphisms with domain a given finite field.\n '
def __call__(self, im_gens, base_map=None, check=True):
"\n Construct the homomorphism defined by ``im_gens``.\n\n EXAMPLES::\n\n sage: R.<t> = ZZ[]\n ... |
class IntegerModFactory(UniqueFactory):
'\n Return the quotient ring `\\ZZ / n\\ZZ`.\n\n INPUT:\n\n - ``order`` -- integer (default: 0); positive or negative\n - ``is_field`` -- bool (default: ``False``); assert that\n the order is prime and hence the quotient ring belongs to\n the category ... |
def _unit_gens_primepowercase(p, r):
'\n Return a list of generators for `(\\ZZ/p^r\\ZZ)^*` and their orders.\n\n EXAMPLES::\n\n sage: from sage.rings.finite_rings.integer_mod_ring import _unit_gens_primepowercase\n sage: _unit_gens_primepowercase(2, 3)\n [(7, 2), (5, 2)]\n sage:... |
@richcmp_method
class IntegerModRing_generic(quotient_ring.QuotientRing_generic, sage.rings.abc.IntegerModRing):
'\n The ring of integers modulo `N`.\n\n INPUT:\n\n - ``order`` -- an integer\n\n - ``category`` -- a subcategory of ``CommutativeRings()`` (the default)\n\n OUTPUT:\n\n The ring of i... |
def crt(v):
'\n INPUT:\n\n - ``v`` -- (list) a lift of elements of ``rings.IntegerMod(n)``, for\n various coprime moduli ``n``\n\n EXAMPLES::\n\n sage: from sage.rings.finite_rings.integer_mod_ring import crt\n sage: crt([mod(3, 8), mod(1,19), mod(7, 15)])\n 1027\n '
if (... |
class FiniteFieldVectorSpaceIsomorphism(Morphism):
'\n Base class of the vector space isomorphism between a finite field\n and a vector space over a subfield of the finite field.\n '
def _repr_(self):
'\n Return the string representation of this isomorphism\n between a finite f... |
class MorphismVectorSpaceToFiniteField(FiniteFieldVectorSpaceIsomorphism):
'\n Isomorphisms from vector spaces to finite fields.\n '
def __init__(self, V, K, C):
'\n Initialize.\n\n INPUT:\n\n - ``V`` -- vector space\n\n - ``K`` -- finite field\n\n - ``C`` -- ... |
class MorphismFiniteFieldToVectorSpace(FiniteFieldVectorSpaceIsomorphism):
'\n Isomorphisms from finite fields to vector spaces\n '
def __init__(self, K, V, C):
'\n Initialize.\n\n INPUT:\n\n - ``K`` -- finite field GF((p^m)^n)\n\n - ``V`` -- vector space of rank n o... |
def FractionField(R, names=None):
"\n Create the fraction field of the integral domain ``R``.\n\n INPUT:\n\n - ``R`` -- an integral domain\n\n - ``names`` -- ignored\n\n EXAMPLES:\n\n We create some example fraction fields::\n\n sage: FractionField(IntegerRing())\n Rational Field... |
def is_FractionField(x):
"\n Test whether or not ``x`` inherits from :class:`FractionField_generic`.\n\n EXAMPLES::\n\n sage: from sage.rings.fraction_field import is_FractionField\n sage: is_FractionField(Frac(ZZ['x']))\n True\n sage: is_FractionField(QQ)\n False\n "
... |
class FractionField_generic(ring.Field):
'\n The fraction field of an integral domain.\n '
def __init__(self, R, element_class=fraction_field_element.FractionFieldElement, category=QuotientFields()):
"\n Create the fraction field of the integral domain ``R``.\n\n INPUT:\n\n ... |
class FractionField_1poly_field(FractionField_generic):
'\n The fraction field of a univariate polynomial ring over a field.\n\n Many of the functions here are included for coherence with number fields.\n '
def __init__(self, R, element_class=fraction_field_element.FractionFieldElement_1poly_field):... |
class FractionFieldEmbedding(DefaultConvertMap_unique):
'\n The embedding of an integral domain into its field of fractions.\n\n EXAMPLES::\n\n sage: R.<x> = QQ[]\n sage: f = R.fraction_field().coerce_map_from(R); f\n Coercion map:\n From: Univariate Polynomial Ring in x over R... |
class FractionFieldEmbeddingSection(Section):
'\n The section of the embedding of an integral domain into its field of\n fractions.\n\n EXAMPLES::\n\n sage: R.<x> = QQ[]\n sage: f = R.fraction_field().coerce_map_from(R).section(); f\n Section map:\n From: Fraction Field of U... |
class FunctionFieldFactory(UniqueFactory):
'\n Return the function field in one variable with constant field ``F``. The\n function field returned is unique in the sense that if you call this\n function twice with the same base field and name then you get the same\n python object back.\n\n INPUT:\n\... |
class FunctionFieldExtensionFactory(UniqueFactory):
'\n Create a function field defined as an extension of another\n function field by adjoining a root of a univariate polynomial.\n The returned function field is unique in the sense that if you\n call this function twice with an equal ``polynomial`` a... |
class FunctionFieldDerivation(RingDerivationWithoutTwist):
'\n Base class for derivations on function fields.\n\n A derivation on `R` is a map `R \\to R` with\n `D(\\alpha+\\beta)=D(\\alpha)+D(\\beta)` and `D(\\alpha\\beta)=\\beta\n D(\\alpha)+\\alpha D(\\beta)` for all `\\alpha,\\beta\\in R`.\n\n ... |
class FunctionFieldDerivation_separable(FunctionFieldDerivation):
'\n Derivations of separable extensions.\n\n EXAMPLES::\n\n sage: K.<x> = FunctionField(QQ)\n sage: R.<y> = K[]\n sage: L.<y> = K.extension(y^2 - x)\n sage: L.derivation()\n d/dx\n '
def __init__(sel... |
class FunctionFieldDerivation_inseparable(FunctionFieldDerivation):
def __init__(self, parent, u=None):
'\n Initialize this derivation.\n\n INPUT:\n\n - ``parent`` -- the parent of this derivation\n\n - ``u`` -- a parameter describing the derivation\n\n EXAMPLES::\n\n ... |
class FunctionFieldHigherDerivation(Map):
'\n Base class of higher derivations on function fields.\n\n INPUT:\n\n - ``field`` -- function field on which the derivation operates\n\n EXAMPLES::\n\n sage: F.<x> = FunctionField(GF(2))\n sage: F.higher_derivation()\n Higher derivation ... |
def _pth_root_in_prime_field(e):
'\n Return the `p`-th root of element ``e`` in a prime finite field.\n\n TESTS::\n\n sage: from sage.rings.function_field.derivations_polymod import _pth_root_in_prime_field\n sage: p = 5\n sage: F.<a> = GF(p)\n sage: e = F.random_element()\n ... |
def _pth_root_in_finite_field(e):
'\n Return the `p`-th root of element ``e`` in a finite field.\n\n TESTS::\n\n sage: from sage.rings.function_field.derivations_polymod import _pth_root_in_finite_field\n sage: p = 3\n sage: F.<a> = GF(p^2) ... |
class RationalFunctionFieldHigherDerivation_global(FunctionFieldHigherDerivation):
'\n Higher derivations of rational function fields over finite fields.\n\n INPUT:\n\n - ``field`` -- function field on which the derivation operates\n\n EXAMPLES::\n\n sage: F.<x> = FunctionField(GF(2))\n ... |
class FunctionFieldHigherDerivation_global(FunctionFieldHigherDerivation):
'\n Higher derivations of global function fields.\n\n INPUT:\n\n - ``field`` -- function field on which the derivation operates\n\n EXAMPLES::\n\n sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]\n sage: L.<y> = K.... |
class FunctionFieldHigherDerivation_char_zero(FunctionFieldHigherDerivation):
'\n Higher derivations of function fields of characteristic zero.\n\n INPUT:\n\n - ``field`` -- function field on which the derivation operates\n\n EXAMPLES::\n\n sage: K.<x> = FunctionField(QQ); _.<Y> = K[]\n ... |
class FunctionFieldDerivation_rational(FunctionFieldDerivation):
'\n Derivations on rational function fields.\n\n EXAMPLES::\n\n sage: K.<x> = FunctionField(QQ)\n sage: K.derivation()\n d/dx\n '
def __init__(self, parent, u=None):
'\n Initialize a derivation.\n\n ... |
class FunctionFieldDifferential(ModuleElement):
'\n Base class for differentials on function fields.\n\n INPUT:\n\n - ``f`` -- element of the function field\n\n - ``t`` -- element of the function field; if `t` is not specified, the generator\n of the base differential is assumed\n\n EXAMPLES::... |
class FunctionFieldDifferential_global(FunctionFieldDifferential):
'\n Differentials on global function fields.\n\n EXAMPLES::\n\n sage: F.<x> = FunctionField(GF(7))\n sage: f = x/(x^2 + x + 1)\n sage: f.differential()\n ((6*x^2 + 1)/(x^4 + 2*x^3 + 3*x^2 + 2*x + 1)) d(x)\n\n :... |
class DifferentialsSpace(UniqueRepresentation, Parent):
'\n Space of differentials of a function field.\n\n INPUT:\n\n - ``field`` -- function field\n\n EXAMPLES::\n\n sage: K.<x> = FunctionField(GF(4)); _.<Y> = K[] # needs sage.rings.finite_rings\n sage: ... |
class DifferentialsSpace_global(DifferentialsSpace):
'\n Space of differentials of a global function field.\n\n INPUT:\n\n - ``field`` -- function field\n\n EXAMPLES::\n\n sage: K.<x> = FunctionField(GF(4)); _.<Y> = K[] # needs sage.rings.finite_rings\n sa... |
class DifferentialsSpaceInclusion(Morphism):
'\n Inclusion morphisms for extensions of function fields.\n\n EXAMPLES::\n\n sage: K.<x> = FunctionField(QQ); R.<y> = K[]\n sage: L.<y> = K.extension(y^2 - x*y + 4*x^3) # needs sage.rings.function_field\n s... |
def divisor(field, data):
'\n Construct a divisor from the data.\n\n INPUT:\n\n - ``field`` -- function field\n\n - ``data`` -- dictionary of place and multiplicity pairs\n\n EXAMPLES::\n\n sage: K.<x> = FunctionField(GF(2)); R.<t> = K[]\n sage: F.<y> = K.extension(t^3 - x^2*(x^2 + x ... |
def prime_divisor(field, place, m=1):
'\n Construct a prime divisor from the place.\n\n INPUT:\n\n - ``field`` -- function field\n\n - ``place`` -- place of the function field\n\n - ``m`` -- (default: 1) a positive integer; multiplicity at the place\n\n EXAMPLES::\n\n sage: K.<x> = Functi... |
class FunctionFieldDivisor(ModuleElement):
'\n Divisors of function fields.\n\n INPUT:\n\n - ``parent`` -- divisor group\n\n - ``data`` -- dict of place and multiplicity pairs\n\n EXAMPLES::\n\n sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]\n sage: F.<y> = K.extension(Y^3 - x^2*(x^2... |
class DivisorGroup(UniqueRepresentation, Parent):
'\n Groups of divisors of function fields.\n\n INPUT:\n\n - ``field`` -- function field\n\n EXAMPLES::\n\n sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]\n sage: F.<y> = K.extension(Y^2 - x^3 - 1)\n sage: F.divisor_group()\n ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.