# BalancedPAdicRational p¶

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`.

0: %

from AbelianMonoid

1: %

from MagmaWithUnit

*: (%, %) -> %

from LeftModule %

*: (%, BalancedPAdicInteger p) -> %
*: (%, Fraction Integer) -> %
*: (%, Integer) -> % if BalancedPAdicInteger p has LinearlyExplicitOver Integer
*: (BalancedPAdicInteger p, %) -> %
*: (Fraction Integer, %) -> %
*: (Integer, %) -> %

from AbelianGroup

*: (NonNegativeInteger, %) -> %

from AbelianMonoid

*: (PositiveInteger, %) -> %

from AbelianSemiGroup

+: (%, %) -> %

from AbelianSemiGroup

-: % -> %

from AbelianGroup

-: (%, %) -> %

from AbelianGroup

/: (%, %) -> %

from Field

/: (BalancedPAdicInteger p, BalancedPAdicInteger p) -> %
<=: (%, %) -> 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

^: (%, Integer) -> %

from DivisionRing

^: (%, NonNegativeInteger) -> %

from MagmaWithUnit

^: (%, PositiveInteger) -> %

from Magma

~=: (%, %) -> Boolean

from BasicType

abs: % -> % if BalancedPAdicInteger p has OrderedIntegralDomain

from OrderedRing

annihilate?: (%, %) -> Boolean

from Rng

antiCommutator: (%, %) -> %

approximate: (%, Integer) -> Fraction Integer

associates?: (%, %) -> Boolean

from EntireRing

associator: (%, %, %) -> %
ceiling: % -> BalancedPAdicInteger p if BalancedPAdicInteger p has IntegerNumberSystem
characteristic: () -> NonNegativeInteger
charthRoot: % -> Union(%, failed) if BalancedPAdicInteger p has CharacteristicNonZero or % has CharacteristicNonZero and BalancedPAdicInteger p has PolynomialFactorizationExplicit
coerce: % -> %

from Algebra %

coerce: % -> OutputForm
coerce: BalancedPAdicInteger p -> %
coerce: Fraction Integer -> %
coerce: Integer -> %
coerce: Symbol -> % if BalancedPAdicInteger p has RetractableTo Symbol
commutator: (%, %) -> %
conditionP: Matrix % -> Union(Vector %, failed) if % has CharacteristicNonZero and BalancedPAdicInteger p has PolynomialFactorizationExplicit

continuedFraction: % -> ContinuedFraction Fraction Integer

convert: % -> DoubleFloat if BalancedPAdicInteger p has RealConstant
convert: % -> Float if BalancedPAdicInteger p has RealConstant
convert: % -> InputForm if BalancedPAdicInteger p has ConvertibleTo InputForm
convert: % -> Pattern Float if BalancedPAdicInteger p has ConvertibleTo Pattern Float
convert: % -> Pattern Integer if BalancedPAdicInteger p has ConvertibleTo Pattern Integer
D: % -> % if BalancedPAdicInteger p has DifferentialRing

from DifferentialRing

D: (%, BalancedPAdicInteger p -> BalancedPAdicInteger p) -> %
D: (%, BalancedPAdicInteger p -> BalancedPAdicInteger p, NonNegativeInteger) -> %
D: (%, List Symbol) -> % if BalancedPAdicInteger p has PartialDifferentialRing Symbol
D: (%, List Symbol, List NonNegativeInteger) -> % if BalancedPAdicInteger p has PartialDifferentialRing Symbol
D: (%, NonNegativeInteger) -> % if BalancedPAdicInteger p has DifferentialRing

from DifferentialRing

D: (%, Symbol) -> % if BalancedPAdicInteger p has PartialDifferentialRing Symbol
D: (%, Symbol, NonNegativeInteger) -> % if BalancedPAdicInteger p has PartialDifferentialRing Symbol
denom: % -> BalancedPAdicInteger p
denominator: % -> %
differentiate: % -> % if BalancedPAdicInteger p has DifferentialRing

from DifferentialRing

differentiate: (%, BalancedPAdicInteger p -> BalancedPAdicInteger p) -> %
differentiate: (%, BalancedPAdicInteger p -> BalancedPAdicInteger p, NonNegativeInteger) -> %
differentiate: (%, List Symbol) -> % if BalancedPAdicInteger p has PartialDifferentialRing Symbol
differentiate: (%, List Symbol, List NonNegativeInteger) -> % if BalancedPAdicInteger p has PartialDifferentialRing Symbol
differentiate: (%, NonNegativeInteger) -> % if BalancedPAdicInteger p has DifferentialRing

from DifferentialRing

differentiate: (%, Symbol) -> % if BalancedPAdicInteger p has PartialDifferentialRing Symbol
differentiate: (%, Symbol, NonNegativeInteger) -> % if BalancedPAdicInteger p has 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
eval: (%, Equation BalancedPAdicInteger p) -> % if BalancedPAdicInteger p has Evalable BalancedPAdicInteger p
eval: (%, List BalancedPAdicInteger p, List BalancedPAdicInteger p) -> % if BalancedPAdicInteger p has Evalable BalancedPAdicInteger p
eval: (%, List Equation BalancedPAdicInteger p) -> % if BalancedPAdicInteger p has Evalable BalancedPAdicInteger p
eval: (%, List Symbol, List BalancedPAdicInteger p) -> % if BalancedPAdicInteger p has InnerEvalable(Symbol, BalancedPAdicInteger p)
eval: (%, Symbol, BalancedPAdicInteger p) -> % if BalancedPAdicInteger p has InnerEvalable(Symbol, BalancedPAdicInteger p)
expressIdealMember: (List %, %) -> Union(List %, failed)
exquo: (%, %) -> Union(%, failed)

from EntireRing

extendedEuclidean: (%, %) -> Record(coef1: %, coef2: %, generator: %)

from EuclideanDomain

extendedEuclidean: (%, %, %) -> Union(Record(coef1: %, coef2: %), failed)

from EuclideanDomain

factor: % -> Factored %
factorPolynomial: SparseUnivariatePolynomial % -> Factored SparseUnivariatePolynomial % if BalancedPAdicInteger p has PolynomialFactorizationExplicit
factorSquareFreePolynomial: SparseUnivariatePolynomial % -> Factored SparseUnivariatePolynomial % if BalancedPAdicInteger p has PolynomialFactorizationExplicit
floor: % -> BalancedPAdicInteger p if BalancedPAdicInteger p has IntegerNumberSystem
fractionPart: % -> %
gcd: (%, %) -> %

from GcdDomain

gcd: List % -> %

from GcdDomain

gcdPolynomial: (SparseUnivariatePolynomial %, SparseUnivariatePolynomial %) -> SparseUnivariatePolynomial %

from GcdDomain

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: (BalancedPAdicInteger p -> 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
numerator: % -> %
one?: % -> Boolean

from MagmaWithUnit

opposite?: (%, %) -> Boolean

from AbelianMonoid

patternMatch: (%, Pattern Float, PatternMatchResult(Float, %)) -> PatternMatchResult(Float, %) if BalancedPAdicInteger p has PatternMatchable Float
patternMatch: (%, Pattern Integer, PatternMatchResult(Integer, %)) -> PatternMatchResult(Integer, %) if BalancedPAdicInteger p has PatternMatchable Integer
plenaryPower: (%, PositiveInteger) -> %
positive?: % -> Boolean if BalancedPAdicInteger p has OrderedIntegralDomain

from OrderedRing

prime?: % -> Boolean
principalIdeal: List % -> Record(coef: List %, generator: %)
quo: (%, %) -> %

from EuclideanDomain

recip: % -> Union(%, failed)

from MagmaWithUnit

reducedSystem: (Matrix %, Vector %) -> Record(mat: Matrix BalancedPAdicInteger p, vec: Vector BalancedPAdicInteger p)
reducedSystem: (Matrix %, Vector %) -> Record(mat: Matrix Integer, vec: Vector Integer) if BalancedPAdicInteger p has LinearlyExplicitOver Integer
reducedSystem: Matrix % -> Matrix BalancedPAdicInteger p
reducedSystem: Matrix % -> Matrix Integer if BalancedPAdicInteger p has LinearlyExplicitOver Integer
rem: (%, %) -> %

from EuclideanDomain

removeZeroes: % -> %

removeZeroes: (Integer, %) -> %

retract: % -> BalancedPAdicInteger p
retract: % -> Fraction Integer if BalancedPAdicInteger p has RetractableTo Integer
retract: % -> Integer if BalancedPAdicInteger p has RetractableTo Integer
retract: % -> Symbol if BalancedPAdicInteger p has RetractableTo Symbol
retractIfCan: % -> Union(BalancedPAdicInteger p, failed)
retractIfCan: % -> Union(Fraction Integer, failed) if BalancedPAdicInteger p has RetractableTo Integer
retractIfCan: % -> Union(Integer, failed) if BalancedPAdicInteger p has RetractableTo Integer
retractIfCan: % -> Union(Symbol, failed) if BalancedPAdicInteger p has 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
squareFree: % -> Factored %
squareFreePart: % -> %
squareFreePolynomial: SparseUnivariatePolynomial % -> Factored SparseUnivariatePolynomial % if BalancedPAdicInteger p has PolynomialFactorizationExplicit
subtractIfCan: (%, %) -> Union(%, failed)
unit?: % -> Boolean

from EntireRing

unitCanonical: % -> %

from EntireRing

unitNormal: % -> Record(unit: %, canonical: %, associate: %)

from EntireRing

wholePart: % -> BalancedPAdicInteger p
zero?: % -> Boolean

from AbelianMonoid

AbelianGroup

AbelianMonoid

AbelianSemiGroup

BasicType

BiModule(%, %)

CancellationAbelianMonoid

canonicalsClosed

canonicalUnitNormal

CharacteristicZero

CommutativeRing

CommutativeStar

DivisionRing

EntireRing

EuclideanDomain

Field

GcdDomain

IntegralDomain

LeftOreRing

Magma

MagmaWithUnit

Monoid

NonAssociativeRing

NonAssociativeRng

NonAssociativeSemiRing

NonAssociativeSemiRng

noZeroDivisors

PrincipalIdealDomain

Ring

Rng

SemiGroup

SemiRing

SemiRng

SetCategory

TwoSidedRecip

UniqueFactorizationDomain

unitsKnown