PAdicRational(p)

padic.spad line 543 [edit on github]

Stream-based implementation of Qp: numbers are represented as sum(i = k.., a[i] * p^i) where the a[i] lie in 0, 1, ..., (p - 1).

* : (%, %) -> %
from Magma
* : (%, Fraction(Integer)) -> %
from RightModule(Fraction(Integer))
* : (%, Integer) -> % if PAdicInteger(p) has LinearlyExplicitOver(Integer)
from RightModule(Integer)
* : (%, PAdicInteger(p)) -> %
from RightModule(PAdicInteger(p))
* : (Fraction(Integer), %) -> %
from LeftModule(Fraction(Integer))
* : (Integer, %) -> %
from AbelianGroup
* : (NonNegativeInteger, %) -> %
from AbelianMonoid
* : (PAdicInteger(p), %) -> %
from LeftModule(PAdicInteger(p))
* : (PositiveInteger, %) -> %
from AbelianSemiGroup
+ : (%, %) -> %
from AbelianSemiGroup
- : % -> %
from AbelianGroup
- : (%, %) -> %
from AbelianGroup
/ : (%, %) -> %
from Field
/ : (PAdicInteger(p), PAdicInteger(p)) -> %
from QuotientFieldCategory(PAdicInteger(p))
0 : () -> %
from AbelianMonoid
1 : () -> %
from MagmaWithUnit
< : (%, %) -> Boolean if PAdicInteger(p) has OrderedSet
from PartialOrder
<= : (%, %) -> Boolean if PAdicInteger(p) has OrderedSet
from PartialOrder
= : (%, %) -> Boolean
from BasicType
> : (%, %) -> Boolean if PAdicInteger(p) has OrderedSet
from PartialOrder
>= : (%, %) -> Boolean if PAdicInteger(p) has OrderedSet
from PartialOrder
D : % -> % if PAdicInteger(p) has DifferentialRing
from DifferentialRing
D : (%, List(Symbol)) -> % if PAdicInteger(p) has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
D : (%, List(Symbol), List(NonNegativeInteger)) -> % if PAdicInteger(p) has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
D : (%, Mapping(PAdicInteger(p), PAdicInteger(p))) -> %
from DifferentialExtension(PAdicInteger(p))
D : (%, Mapping(PAdicInteger(p), PAdicInteger(p)), NonNegativeInteger) -> %
from DifferentialExtension(PAdicInteger(p))
D : (%, NonNegativeInteger) -> % if PAdicInteger(p) has DifferentialRing
from DifferentialRing
D : (%, Symbol) -> % if PAdicInteger(p) has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
D : (%, Symbol, NonNegativeInteger) -> % if PAdicInteger(p) has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
^ : (%, Integer) -> %
from DivisionRing
^ : (%, NonNegativeInteger) -> %
from MagmaWithUnit
^ : (%, PositiveInteger) -> %
from Magma
abs : % -> % if PAdicInteger(p) has OrderedIntegralDomain
from OrderedRing
annihilate? : (%, %) -> Boolean
from Rng
antiCommutator : (%, %) -> %
from NonAssociativeSemiRng
approximate : (%, Integer) -> Fraction(Integer)

associates? : (%, %) -> Boolean
from EntireRing
associator : (%, %, %) -> %
from NonAssociativeRng
ceiling : % -> PAdicInteger(p) if PAdicInteger(p) has IntegerNumberSystem
from QuotientFieldCategory(PAdicInteger(p))
characteristic : () -> NonNegativeInteger
from NonAssociativeRing
charthRoot : % -> Union(%, "failed") if PAdicInteger(p) has CharacteristicNonZero or PAdicInteger(p) has PolynomialFactorizationExplicit and % has CharacteristicNonZero
from CharacteristicNonZero
coerce : % -> %
from Algebra(%)
coerce : Fraction(Integer) -> %
from CoercibleFrom(Fraction(Integer))
coerce : Integer -> %
from NonAssociativeRing
coerce : PAdicInteger(p) -> %
from Algebra(PAdicInteger(p))
coerce : Symbol -> % if PAdicInteger(p) has RetractableTo(Symbol)
from CoercibleFrom(Symbol)
coerce : % -> OutputForm
from CoercibleTo(OutputForm)
commutator : (%, %) -> %
from NonAssociativeRng
conditionP : Matrix(%) -> Union(Vector(%), "failed") if PAdicInteger(p) has PolynomialFactorizationExplicit and % has CharacteristicNonZero
from PolynomialFactorizationExplicit
continuedFraction : % -> ContinuedFraction(Fraction(Integer))

convert : % -> DoubleFloat if PAdicInteger(p) has RealConstant
from ConvertibleTo(DoubleFloat)
convert : % -> Float if PAdicInteger(p) has RealConstant
from ConvertibleTo(Float)
convert : % -> InputForm if PAdicInteger(p) has ConvertibleTo(InputForm)
from ConvertibleTo(InputForm)
convert : % -> Pattern(Float) if PAdicInteger(p) has ConvertibleTo(Pattern(Float))
from ConvertibleTo(Pattern(Float))
convert : % -> Pattern(Integer) if PAdicInteger(p) has ConvertibleTo(Pattern(Integer))
from ConvertibleTo(Pattern(Integer))
denom : % -> PAdicInteger(p)
from QuotientFieldCategory(PAdicInteger(p))
denominator : % -> %
from QuotientFieldCategory(PAdicInteger(p))
differentiate : % -> % if PAdicInteger(p) has DifferentialRing
from DifferentialRing
differentiate : (%, List(Symbol)) -> % if PAdicInteger(p) has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
differentiate : (%, List(Symbol), List(NonNegativeInteger)) -> % if PAdicInteger(p) has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
differentiate : (%, Mapping(PAdicInteger(p), PAdicInteger(p))) -> %
from DifferentialExtension(PAdicInteger(p))
differentiate : (%, Mapping(PAdicInteger(p), PAdicInteger(p)), NonNegativeInteger) -> %
from DifferentialExtension(PAdicInteger(p))
differentiate : (%, NonNegativeInteger) -> % if PAdicInteger(p) has DifferentialRing
from DifferentialRing
differentiate : (%, Symbol) -> % if PAdicInteger(p) has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
differentiate : (%, Symbol, NonNegativeInteger) -> % if PAdicInteger(p) has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
divide : (%, %) -> Record(quotient : %, remainder : %)
from EuclideanDomain
elt : (%, PAdicInteger(p)) -> % if PAdicInteger(p) has Eltable(PAdicInteger(p), PAdicInteger(p))
from Eltable(PAdicInteger(p), %)
euclideanSize : % -> NonNegativeInteger
from EuclideanDomain
eval : (%, Equation(PAdicInteger(p))) -> % if PAdicInteger(p) has Evalable(PAdicInteger(p))
from Evalable(PAdicInteger(p))
eval : (%, List(Equation(PAdicInteger(p)))) -> % if PAdicInteger(p) has Evalable(PAdicInteger(p))
from Evalable(PAdicInteger(p))
eval : (%, List(PAdicInteger(p)), List(PAdicInteger(p))) -> % if PAdicInteger(p) has Evalable(PAdicInteger(p))
from InnerEvalable(PAdicInteger(p), PAdicInteger(p))
eval : (%, List(Symbol), List(PAdicInteger(p))) -> % if PAdicInteger(p) has InnerEvalable(Symbol, PAdicInteger(p))
from InnerEvalable(Symbol, PAdicInteger(p))
eval : (%, PAdicInteger(p), PAdicInteger(p)) -> % if PAdicInteger(p) has Evalable(PAdicInteger(p))
from InnerEvalable(PAdicInteger(p), PAdicInteger(p))
eval : (%, Symbol, PAdicInteger(p)) -> % if PAdicInteger(p) has InnerEvalable(Symbol, PAdicInteger(p))
from InnerEvalable(Symbol, PAdicInteger(p))
expressIdealMember : (List(%), %) -> Union(List(%), "failed")
from PrincipalIdealDomain
exquo : (%, %) -> Union(%, "failed")
from EntireRing
extendedEuclidean : (%, %) -> Record(coef1 : %, coef2 : %, generator : %)
from EuclideanDomain
extendedEuclidean : (%, %, %) -> Union(Record(coef1 : %, coef2 : %), "failed")
from EuclideanDomain
factor : % -> Factored(%)
from UniqueFactorizationDomain
factorPolynomial : SparseUnivariatePolynomial(%) -> Factored(SparseUnivariatePolynomial(%)) if PAdicInteger(p) has PolynomialFactorizationExplicit
from PolynomialFactorizationExplicit
factorSquareFreePolynomial : SparseUnivariatePolynomial(%) -> Factored(SparseUnivariatePolynomial(%)) if PAdicInteger(p) has PolynomialFactorizationExplicit
from PolynomialFactorizationExplicit
floor : % -> PAdicInteger(p) if PAdicInteger(p) has IntegerNumberSystem
from QuotientFieldCategory(PAdicInteger(p))
fractionPart : % -> %
from QuotientFieldCategory(PAdicInteger(p))
gcd : (%, %) -> %
from GcdDomain
gcd : List(%) -> %
from GcdDomain
gcdPolynomial : (SparseUnivariatePolynomial(%), SparseUnivariatePolynomial(%)) -> SparseUnivariatePolynomial(%)
from PolynomialFactorizationExplicit
init : () -> % if PAdicInteger(p) has StepThrough
from StepThrough
inv : % -> %
from DivisionRing
latex : % -> String
from SetCategory
lcm : (%, %) -> %
from GcdDomain
lcm : List(%) -> %
from GcdDomain
lcmCoef : (%, %) -> Record(llcm_res : %, coeff1 : %, coeff2 : %)
from LeftOreRing
leftPower : (%, NonNegativeInteger) -> %
from MagmaWithUnit
leftPower : (%, PositiveInteger) -> %
from Magma
leftRecip : % -> Union(%, "failed")
from MagmaWithUnit
map : (Mapping(PAdicInteger(p), PAdicInteger(p)), %) -> %
from FullyEvalableOver(PAdicInteger(p))
max : (%, %) -> % if PAdicInteger(p) has OrderedSet
from OrderedSet
min : (%, %) -> % if PAdicInteger(p) has OrderedSet
from OrderedSet
multiEuclidean : (List(%), %) -> Union(List(%), "failed")
from EuclideanDomain
negative? : % -> Boolean if PAdicInteger(p) has OrderedIntegralDomain
from OrderedRing
nextItem : % -> Union(%, "failed") if PAdicInteger(p) has StepThrough
from StepThrough
numer : % -> PAdicInteger(p)
from QuotientFieldCategory(PAdicInteger(p))
numerator : % -> %
from QuotientFieldCategory(PAdicInteger(p))
one? : % -> Boolean
from MagmaWithUnit
opposite? : (%, %) -> Boolean
from AbelianMonoid
patternMatch : (%, Pattern(Float), PatternMatchResult(Float, %)) -> PatternMatchResult(Float, %) if PAdicInteger(p) has PatternMatchable(Float)
from PatternMatchable(Float)
patternMatch : (%, Pattern(Integer), PatternMatchResult(Integer, %)) -> PatternMatchResult(Integer, %) if PAdicInteger(p) has PatternMatchable(Integer)
from PatternMatchable(Integer)
plenaryPower : (%, PositiveInteger) -> %
from NonAssociativeAlgebra(%)
positive? : % -> Boolean if PAdicInteger(p) has OrderedIntegralDomain
from OrderedRing
prime? : % -> Boolean
from UniqueFactorizationDomain
principalIdeal : List(%) -> Record(coef : List(%), generator : %)
from PrincipalIdealDomain
quo : (%, %) -> %
from EuclideanDomain
recip : % -> Union(%, "failed")
from MagmaWithUnit
reducedSystem : Matrix(%) -> Matrix(Integer) if PAdicInteger(p) has LinearlyExplicitOver(Integer)
from LinearlyExplicitOver(Integer)
reducedSystem : Matrix(%) -> Matrix(PAdicInteger(p))
from LinearlyExplicitOver(PAdicInteger(p))
reducedSystem : (Matrix(%), Vector(%)) -> Record(mat : Matrix(Integer), vec : Vector(Integer)) if PAdicInteger(p) has LinearlyExplicitOver(Integer)
from LinearlyExplicitOver(Integer)
reducedSystem : (Matrix(%), Vector(%)) -> Record(mat : Matrix(PAdicInteger(p)), vec : Vector(PAdicInteger(p)))
from LinearlyExplicitOver(PAdicInteger(p))
rem : (%, %) -> %
from EuclideanDomain
removeZeroes : % -> %

removeZeroes : (Integer, %) -> %

retract : % -> Fraction(Integer) if PAdicInteger(p) has RetractableTo(Integer)
from RetractableTo(Fraction(Integer))
retract : % -> Integer if PAdicInteger(p) has RetractableTo(Integer)
from RetractableTo(Integer)
retract : % -> PAdicInteger(p)
from RetractableTo(PAdicInteger(p))
retract : % -> Symbol if PAdicInteger(p) has RetractableTo(Symbol)
from RetractableTo(Symbol)
retractIfCan : % -> Union(Fraction(Integer), "failed") if PAdicInteger(p) has RetractableTo(Integer)
from RetractableTo(Fraction(Integer))
retractIfCan : % -> Union(Integer, "failed") if PAdicInteger(p) has RetractableTo(Integer)
from RetractableTo(Integer)
retractIfCan : % -> Union(PAdicInteger(p), "failed")
from RetractableTo(PAdicInteger(p))
retractIfCan : % -> Union(Symbol, "failed") if PAdicInteger(p) has RetractableTo(Symbol)
from RetractableTo(Symbol)
rightPower : (%, NonNegativeInteger) -> %
from MagmaWithUnit
rightPower : (%, PositiveInteger) -> %
from Magma
rightRecip : % -> Union(%, "failed")
from MagmaWithUnit
sample : () -> %
from AbelianMonoid
sign : % -> Integer if PAdicInteger(p) has OrderedIntegralDomain
from OrderedRing
sizeLess? : (%, %) -> Boolean
from EuclideanDomain
smaller? : (%, %) -> Boolean if PAdicInteger(p) has Comparable
from Comparable
solveLinearPolynomialEquation : (List(SparseUnivariatePolynomial(%)), SparseUnivariatePolynomial(%)) -> Union(List(SparseUnivariatePolynomial(%)), "failed") if PAdicInteger(p) has PolynomialFactorizationExplicit
from PolynomialFactorizationExplicit
squareFree : % -> Factored(%)
from UniqueFactorizationDomain
squareFreePart : % -> %
from UniqueFactorizationDomain
squareFreePolynomial : SparseUnivariatePolynomial(%) -> Factored(SparseUnivariatePolynomial(%)) if PAdicInteger(p) has PolynomialFactorizationExplicit
from PolynomialFactorizationExplicit
subtractIfCan : (%, %) -> Union(%, "failed")
from CancellationAbelianMonoid
unit? : % -> Boolean
from EntireRing
unitCanonical : % -> %
from EntireRing
unitNormal : % -> Record(unit : %, canonical : %, associate : %)
from EntireRing
wholePart : % -> PAdicInteger(p)
from QuotientFieldCategory(PAdicInteger(p))
zero? : % -> Boolean
from AbelianMonoid
~= : (%, %) -> Boolean
from BasicType

Module(Fraction(Integer))

ConvertibleTo(Float)

PrincipalIdealDomain

NonAssociativeSemiRing

BiModule(%, %)

ConvertibleTo(InputForm)

Field

canonicalUnitNormal

Rng

QuotientFieldCategory(PAdicInteger(p))

CoercibleFrom(Integer)

TwoSidedRecip

OrderedAbelianGroup

SemiRing

EntireRing

NonAssociativeAlgebra(Fraction(Integer))

CharacteristicNonZero

unitsKnown

InnerEvalable(PAdicInteger(p), PAdicInteger(p))

PatternMatchable(Float)

LinearlyExplicitOver(PAdicInteger(p))

SetCategory

noZeroDivisors

RetractableTo(Fraction(Integer))

UniqueFactorizationDomain

SemiGroup

RightModule(Fraction(Integer))

Magma

RetractableTo(Symbol)

IntegralDomain

LeftModule(%)

Algebra(PAdicInteger(p))

NonAssociativeRing

GcdDomain

NonAssociativeAlgebra(%)

PartialDifferentialRing(Symbol)

CharacteristicZero

OrderedIntegralDomain

RetractableTo(PAdicInteger(p))

Algebra(%)

Evalable(PAdicInteger(p))

CoercibleFrom(Fraction(Integer))

DifferentialRing

OrderedAbelianMonoid

DivisionRing

CommutativeRing

NonAssociativeRng

PartialOrder

FullyEvalableOver(PAdicInteger(p))

NonAssociativeSemiRng

CancellationAbelianMonoid

EuclideanDomain

canonicalsClosed

RetractableTo(Integer)

OrderedCancellationAbelianMonoid

OrderedRing

CommutativeStar

AbelianMonoid

MagmaWithUnit

Comparable

CoercibleFrom(Symbol)

RightModule(%)

RealConstant

FullyLinearlyExplicitOver(PAdicInteger(p))

ConvertibleTo(DoubleFloat)

OrderedAbelianSemiGroup

NonAssociativeAlgebra(PAdicInteger(p))

Module(%)

LinearlyExplicitOver(Integer)

CoercibleTo(OutputForm)

RightModule(PAdicInteger(p))

ConvertibleTo(Pattern(Float))

SemiRng

CoercibleFrom(PAdicInteger(p))

InnerEvalable(Symbol, PAdicInteger(p))

Eltable(PAdicInteger(p), %)

Monoid

PolynomialFactorizationExplicit

Patternable(PAdicInteger(p))

LeftOreRing

OrderedSet

StepThrough

Algebra(Fraction(Integer))

Module(PAdicInteger(p))

BasicType

FullyPatternMatchable(PAdicInteger(p))

Ring

RightModule(Integer)

LeftModule(Fraction(Integer))

AbelianSemiGroup

BiModule(PAdicInteger(p), PAdicInteger(p))

DifferentialExtension(PAdicInteger(p))

PatternMatchable(Integer)

LeftModule(PAdicInteger(p))

BiModule(Fraction(Integer), Fraction(Integer))

ConvertibleTo(Pattern(Integer))

AbelianGroup