BalancedPAdicRational(p)

padic.spad line 559 [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 -(p - 1)/2, ..., (p - 1)/2.

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

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

convert : % -> DoubleFloat if BalancedPAdicInteger(p) has RealConstant
from ConvertibleTo(DoubleFloat)
convert : % -> Float if BalancedPAdicInteger(p) has RealConstant
from ConvertibleTo(Float)
convert : % -> InputForm if BalancedPAdicInteger(p) has ConvertibleTo(InputForm)
from ConvertibleTo(InputForm)
convert : % -> Pattern(Float) if BalancedPAdicInteger(p) has ConvertibleTo(Pattern(Float))
from ConvertibleTo(Pattern(Float))
convert : % -> Pattern(Integer) if BalancedPAdicInteger(p) has ConvertibleTo(Pattern(Integer))
from ConvertibleTo(Pattern(Integer))
denom : % -> BalancedPAdicInteger(p)
from QuotientFieldCategory(BalancedPAdicInteger(p))
denominator : % -> %
from QuotientFieldCategory(BalancedPAdicInteger(p))
differentiate : % -> % if BalancedPAdicInteger(p) has DifferentialRing
from DifferentialRing
differentiate : (%, List(Symbol)) -> % if BalancedPAdicInteger(p) has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
differentiate : (%, List(Symbol), List(NonNegativeInteger)) -> % if BalancedPAdicInteger(p) has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
differentiate : (%, Mapping(BalancedPAdicInteger(p), BalancedPAdicInteger(p))) -> %
from DifferentialExtension(BalancedPAdicInteger(p))
differentiate : (%, Mapping(BalancedPAdicInteger(p), BalancedPAdicInteger(p)), NonNegativeInteger) -> %
from DifferentialExtension(BalancedPAdicInteger(p))
differentiate : (%, NonNegativeInteger) -> % if BalancedPAdicInteger(p) has DifferentialRing
from DifferentialRing
differentiate : (%, Symbol) -> % if BalancedPAdicInteger(p) has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
differentiate : (%, Symbol, NonNegativeInteger) -> % if BalancedPAdicInteger(p) has PartialDifferentialRing(Symbol)
from PartialDifferentialRing(Symbol)
divide : (%, %) -> Record(quotient : %, remainder : %)
from EuclideanDomain
elt : (%, BalancedPAdicInteger(p)) -> % if BalancedPAdicInteger(p) has Eltable(BalancedPAdicInteger(p), BalancedPAdicInteger(p))
from Eltable(BalancedPAdicInteger(p), %)
euclideanSize : % -> NonNegativeInteger
from EuclideanDomain
eval : (%, BalancedPAdicInteger(p), BalancedPAdicInteger(p)) -> % if BalancedPAdicInteger(p) has Evalable(BalancedPAdicInteger(p))
from InnerEvalable(BalancedPAdicInteger(p), BalancedPAdicInteger(p))
eval : (%, Equation(BalancedPAdicInteger(p))) -> % if BalancedPAdicInteger(p) has Evalable(BalancedPAdicInteger(p))
from Evalable(BalancedPAdicInteger(p))
eval : (%, List(BalancedPAdicInteger(p)), List(BalancedPAdicInteger(p))) -> % if BalancedPAdicInteger(p) has Evalable(BalancedPAdicInteger(p))
from InnerEvalable(BalancedPAdicInteger(p), BalancedPAdicInteger(p))
eval : (%, List(Equation(BalancedPAdicInteger(p)))) -> % if BalancedPAdicInteger(p) has Evalable(BalancedPAdicInteger(p))
from Evalable(BalancedPAdicInteger(p))
eval : (%, List(Symbol), List(BalancedPAdicInteger(p))) -> % if BalancedPAdicInteger(p) has InnerEvalable(Symbol, BalancedPAdicInteger(p))
from InnerEvalable(Symbol, BalancedPAdicInteger(p))
eval : (%, Symbol, BalancedPAdicInteger(p)) -> % if BalancedPAdicInteger(p) has InnerEvalable(Symbol, BalancedPAdicInteger(p))
from InnerEvalable(Symbol, BalancedPAdicInteger(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 BalancedPAdicInteger(p) has PolynomialFactorizationExplicit
from PolynomialFactorizationExplicit
factorSquareFreePolynomial : SparseUnivariatePolynomial(%) -> Factored(SparseUnivariatePolynomial(%)) if BalancedPAdicInteger(p) has PolynomialFactorizationExplicit
from PolynomialFactorizationExplicit
floor : % -> BalancedPAdicInteger(p) if BalancedPAdicInteger(p) has IntegerNumberSystem
from QuotientFieldCategory(BalancedPAdicInteger(p))
fractionPart : % -> %
from QuotientFieldCategory(BalancedPAdicInteger(p))
gcd : (%, %) -> %
from GcdDomain
gcd : List(%) -> %
from GcdDomain
gcdPolynomial : (SparseUnivariatePolynomial(%), SparseUnivariatePolynomial(%)) -> SparseUnivariatePolynomial(%)
from PolynomialFactorizationExplicit
init : () -> % if BalancedPAdicInteger(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(BalancedPAdicInteger(p), BalancedPAdicInteger(p)), %) -> %
from FullyEvalableOver(BalancedPAdicInteger(p))
max : (%, %) -> % if BalancedPAdicInteger(p) has OrderedSet
from OrderedSet
min : (%, %) -> % if BalancedPAdicInteger(p) has OrderedSet
from OrderedSet
multiEuclidean : (List(%), %) -> Union(List(%), "failed")
from EuclideanDomain
negative? : % -> Boolean if BalancedPAdicInteger(p) has OrderedIntegralDomain
from OrderedRing
nextItem : % -> Union(%, "failed") if BalancedPAdicInteger(p) has StepThrough
from StepThrough
numer : % -> BalancedPAdicInteger(p)
from QuotientFieldCategory(BalancedPAdicInteger(p))
numerator : % -> %
from QuotientFieldCategory(BalancedPAdicInteger(p))
one? : % -> Boolean
from MagmaWithUnit
opposite? : (%, %) -> Boolean
from AbelianMonoid
patternMatch : (%, Pattern(Float), PatternMatchResult(Float, %)) -> PatternMatchResult(Float, %) if BalancedPAdicInteger(p) has PatternMatchable(Float)
from PatternMatchable(Float)
patternMatch : (%, Pattern(Integer), PatternMatchResult(Integer, %)) -> PatternMatchResult(Integer, %) if BalancedPAdicInteger(p) has PatternMatchable(Integer)
from PatternMatchable(Integer)
plenaryPower : (%, PositiveInteger) -> %
from NonAssociativeAlgebra(%)
positive? : % -> Boolean if BalancedPAdicInteger(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(BalancedPAdicInteger(p))
from LinearlyExplicitOver(BalancedPAdicInteger(p))
reducedSystem : Matrix(%) -> Matrix(Integer) if BalancedPAdicInteger(p) has LinearlyExplicitOver(Integer)
from LinearlyExplicitOver(Integer)
reducedSystem : (Matrix(%), Vector(%)) -> Record(mat : Matrix(BalancedPAdicInteger(p)), vec : Vector(BalancedPAdicInteger(p)))
from LinearlyExplicitOver(BalancedPAdicInteger(p))
reducedSystem : (Matrix(%), Vector(%)) -> Record(mat : Matrix(Integer), vec : Vector(Integer)) if BalancedPAdicInteger(p) has LinearlyExplicitOver(Integer)
from LinearlyExplicitOver(Integer)
rem : (%, %) -> %
from EuclideanDomain
removeZeroes : % -> %

removeZeroes : (Integer, %) -> %

retract : % -> BalancedPAdicInteger(p)
from RetractableTo(BalancedPAdicInteger(p))
retract : % -> Fraction(Integer) if BalancedPAdicInteger(p) has RetractableTo(Integer)
from RetractableTo(Fraction(Integer))
retract : % -> Integer if BalancedPAdicInteger(p) has RetractableTo(Integer)
from RetractableTo(Integer)
retract : % -> Symbol if BalancedPAdicInteger(p) has RetractableTo(Symbol)
from RetractableTo(Symbol)
retractIfCan : % -> Union(BalancedPAdicInteger(p), "failed")
from RetractableTo(BalancedPAdicInteger(p))
retractIfCan : % -> Union(Fraction(Integer), "failed") if BalancedPAdicInteger(p) has RetractableTo(Integer)
from RetractableTo(Fraction(Integer))
retractIfCan : % -> Union(Integer, "failed") if BalancedPAdicInteger(p) has RetractableTo(Integer)
from RetractableTo(Integer)
retractIfCan : % -> Union(Symbol, "failed") if BalancedPAdicInteger(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 BalancedPAdicInteger(p) has OrderedIntegralDomain
from OrderedRing
sizeLess? : (%, %) -> Boolean
from EuclideanDomain
smaller? : (%, %) -> Boolean if BalancedPAdicInteger(p) has Comparable
from Comparable
solveLinearPolynomialEquation : (List(SparseUnivariatePolynomial(%)), SparseUnivariatePolynomial(%)) -> Union(List(SparseUnivariatePolynomial(%)), "failed") if BalancedPAdicInteger(p) has PolynomialFactorizationExplicit
from PolynomialFactorizationExplicit
squareFree : % -> Factored(%)
from UniqueFactorizationDomain
squareFreePart : % -> %
from UniqueFactorizationDomain
squareFreePolynomial : SparseUnivariatePolynomial(%) -> Factored(SparseUnivariatePolynomial(%)) if BalancedPAdicInteger(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 : % -> BalancedPAdicInteger(p)
from QuotientFieldCategory(BalancedPAdicInteger(p))
zero? : % -> Boolean
from AbelianMonoid
~= : (%, %) -> Boolean
from BasicType

Algebra(BalancedPAdicInteger(p))

Module(Fraction(Integer))

ConvertibleTo(Float)

PrincipalIdealDomain

OrderedAbelianSemiGroup

NonAssociativeSemiRing

BiModule(%, %)

ConvertibleTo(InputForm)

Field

canonicalUnitNormal

Rng

CoercibleFrom(Integer)

TwoSidedRecip

RightModule(BalancedPAdicInteger(p))

SemiRing

EntireRing

PatternMatchable(Float)

NonAssociativeAlgebra(Fraction(Integer))

CharacteristicNonZero

InnerEvalable(BalancedPAdicInteger(p), BalancedPAdicInteger(p))

unitsKnown

FullyEvalableOver(BalancedPAdicInteger(p))

FullyLinearlyExplicitOver(BalancedPAdicInteger(p))

QuotientFieldCategory(BalancedPAdicInteger(p))

LinearlyExplicitOver(BalancedPAdicInteger(p))

noZeroDivisors

RetractableTo(Fraction(Integer))

LeftModule(BalancedPAdicInteger(p))

RetractableTo(BalancedPAdicInteger(p))

UniqueFactorizationDomain

SemiGroup

RightModule(Fraction(Integer))

Magma

RetractableTo(Symbol)

IntegralDomain

LeftModule(%)

Patternable(BalancedPAdicInteger(p))

GcdDomain

NonAssociativeAlgebra(%)

Eltable(BalancedPAdicInteger(p), %)

PartialDifferentialRing(Symbol)

CharacteristicZero

CoercibleFrom(BalancedPAdicInteger(p))

BiModule(BalancedPAdicInteger(p), BalancedPAdicInteger(p))

OrderedIntegralDomain

Algebra(%)

Ring

CoercibleFrom(Fraction(Integer))

DifferentialRing

FullyPatternMatchable(BalancedPAdicInteger(p))

OrderedAbelianMonoid

DivisionRing

CommutativeRing

OrderedAbelianGroup

PartialOrder

NonAssociativeSemiRng

CancellationAbelianMonoid

EuclideanDomain

canonicalsClosed

RetractableTo(Integer)

OrderedCancellationAbelianMonoid

Module(BalancedPAdicInteger(p))

OrderedRing

CommutativeStar

AbelianMonoid

MagmaWithUnit

Comparable

NonAssociativeRing

RightModule(%)

RealConstant

InnerEvalable(Symbol, BalancedPAdicInteger(p))

ConvertibleTo(DoubleFloat)

DifferentialExtension(BalancedPAdicInteger(p))

Module(%)

LinearlyExplicitOver(Integer)

CoercibleTo(OutputForm)

ConvertibleTo(Pattern(Float))

SemiRng

CoercibleFrom(Symbol)

Monoid

PolynomialFactorizationExplicit

NonAssociativeAlgebra(BalancedPAdicInteger(p))

LeftOreRing

OrderedSet

StepThrough

Algebra(Fraction(Integer))

BasicType

RightModule(Integer)

LeftModule(Fraction(Integer))

AbelianSemiGroup

SetCategory

NonAssociativeRng

PatternMatchable(Integer)

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

Evalable(BalancedPAdicInteger(p))

ConvertibleTo(Pattern(Integer))

AbelianGroup