Skip to content

ProfiniteNumber ​

A profinite number: the rational x+mZ^x + m\hat{\mathbb{Z}} in Q^=Z^⊗Q\hat{\mathbb{Q}} = \hat{\mathbb{Z}} \otimes \mathbb{Q}, known modulo mm. Modulus 0 (the default) is just the rational xx itself.

ProfiniteNumber(x, m)xx known modulo mm — a coset of mZ^m\hat{\mathbb{Z}}
SageMathQhat(x, m)
ProfiniteNumber(x)exact: modulus 0, so just the rational xx
SageMathQhat(x)
ProfiniteNumber(list)glue a list of AdicNumeral values by CRT into one profinite number
SageMathQhat(list)
Typed signatures
TypePackageApplies
(list<value> | value, number?) -> valueadelesalways

Domain: Adèles and idèles

Details
  • Z^=lim←⁡Z/nZ\hat{\mathbb{Z}} = \varprojlim \mathbb{Z}/n\mathbb{Z}, the profinite completion of Z\mathbb{Z}; Q^=Z^⊗Q\hat{\mathbb{Q}} = \hat{\mathbb{Z}} \otimes \mathbb{Q} is the finite adèle ring, one coordinate per prime bundled together.
  • Add, Multiply, Negate, Divide, Power, Equal, NotEqual are wrapped to recognise a ProfiniteNumber operand, like AdicNumeral.
  • Numerator and Denominator split a profinite number into its numerator and denominator as profinite numbers (the denominator as an ordinary integer); AdicNumeral(p, z) projects it to Qp\mathbb{Q}_p; Fibonacci and LucasL take a profinite argument (Lenstra's profinite Fibonacci numbers).
  • ProfiniteNumber({AdicNumeral(p1, …), AdicNumeral(p2, …), …}) reassembles a profinite number from its images at several primes by the Chinese remainder theorem.

Examples

24 more kept as data, checked against the oracles
Basic #

12Z^+8Z^=4Z^12\hat{\mathbb{Z}} + 8\hat{\mathbb{Z}} = 4\hat{\mathbb{Z}}

live ↗
InProfiniteNumber(3,12)+ProfiniteNumber(5,8)\mathrm{ProfiniteNumber}(3, 12)+\mathrm{ProfiniteNumber}(5, 8)OutProfiniteNumber(0,4)\mathrm{ProfiniteNumber}(0, 4)
live ↗
InProfiniteNumber(3,12)ProfiniteNumber(5,8)\mathrm{ProfiniteNumber}(3, 12)\mathrm{ProfiniteNumber}(5, 8)OutProfiniteNumber(3,12)\mathrm{ProfiniteNumber}(3, 12)

equal cosets need not share a modulus

live ↗
InProfiniteNumber(6,20)=ProfiniteNumber(6,40)\mathrm{ProfiniteNumber}(6, 20)=\mathrm{ProfiniteNumber}(6, 40)OutTrue\mathrm{True}
live ↗
InNumerator(ProfiniteNumber(23,5))\mathrm{Numerator}(\mathrm{ProfiniteNumber}(\frac{2}{3}, 5))OutProfiniteNumber(2,15)\mathrm{ProfiniteNumber}(2, 15)
live ↗
InDenominator(ProfiniteNumber(23,5))\mathrm{Denominator}(\mathrm{ProfiniteNumber}(\frac{2}{3}, 5))Out33

projecting to Q2\mathbb{Q}_2

live ↗
InAdicNumeral(2,ProfiniteNumber(100,24))\mathrm{AdicNumeral}(2, \mathrm{ProfiniteNumber}(100, 24))OutAdicNumeral(2,4,3)\mathrm{AdicNumeral}(2, 4, 3)

projecting to Q3\mathbb{Q}_3

live ↗
InAdicNumeral(3,ProfiniteNumber(100,24))\mathrm{AdicNumeral}(3, \mathrm{ProfiniteNumber}(100, 24))OutAdicNumeral(3,1,1)\mathrm{AdicNumeral}(3, 1, 1)
live ↗
InProfiniteNumber(26,20)\mathrm{ProfiniteNumber}(26, 20)OutProfiniteNumber(6,20)\mathrm{ProfiniteNumber}(6, 20)
live ↗
InProfiniteNumber(−1,12)\mathrm{ProfiniteNumber}(-1, 12)OutProfiniteNumber(11,12)\mathrm{ProfiniteNumber}(11, 12)
live ↗
InProfiniteNumber(5,−12)\mathrm{ProfiniteNumber}(5, -12)OutProfiniteNumber(5,12)\mathrm{ProfiniteNumber}(5, 12)
live ↗
InProfiniteNumber(72,32)\mathrm{ProfiniteNumber}(\frac{7}{2}, \frac{3}{2})OutProfiniteNumber(12,32)\mathrm{ProfiniteNumber}(\frac{1}{2}, \frac{3}{2})
live ↗
InProfiniteNumber(13,0)\mathrm{ProfiniteNumber}(\frac{1}{3}, 0)Out13\frac{1}{3}
live ↗
InProfiniteNumber(7,30)−2\mathrm{ProfiniteNumber}(7, 30)-2OutProfiniteNumber(5,30)\mathrm{ProfiniteNumber}(5, 30)
live ↗
InProfiniteNumber(3,12)2\mathrm{ProfiniteNumber}(3, 12)^2OutProfiniteNumber(9,36)\mathrm{ProfiniteNumber}(9, 36)
live ↗
InProfiniteNumber(4,12)2\frac{\mathrm{ProfiniteNumber}(4, 12)}{2}OutProfiniteNumber(2,6)\mathrm{ProfiniteNumber}(2, 6)
Scope #

CRT: glued from its 2-adic and 3-adic images

live ↗
InProfiniteNumber([AdicNumeral(2,20,5),AdicNumeral(3,7,2)])\mathrm{ProfiniteNumber}(\bigl\lbrack\mathrm{AdicNumeral}(2, 20, 5), \mathrm{AdicNumeral}(3, 7, 2)\bigr\rbrack)OutProfiniteNumber(52,288)\mathrm{ProfiniteNumber}(52, 288)

a rational value and a rational modulus

live ↗
InProfiniteNumber(12,975)+ProfiniteNumber(13,10)\mathrm{ProfiniteNumber}(\frac{1}{2}, \frac{97}{5})+\mathrm{ProfiniteNumber}(\frac{1}{3}, 10)OutProfiniteNumber(130,15)\mathrm{ProfiniteNumber}(\frac{1}{30}, \frac{1}{5})
Applications #

Lenstra's profinite Fibonacci numbers

live ↗
InFibonacci(ProfiniteNumber(3,10))\mathrm{Fibonacci}(\mathrm{ProfiniteNumber}(3, 10))OutProfiniteNumber(2,11)\mathrm{ProfiniteNumber}(2, 11)

Lenstra's profinite Lucas numbers

live ↗
InLucasL(ProfiniteNumber(3,10))\mathrm{LucasL}(\mathrm{ProfiniteNumber}(3, 10))OutProfiniteNumber(4,11)\mathrm{ProfiniteNumber}(4, 11)
Properties #

gluing the projections at every prime of the modulus is the identity

live ↗
InProfiniteNumber([AdicNumeral(2,ProfiniteNumber(100,24)),AdicNumeral(3,ProfiniteNumber(100,24))])\mathrm{ProfiniteNumber}(\bigl\lbrack\mathrm{AdicNumeral}(2, \mathrm{ProfiniteNumber}(100, 24)), \mathrm{AdicNumeral}(3, \mathrm{ProfiniteNumber}(100, 24))\bigr\rbrack)OutProfiniteNumber(4,24)\mathrm{ProfiniteNumber}(4, 24)
Possible issues #

5 does not divide the modulus, so nothing is known at 5

live ↗
InAdicNumeral(5,ProfiniteNumber(100,24))\mathrm{AdicNumeral}(5, \mathrm{ProfiniteNumber}(100, 24))OutAdicNumeral(5,ProfiniteNumber(4,24))\mathrm{AdicNumeral}(5, \mathrm{ProfiniteNumber}(4, 24))

only an exact divisor works; a profinite divisor leaves the call standing

live ↗
In1ProfiniteNumber(5,12)\frac{1}{\mathrm{ProfiniteNumber}(5, 12)}Out1ProfiniteNumber(5,12)\frac{1}{\mathrm{ProfiniteNumber}(5, 12)}

a non-integer profinite numerator leaves Fibonacci standing

live ↗
InFibonacci(ProfiniteNumber(12,3))\mathrm{Fibonacci}(\mathrm{ProfiniteNumber}(\frac{1}{2}, 3))OutFibonacci(ProfiniteNumber(12,3))\mathrm{Fibonacci}(\mathrm{ProfiniteNumber}(\frac{1}{2}, 3))

native behavior on a plain rational is untouched

live ↗
InNumerator(34)\mathrm{Numerator}(\frac{3}{4})Out33

native behavior on a plain rational is untouched

live ↗
InDenominator(34)\mathrm{Denominator}(\frac{3}{4})Out44

only ProfiniteNumber gets Numerator; Adele does not

live ↗
InNumerator(Adele(5))\mathrm{Numerator}(\mathrm{Adele}(5))OutNumerator(Adele(5))\mathrm{Numerator}(\mathrm{Adele}(5))
About
Examples50
Checked againstSageMath 24 agree
CrosswalkSageMath ×2

Implementation

mappedwolframpackages/oracle/src/mappings.ts

No adele/idele or profinite-integer type in Wolfram -- no prior art to map against. Wolfram Function Repository searched too; nothing for adeles or profinite integers.

mappedsagepackages/oracle/src/mappings.ts

Hertogh's adeles package (github.com/mathehertogh/adeles); the exact case, modulus 0. The list-of-AdicNumeral glue form also has arity 1, but AdicNumeral itself is unmapped for sage, so those examples simply fail to emit rather than being mis-evaluated by this row.

mappedsagepackages/oracle/src/mappings.ts

Hertogh's adeles package; $1 known modulo $2.

See also: Adele, Idele, AdicNumeral, ProfiniteDecomposition