Skip to content

AdicValuation ​

The bb-adic valuation vb(x)v_b(x) — the power of bb dividing xx — with its companions: the norm ∣x∣b=b−v|x|_b = b^{-v} and the unit part uu in x=bv⋅ux = b^v · u.

AdicValuation(x)vb(x)v_b(x); PositiveInfinity for zero
Rustadic_valuation(x)
AdicNorm(x)b−vb(x)b^{-v_b(x)}: small when highly divisible by bb
Rustadic_valuation(x)
AdicUnitPart(x)x/bvb(x)x / b^{v_b(x)}, a unit of Zb\mathbb{Z}_b
Rustadic_valuation(x)
Typed signatures
TypePackageApplies
(value) -> integer | signed_infinitynumeralsalways

Domain: Numeral systems

Details
  • For composite bb this is the largest kk with bk∣xb^k | x, which is not a valuation in the strict sense (it is not additive: v10(2)+v10(5)=0≠v10(10)v_{10}(2) + v_{10}(5) = 0 ≠ v_{10}(10)) — but it is what the expansion's leading zeros count
  • A capped zero is O(bprec)O(b^{prec}), so its valuation is reported as the precision: all that is known
  • Wolfram's IntegerExponent[n, p] is the valuation on integers

Examples

11 more kept as data, checked against the oracles
Basic #
live ↗
InAdicValuation(AdicNumeral(5,75))\mathrm{AdicValuation}(\mathrm{AdicNumeral}(5, 75))Out22

The valuation of zero is PositiveInfinity, as the signature above says

live ↗
InAdicValuation(AdicNumeral(5,0))\mathrm{AdicValuation}(\mathrm{AdicNumeral}(5, 0))Out∞∞
live ↗
InAdicNorm(AdicNumeral(5,75))\mathrm{AdicNorm}(\mathrm{AdicNumeral}(5, 75))Out125\frac{1}{25}
live ↗
InAdicUnitPart(AdicNumeral(5,75))\mathrm{AdicUnitPart}(\mathrm{AdicNumeral}(5, 75))OutAdicNumeral(5,3)\mathrm{AdicNumeral}(5, 3)
Scope #

negative in Q5\mathbb{Q}_5

live ↗
InAdicValuation(AdicNumeral(5,325))\mathrm{AdicValuation}(\mathrm{AdicNumeral}(5, \frac{3}{25}))Out−2-2
About
Examples16
Checked againstSageMath 14 agreeRust 15 agree
CrosswalkRust

Implementation

mappedrustpackages/oracle/src/mappings.ts
mappedsagepackages/oracle/src/mappings.ts

See also: AdicNumeral, AdicExpansion