AdicNumeral
A -adic number: the rational read in (or for prime ), exact when built from a rational, when capped. The ring operations work on it.
AdicNumeral(b, x)exact: any rational whose denominator can invertSageMath
Qp(b, 60)(QQ(x))Rustadic(b, x)AdicNumeral(b, x, prec) known modulo , normalised to its representativeAdicNumeral(b, x, prec?)A -adic number: the rational read in (or for prime ), exact when built from a rational, when capped. The ring operations work on it.Typed signatures
| Type | Package | Applies |
|---|---|---|
(integer, rational | value, integer?) -> value | adelesreplaces numerals | on ProfiniteNumber |
(integer, rational | value, integer?) -> value | numerals | always |
Details
- Two values share the head. An EXACT adic is a rational, and its expansion can be produced to any depth (it is eventually periodic). A CAPPED adic is known only modulo — what a Hensel lift produces, and what any arithmetic with a capped operand yields; the precision of a sum is the weaker operand's, of a product
- Prime gives the field : any non-zero divisor works and the result may have negative valuation (digits past the point). Composite gives the ring — no field, zero divisors, and division only by units (coprime to )
- A rational the base cannot expand — in — leaves the call standing
- A rational operand beside an adic one is read in the same base, so
AdicNumeral(10, 1/3) * 3isAdicNumeral(10, 1). Adics of different bases never combine - Not a compute-engine number type: the value is a function expression, and
Add,Multiply,Negate,Divide,Powerare wrapped to recognise it (Subtractreaches them by canonicalisation) - Default precision for anything unbounded — Hensel lifting,
AdicSqrt— is 20 digits
Examples
1 more kept as data, checked against the oraclesScope #
Properties #
Possible issues #
About
| Examples | 12 |
|---|---|
| Checked against | SageMath 1 differ7 errorRust 1 agree7 error |
| Crosswalk | SageMathRust |
Implementation
mapped
wolframpackages/oracle/src/mappings.tsNo p-adic or b-adic numeral type in Wolfram -- no prior art to map against. Wolfram Function Repository searched too; only ExponentLift turned up (a p-adic valuation helper via the lifting-the-exponent lemma), not a numeral value type.
mapped
rustpackages/oracle/src/mappings.tsThe adic crate is p-adic only: our composite bases (10-adic) have no counterpart there.
mapped
sagepackages/oracle/src/mappings.tsSage's Qp is prime-p only too: composite bases have no counterpart there.
See also: AdicExpansion, AdicValuation, AdicSqrt, HenselLift, IntegerDigits