code
stringlengths
17
6.64M
class SFractionalIdealClass(FractionalIdealClass): '\n An `S`-fractional ideal class in a number field for a tuple `S` of primes.\n\n EXAMPLES::\n\n sage: K.<a> = QuadraticField(-14)\n sage: I = K.ideal(2, a)\n sage: S = (I,)\n sage: CS = K.S_class_group(S)\n sage: J = K.i...
class ClassGroup(AbelianGroupWithValues_class): "\n The class group of a number field.\n\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n sage: K.<a> = NumberField(x^2 + 23)\n sage: G = K.class_group(); G\n Class group of order 3 with structure C3 of\n Number Field in a with...
class SClassGroup(ClassGroup): '\n The `S`-class group of a number field.\n\n EXAMPLES::\n\n sage: K.<a> = QuadraticField(-14)\n sage: S = K.primes_above(2)\n sage: K.S_class_group(S).gens() # random gens (platform dependent)\n (Fractional S-ideal class (3, a + 2),)\n\n ...
class GaloisGroup_v1(SageObject): '\n A wrapper around a class representing an abstract transitive group.\n\n This is just a fairly minimal object at present. To get the underlying\n group, do ``G.group()``, and to get the corresponding number field do\n ``G.number_field()``. For a more sophisticated...
class GaloisGroup_v2(GaloisGroup_perm): "\n The Galois group of an (absolute) number field.\n\n .. NOTE::\n\n We define the Galois group of a non-normal field `K` to be the\n Galois group of its Galois closure `L`, and elements are stored as\n permutations of the roots of the defining p...
class GaloisGroup_subgroup(GaloisSubgroup_perm): "\n A subgroup of a Galois group, as returned by functions such as ``decomposition_group``.\n\n INPUT:\n\n - ``ambient`` -- the ambient Galois group\n\n - ``gens`` -- a list of generators for the group\n\n - ``gap_group`` -- a gap or libgap permutati...
class GaloisGroupElement(PermutationGroupElement): "\n An element of a Galois group. This is stored as a permutation, but may also\n be made to act on elements of the field (generally returning elements of\n its Galois closure).\n\n EXAMPLES::\n\n sage: K.<w> = QuadraticField(-7); G = K.galois_...
class NumberFieldHomset(RingHomset_generic): "\n Set of homomorphisms with domain a given number field.\n\n TESTS::\n\n sage: H = Hom(QuadraticField(-1, 'a'), QuadraticField(-1, 'b'))\n sage: TestSuite(H).run()\n " Element = NumberFieldHomomorphism_im_gens def __init__(self, R, S, ...
class RelativeNumberFieldHomset(NumberFieldHomset): "\n Set of homomorphisms with domain a given relative number field.\n\n EXAMPLES:\n\n We construct a homomorphism from a relative field by giving\n the image of a generator::\n\n sage: x = polygen(ZZ, 'x')\n sage: L.<cuberoot2, zeta3> =...
class CyclotomicFieldHomset(NumberFieldHomset): '\n Set of homomorphisms with domain a given cyclotomic field.\n\n EXAMPLES::\n\n sage: End(CyclotomicField(16))\n Automorphism group of Cyclotomic Field of order 16 and degree 8\n ' Element = CyclotomicFieldHomomorphism_im_gens def _...
class NumberFieldIsomorphism(Map): "\n A base class for various isomorphisms between number fields and\n vector spaces.\n\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n sage: K.<a> = NumberField(x^4 + 3*x + 1)\n sage: V, fr, to = K.vector_space()\n sage: isinstance(fr, sage.rin...
class MapVectorSpaceToNumberField(NumberFieldIsomorphism): "\n The map to an absolute number field from its underlying `\\QQ`-vector space.\n\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n sage: K.<a> = NumberField(x^4 + 3*x + 1)\n sage: V, fr, to = K.vector_space()\n sage: V\n ...
class MapNumberFieldToVectorSpace(Map): "\n A class for the isomorphism from an absolute number field to its underlying\n `\\QQ`-vector space.\n\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n sage: L.<a> = NumberField(x^3 - x + 1)\n sage: V, fr, to = L.vector_space()\n sage: ty...
class MapRelativeVectorSpaceToRelativeNumberField(NumberFieldIsomorphism): "\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n sage: L.<b> = NumberField(x^4 + 3*x^2 + 1)\n sage: K = L.relativize(L.subfields(2)[0][1], 'a'); K\n Number Field in a with defining polynomial x^2 - b0*x + 1 ov...
class MapRelativeNumberFieldToRelativeVectorSpace(NumberFieldIsomorphism): "\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n sage: K.<a, b> = NumberField([x^3 - x + 1, x^2 + 23])\n sage: V, fr, to = K.relative_vector_space()\n sage: type(to)\n <class 'sage.rings.number_field.ma...
class NameChangeMap(NumberFieldIsomorphism): "\n A map between two isomorphic number fields with the same defining\n polynomial but different variable names.\n\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n sage: K.<a> = NumberField(x^2 - 3)\n sage: L.<b> = K.change_names()\n s...
class MapRelativeToAbsoluteNumberField(NumberFieldIsomorphism): "\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n sage: K.<a> = NumberField(x^6 + 4*x^2 + 200)\n sage: L = K.relativize(K.subfields(3)[0][1], 'b'); L\n Number Field in b with defining polynomial x^2 + a0 over its base fie...
class MapAbsoluteToRelativeNumberField(NumberFieldIsomorphism): '\n See :class:`~MapRelativeToAbsoluteNumberField` for examples.\n ' def __init__(self, A, R): "\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n sage: L.<a, b> = NumberField([x^2 + 3, x^2 + 5])\n ...
class MapVectorSpaceToRelativeNumberField(NumberFieldIsomorphism): "\n The isomorphism to a relative number field from its underlying `\\QQ`-vector\n space. Compare :class:`~MapRelativeVectorSpaceToRelativeNumberField`.\n\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n sage: L.<a, b> = Number...
class MapRelativeNumberFieldToVectorSpace(NumberFieldIsomorphism): "\n The isomorphism from a relative number field to its underlying `\\QQ`-vector\n space. Compare :class:`~MapRelativeNumberFieldToRelativeVectorSpace`.\n\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n sage: K.<a> = NumberFie...
class NumberFieldHomomorphism_im_gens(RingHomomorphism_im_gens): def __invert__(self): "\n Return the inverse of an isomorphism of absolute number fields\n\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n sage: K.<a> = NumberField(x^2 + 5)\n sage: tau1, tau2 = ...
class RelativeNumberFieldHomomorphism_from_abs(RingHomomorphism): '\n A homomorphism from a relative number field to some other ring, stored as a\n homomorphism from the corresponding absolute field.\n ' def __init__(self, parent, abs_hom): "\n EXAMPLES::\n\n sage: x = poly...
class CyclotomicFieldHomomorphism_im_gens(NumberFieldHomomorphism_im_gens): pass
class NumberFieldFractionalIdeal_rel(NumberFieldFractionalIdeal): "\n An ideal of a relative number field.\n\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n sage: K.<a> = NumberField([x^2 + 1, x^2 + 2]); K\n Number Field in a0 with defining polynomial x^2 + 1 over its base field\n ...
def is_NumberFieldFractionalIdeal_rel(x): "\n Return ``True`` if `x` is a fractional ideal of a relative number field.\n\n EXAMPLES::\n\n sage: from sage.rings.number_field.number_field_ideal_rel import is_NumberFieldFractionalIdeal_rel\n sage: from sage.rings.number_field.number_field_ideal i...
def is_RelativeNumberField(x): "\n Return ``True`` if `x` is a relative number field.\n\n EXAMPLES::\n\n sage: from sage.rings.number_field.number_field_rel import is_RelativeNumberField\n sage: x = polygen(ZZ, 'x')\n sage: is_RelativeNumberField(NumberField(x^2+1,'a'))\n False\n...
class NumberField_relative(NumberField_generic): "\n INPUT:\n\n - ``base`` -- the base field\n\n - ``polynomial`` -- a polynomial which must be defined in the ring `K[x]`,\n where `K` is the base field.\n\n - ``name`` -- a string, the variable name\n\n - ``latex_name`` -- a string or ``None`` ...
def NumberField_relative_v1(base_field, poly, name, latex_name, canonical_embedding=None): "\n Used for unpickling old pickles.\n\n EXAMPLES::\n\n sage: from sage.rings.number_field.number_field_rel import NumberField_relative_v1\n sage: R.<x> = CyclotomicField(3)[]\n sage: NumberField_...
def quadratic_order_class_number(disc): '\n Return the class number of the quadratic order of given discriminant.\n\n EXAMPLES::\n\n sage: from sage.rings.number_field.order import quadratic_order_class_number\n sage: quadratic_order_class_number(-419)\n 9\n sage: quadratic_order...
class OrderFactory(UniqueFactory): '\n Abstract base class for factories creating orders, such as\n :class:`AbsoluteOrderFactory` and :class:`RelativeOrderFactory`.\n\n TESTS::\n\n sage: from sage.rings.number_field.order import AbsoluteOrder, OrderFactory\n sage: isinstance(AbsoluteOrder, ...
class AbsoluteOrderFactory(OrderFactory): "\n An order in an (absolute) number field.\n\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n sage: K.<i> = NumberField(x^2 + 1)\n sage: K.order(i)\n Order in Number Field in i with defining polynomial x^2 + 1\n\n " def create_key_a...
class RelativeOrderFactory(OrderFactory): "\n An order in a relative number field extension.\n\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n sage: K.<i> = NumberField(x^2 + 1)\n sage: R.<j> = K[]\n sage: L.<j> = K.extension(j^2 - 2)\n sage: L.order([i, j])\n Relativ...
def is_NumberFieldOrder(R): "\n Return ``True`` if `R` is either an order in a number field or is the ring `\\ZZ` of integers.\n\n EXAMPLES::\n\n sage: from sage.rings.number_field.order import is_NumberFieldOrder\n sage: x = polygen(ZZ, 'x')\n sage: is_NumberFieldOrder(NumberField(x^2 ...
def EquationOrder(f, names, **kwds): "\n Return the equation order generated by a root of the irreducible\n polynomial `f` or list ``f`` of polynomials (to construct a relative\n equation order).\n\n IMPORTANT: Note that the generators of the returned order need\n *not* be roots of `f`, since the g...
class Order(IntegralDomain, sage.rings.abc.Order): "\n An order in a number field.\n\n An order is a subring of the number field that has `\\ZZ`-rank equal\n to the degree of the number field over `\\QQ`.\n\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n sage: K.<theta> = NumberField(x^4 +...
class Order_absolute(Order): def __init__(self, K, module_rep): '\n EXAMPLES::\n\n sage: from sage.rings.number_field.order import *\n sage: x = polygen(QQ)\n sage: K.<a> = NumberField(x^3 + 2)\n sage: V, from_v, to_v = K.vector_space()\n sage...
class Order_relative(Order): '\n A relative order in a number field.\n\n A relative order is an order in some relative number field.\n\n Invariants of this order may be computed with respect to the\n contained order.\n ' def __init__(self, K, absolute_order): "\n Create the rela...
def each_is_integral(v): "\n Return whether every element of the list ``v`` of elements of a number\n field is integral.\n\n EXAMPLES::\n\n sage: x = polygen(ZZ, 'x')\n sage: W.<sqrt5> = NumberField(x^2 - 5)\n sage: from sage.rings.number_field.order import each_is_integral\n ...
def absolute_order_from_ring_generators(gens, check_is_integral=True, check_rank=True, is_maximal=None, allow_subfield=False): "\n INPUT:\n\n - ``gens`` -- list of integral elements of an absolute order.\n - ``check_is_integral`` -- bool (default: ``True``), whether to check that each\n generator is...
def absolute_order_from_module_generators(gens, check_integral=True, check_rank=True, check_is_ring=True, is_maximal=None, allow_subfield=False, is_maximal_at=()): '\n INPUT:\n\n - ``gens`` -- list of elements of an absolute number field that generates an\n order in that number field as a `\\ZZ`-*modul...
def relative_order_from_ring_generators(gens, check_is_integral=True, check_rank=True, is_maximal=None, allow_subfield=False, is_maximal_at=()): "\n INPUT:\n\n - ``gens`` -- list of integral elements of an absolute order.\n - ``check_is_integral`` -- bool (default: ``True``), whether to check that each\n...
def GaussianIntegers(names='I', latex_name='i'): '\n Return the ring of Gaussian integers.\n\n This is the ring of all complex numbers\n of the form `a + b I` with `a` and `b` integers and `I = \\sqrt{-1}`.\n\n EXAMPLES::\n\n sage: ZZI.<I> = GaussianIntegers()\n sage: ZZI\n Gaussi...
def EisensteinIntegers(names='omega'): '\n Return the ring of Eisenstein integers.\n\n This is the ring of all complex numbers\n of the form `a + b \\omega` with `a` and `b` integers and\n `\\omega = (-1 + \\sqrt{-3})/2`.\n\n EXAMPLES::\n\n sage: R.<omega> = EisensteinIntegers()\n sag...
def _ideal_generator(I): '\n Return the generator of a principal ideal.\n\n INPUT:\n\n - ``I`` (fractional ideal or integer) -- either a fractional ideal of a\n number field, which must be principal, or a rational integer.\n\n OUTPUT:\n\n A generator of `I` when `I` is a principal ideal, else ...
def _coords_in_C_p(I, C, p): "\n Return coordinates of the ideal ``I`` with respect to a basis of\n the ``p``-torsion of the ideal class group ``C``.\n\n INPUT:\n\n - ``I`` (ideal) -- a fractional ideal of a number field ``K``,\n whose ``p``'th power is principal.\n\n - ``C`` (class group) -- ...
def _coords_in_C_mod_p(I, C, p): "\n Return coordinates of the ideal ``I`` with respect to a basis of\n the ``p``-cotorsion of the ideal class group ``C``.\n\n INPUT:\n\n - ``I`` (ideal) -- a fractional ideal of a number field ``K``.\n\n - ``C`` (class group) -- the ideal class group of ``K``.\n\n ...
def _root_ideal(I, C, p): "\n Return a ``p``'th root of an ideal with respect to the class group.\n\n INPUT:\n\n - ``I`` (ideal) -- a fractional ideal of a number field ``K``,\n whose ideal class is a ``p``'th power.\n\n - ``C`` (class group) -- the ideal class group of ``K``.\n\n - ``p`` (pri...
def coords_in_U_mod_p(u, U, p): "\n Return coordinates of a unit ``u`` with respect to a basis of the\n ``p``-cotorsion `U/U^p` of the unit group ``U``.\n\n INPUT:\n\n - ``u`` (algebraic unit) -- a unit in a number field ``K``.\n\n - ``U`` (unit group) -- the unit group of ``K``.\n\n - ``p`` (pr...
def basis_for_p_cokernel(S, C, p): "\n Return a basis for the group of ideals supported on ``S`` (mod\n ``p``'th-powers) whose class in the class group ``C`` is a ``p``'th power,\n together with a function which takes the ``S``-exponents of such an\n ideal and returns its coordinates on this basis.\n\...
def pSelmerGroup(K, S, p, proof=None, debug=False): "\n Return the `p`-Selmer group `K(S,p)` of the number field `K`\n with respect to the prime ideals in ``S``.\n\n INPUT:\n\n - ``K`` -- a number field or `\\QQ`.\n\n - ``S`` -- a list of prime ideals in `K`, or prime\n numbers when `K` is `\\...
class Small_primes_of_degree_one_iter(): '\n Iterator that finds primes of a number field of absolute degree\n one and bounded small prime norm.\n\n INPUT:\n\n - ``field`` -- a :class:`NumberField`.\n\n - ``num_integer_primes`` -- (default: 10000) an integer. We try to find\n primes of absolu...
class SplittingFieldAbort(Exception): '\n Special exception class to indicate an early abort of :func:`splitting_field`.\n\n EXAMPLES::\n\n sage: from sage.rings.number_field.splitting_field import SplittingFieldAbort\n sage: raise SplittingFieldAbort(20, 60)\n Traceback (most recent ca...
class SplittingData(): '\n A class to store data for internal use in :func:`splitting_field`.\n It contains two attributes :attr:`pol` (polynomial), :attr:`dm`\n (degree multiple), where ``pol`` is a PARI polynomial and\n ``dm`` a Sage :class:`Integer`.\n\n ``dm`` is a multiple of the degree of the...
def splitting_field(poly, name, map=False, degree_multiple=None, abort_degree=None, simplify=True, simplify_all=False): "\n Compute the splitting field of a given polynomial, defined over a\n number field.\n\n INPUT:\n\n - ``poly`` -- a monic polynomial over a number field\n\n - ``name`` -- a varia...
class NumberFieldStructure(UniqueRepresentation): '\n Abstract base class encapsulating information about a number fields\n relation to other number fields.\n\n TESTS::\n\n sage: from sage.rings.number_field.structure import NumberFieldStructure\n sage: NumberFieldStructure(QQ)\n <sa...
class NameChange(NumberFieldStructure): "\n Structure for a number field created by a change in variable name.\n\n INPUT:\n\n - ``other`` -- the number field from which this field has been created.\n\n TESTS::\n\n sage: from sage.rings.number_field.structure import NameChange\n sage: K.<...
class AbsoluteFromRelative(NumberFieldStructure): '\n Structure for an absolute number field created from a relative number\n field.\n\n INPUT:\n\n - ``other`` -- the number field from which this field has been created.\n\n TESTS::\n\n sage: from sage.rings.number_field.structure import Abso...
class RelativeFromAbsolute(NumberFieldStructure): '\n Structure for a relative number field created from an absolute number\n field.\n\n INPUT:\n\n - ``other`` -- the (absolute) number field from which this field has been\n created.\n\n - ``gen`` -- the generator of the intermediate field\n\n ...
class RelativeFromRelative(NumberFieldStructure): '\n Structure for a relative number field created from another relative number\n field.\n\n INPUT:\n\n - ``other`` -- the relative number field used in the construction, see\n :meth:`create_structure`; there this field will be called ``field_``.\n...
def coefficients_to_power_sums(n, m, a): "\n Take the list ``a``, representing a list of initial coefficients of\n a (monic) polynomial of degree `n`, and return the power sums\n of the roots of `f` up to `(m-1)`-th powers.\n\n INPUT:\n\n - ``n`` -- integer, the degree\n - ``a`` -- list of integ...
def __lagrange_bounds_phc(n, m, a, tmpfile=None): '\n This function determines the bounds on the roots in\n the enumeration of totally real fields via Lagrange multipliers.\n\n It is used internally by the main function\n enumerate_totallyreal_fields_prim(), which should be consulted for\n further ...
def integral_elements_in_box(K, C): "\n Return all integral elements of the totally real field `K` whose\n embeddings lie *numerically* within the bounds specified by the\n list ``C``. The output is architecture dependent, and one may want\n to expand the bounds that define ``C`` by some epsilon.\n\n...
class tr_data_rel(): '\n This class encodes the data used in the enumeration of totally real\n fields for relative extensions.\n\n We do not give a complete description here. For more information,\n see the attached functions; all of these are used internally by the\n functions in totallyreal_rel....
def enumerate_totallyreal_fields_rel(F, m, B, a=[], verbose=0, return_seqs=False, return_pari_objects=True): "\n This function enumerates (primitive) totally real field extensions of\n degree `m>1` of the totally real field F with discriminant `d \\leq B`;\n optionally one can specify the first few coeff...
def enumerate_totallyreal_fields_all(n, B, verbose=0, return_seqs=False, return_pari_objects=True): "\n Enumerate *all* totally real fields of degree ``n`` with discriminant\n at most ``B``, primitive or otherwise.\n\n INPUT:\n\n - ``n`` -- integer, the degree\n - ``B`` -- integer, the discriminant...
class UnitGroup(AbelianGroupWithValues_class): "\n The unit group or an `S`-unit group of a number field.\n\n TESTS::\n\n sage: x = polygen(QQ)\n sage: K.<a> = NumberField(x^4 + 23)\n sage: UK = K.unit_group()\n sage: u = UK.an_element(); u\n u0*u1\n sage: u.value(...
class EisensteinExtensionGeneric(pAdicExtensionGeneric): def __init__(self, poly, prec, print_mode, names, element_class): '\n Initializes ``self``.\n\n EXAMPLES::\n\n sage: A = Zp(7,10)\n sage: S.<x> = A[] # ne...
def _canonicalize_show_prec(type, print_mode, show_prec=None): "\n Return a canonical string value for show_prec depending of the type,\n the print_mode and the given value.\n\n INPUT:\n\n - ``type`` -- a string: ``'capped-rel'``, ``'capped-abs'``, ``'fixed-mod'`` or ``'floating-point'``,\n ``'la...
def get_key_base(p, prec, type, print_mode, names, ram_name, print_pos, print_sep, print_alphabet, print_max_terms, show_prec, check, valid_types, label=None): "\n This implements ``create_key`` for ``Zp`` and ``Qp``: moving it here prevents code duplication.\n\n It fills in unspecified values and checks fo...
class Qp_class(UniqueFactory): "\n A creation function for `p`-adic fields.\n\n INPUT:\n\n - ``p`` -- integer: the `p` in `\\QQ_p`\n\n - ``prec`` -- integer (default: ``20``) the precision cap of the field.\n In the lattice capped case, ``prec`` can either be a\n pair (``relative_cap``, ``ab...
def Qq(q, prec=None, type='capped-rel', modulus=None, names=None, print_mode=None, ram_name=None, res_name=None, print_pos=None, print_sep=None, print_max_ram_terms=None, print_max_unram_terms=None, print_max_terse_terms=None, show_prec=None, check=True, implementation='FLINT'): '\n Given a prime power `q = p^...
def QpCR(p, prec=None, *args, **kwds): '\n A shortcut function to create capped relative `p`-adic fields.\n\n Same functionality as :func:`Qp`. See documentation for :func:`Qp` for a\n description of the input parameters.\n\n EXAMPLES::\n\n sage: QpCR(5, 40)\n 5-adic Field with capped r...
def QpFP(p, prec=None, *args, **kwds): '\n A shortcut function to create floating point `p`-adic fields.\n\n Same functionality as :func:`Qp`. See documentation for :func:`Qp` for a\n description of the input parameters.\n\n EXAMPLES::\n\n sage: QpFP(5, 40)\n 5-adic Field with floating ...
def QqCR(q, prec=None, *args, **kwds): '\n A shortcut function to create capped relative unramified `p`-adic\n fields.\n\n Same functionality as :func:`Qq`. See documentation for :func:`Qq` for a\n description of the input parameters.\n\n EXAMPLES::\n\n sage: R.<a> = QqCR(25, 40); R ...
def QqFP(q, prec=None, *args, **kwds): '\n A shortcut function to create floating point unramified `p`-adic\n fields.\n\n Same functionality as :func:`Qq`. See documentation for :func:`Qq` for a\n description of the input parameters.\n\n EXAMPLES::\n\n sage: R.<a> = QqFP(25, 40); R ...
@experimental(23505) def QpLC(p, prec=None, *args, **kwds): '\n A shortcut function to create `p`-adic fields with lattice precision.\n\n See :func:`ZpLC` for more information about this model of precision.\n\n EXAMPLES::\n\n sage: R = QpLC(2)\n sage: R\n 2-adic Field with lattice-ca...
@experimental(23505) def QpLF(p, prec=None, *args, **kwds): '\n A shortcut function to create `p`-adic fields with lattice precision.\n\n See :func:`ZpLC` for more information about this model of precision.\n\n EXAMPLES::\n\n sage: R = QpLF(2)\n sage: R\n 2-adic Field with lattice-fl...
def QpER(p, prec=None, halt=None, secure=False, *args, **kwds): '\n A shortcut function to create relaxed `p`-adic fields.\n\n See :func:`ZpER` for more information about this model of precision.\n\n EXAMPLES::\n\n sage: R = QpER(2); R # n...
class Zp_class(UniqueFactory): "\n A creation function for `p`-adic rings.\n\n INPUT:\n\n - ``p`` -- integer: the `p` in `\\ZZ_p`\n\n - ``prec`` -- integer (default: ``20``) the precision cap of the\n ring. In the lattice capped case, ``prec`` can either be a\n pair (``relative_cap``, ``abs...
def Zq(q, prec=None, type='capped-rel', modulus=None, names=None, print_mode=None, ram_name=None, res_name=None, print_pos=None, print_sep=None, print_max_ram_terms=None, print_max_unram_terms=None, print_max_terse_terms=None, show_prec=None, check=True, implementation='FLINT'): '\n Given a prime power `q = p^...
def ZpCR(p, prec=None, *args, **kwds): '\n A shortcut function to create capped relative `p`-adic rings.\n\n Same functionality as :func:`Zp`. See documentation for :func:`Zp` for a\n description of the input parameters.\n\n EXAMPLES::\n\n sage: ZpCR(5, 40)\n 5-adic Ring with capped rel...
def ZpCA(p, prec=None, *args, **kwds): '\n A shortcut function to create capped absolute `p`-adic rings.\n\n See documentation for :func:`Zp` for a description of the input parameters.\n\n EXAMPLES::\n\n sage: ZpCA(5, 40)\n 5-adic Ring with capped absolute precision 40\n ' return Zp(...
def ZpFM(p, prec=None, *args, **kwds): '\n A shortcut function to create fixed modulus `p`-adic rings.\n\n See documentation for :func:`Zp` for a description of the input parameters.\n\n EXAMPLES::\n\n sage: ZpFM(5, 40)\n 5-adic Ring of fixed modulus 5^40\n ' return Zp(p, prec, 'fixe...
def ZpFP(p, prec=None, *args, **kwds): '\n A shortcut function to create floating point `p`-adic rings.\n\n Same functionality as :func:`Zp`. See documentation for :func:`Zp` for a\n description of the input parameters.\n\n EXAMPLES::\n\n sage: ZpFP(5, 40)\n 5-adic Ring with floating pr...
def ZqCR(q, prec=None, *args, **kwds): '\n A shortcut function to create capped relative unramified `p`-adic rings.\n\n Same functionality as :func:`Zq`. See documentation for :func:`Zq` for a\n description of the input parameters.\n\n EXAMPLES::\n\n sage: R.<a> = ZqCR(25, 40); R ...
def ZqCA(q, prec=None, *args, **kwds): '\n A shortcut function to create capped absolute unramified `p`-adic rings.\n\n See documentation for :func:`Zq` for a description of the input parameters.\n\n EXAMPLES::\n\n sage: R.<a> = ZqCA(25, 40); R # n...
def ZqFM(q, prec=None, *args, **kwds): '\n A shortcut function to create fixed modulus unramified `p`-adic rings.\n\n See documentation for :func:`Zq` for a description of the input parameters.\n\n EXAMPLES::\n\n sage: R.<a> = ZqFM(25, 40); R # nee...
def ZqFP(q, prec=None, *args, **kwds): '\n A shortcut function to create floating point unramified `p`-adic rings.\n\n Same functionality as :func:`Zq`. See documentation for :func:`Zq` for a\n description of the input parameters.\n\n EXAMPLES::\n\n sage: R.<a> = ZqFP(25, 40); R ...
@experimental(23505) def ZpLC(p, prec=None, *args, **kwds): "\n A shortcut function to create `p`-adic rings with lattice precision\n (precision is encoded by a lattice in a large vector space and tracked\n using automatic differentiation).\n\n See documentation for :func:`Zp` for a description of the...
@experimental(23505) def ZpLF(p, prec=None, *args, **kwds): '\n A shortcut function to create `p`-adic rings where precision\n is encoded by a module in a large vector space.\n\n See documentation for :func:`Zp` for a description of the input parameters.\n\n .. NOTE::\n\n The precision is track...
def ZpER(p, prec=None, halt=None, secure=False, *args, **kwds): '\n A shortcut function to create relaxed `p`-adic rings.\n\n INPUT:\n\n - ``prec`` -- an integer (default: ``20``), the default\n precision\n\n - ``halt`` -- an integer (default: twice ``prec``), the\n halting precision\n\n ...
class pAdicExtension_class(UniqueFactory): '\n A class for creating extensions of `p`-adic rings and fields.\n\n EXAMPLES::\n\n sage: R = Zp(5,3)\n sage: S.<x> = ZZ[]\n sage: W.<w> = pAdicExtension(R, x^4 - 15); W # needs sage.libs.ntl\n 5-adic ...
def split(poly, prec): '\n Given a polynomial ``poly`` and a desired precision ``prec``, computes\n ``upoly`` and epoly so that the extension defined by ``poly`` is isomorphic\n to the extension defined by first taking an extension by the unramified\n polynomial ``upoly``, and then an extension by the...
def truncate_to_prec(poly, R, absprec): '\n Truncates the unused precision off of a polynomial.\n\n EXAMPLES::\n\n sage: R = Zp(5)\n sage: S.<x> = R[] # needs sage.libs.ntl\n sage: from sage.rings.padics.factory import trunca...
def krasner_check(poly, prec): '\n Return ``True`` iff ``poly`` determines a unique isomorphism class of\n extensions at precision ``prec``.\n\n Currently just returns ``True`` (thus allowing extensions that are not\n defined to high enough precision in order to specify them up to\n isomorphism). ...
def is_eisenstein(poly): '\n Return ``True`` iff this monic polynomial is Eisenstein.\n\n A polynomial is Eisenstein if it is monic, the constant term has\n valuation 1 and all other terms have positive valuation.\n\n EXAMPLES::\n\n sage: # needs sage.libs.ntl\n sage: R = Zp(5)\n ...
def is_unramified(poly): '\n Return ``True`` iff this monic polynomial is unramified.\n\n A polynomial is unramified if its reduction modulo the maximal\n ideal is irreducible.\n\n EXAMPLES::\n\n sage: # needs sage.libs.ntl\n sage: R = Zp(5)\n sage: S.<x> = R[]\n sage: from...
class CappedAbsoluteGeneric(LocalGeneric): def is_capped_absolute(self): '\n Return whether this `p`-adic ring bounds precision in a\n capped absolute fashion.\n\n The absolute precision of an element is the power of `p` modulo\n which that element is defined. In a capped abs...
class CappedRelativeGeneric(LocalGeneric): def is_capped_relative(self): '\n Return whether this `p`-adic ring bounds precision in a capped\n relative fashion.\n\n The relative precision of an element is the power of p modulo\n which the unit part of that element is defined. ...
class FixedModGeneric(LocalGeneric): def is_fixed_mod(self): "\n Return whether this `p`-adic ring bounds precision in a fixed\n modulus fashion.\n\n The absolute precision of an element is the power of p modulo\n which that element is defined. In a fixed modulus ring, the\n ...