Profinite Integers¶
Profinite Integers of Number Fields
This file implements rings of profinite integers over number fields and their elements.
Let \(K\) be a number field and \(O\) its ring of integers. For \(O\)-ideals \(I\) and \(J\) with \(I\) dividing \(J\) we have a canonical map \(O/J \to O/I\). The familie \(\{O/I\}_I\) with \(I\) running over the non-zero \(O\)-ideals together with these canonical maps form a projective system of topological rings (where each \(O/I\) is given the discrete topology). Taking the projective limit results in the topological ring
of profinite `K`-integers. It is naturally a commutative \(O\)-algebra as well.
Profinite Integers over \(\QQ\)¶
In SageMath the ring of profinite \(\QQ\)-integers \(\hat{\ZZ}\) and its elements look like this:
sage: Zhat
Ring of Profinite Integers of Rational Field
sage: Zhat is ProfiniteIntegers(QQ)
True
sage: Zhat.an_element()
2 mod 6
This element 2 mod 6
is an approximation to the integer 2 in \(\hat{\ZZ}\).
It represents all profinite integers in the open subset \(2 + 6\hat{\ZZ}\) of
\(\hat{\ZZ}\). Hence 2 mod 6
also represents the integers 8 and -4, but not
5:
sage: a = Zhat(2, 6); a
2 mod 6
sage: a.represents(8)
True
sage: a.represents(-4)
True
sage: a.represents(5)
False
sage: [n for n in range(-20, 30) if a.represents(n)]
[-16, -10, -4, 2, 8, 14, 20, 26]
A sum of a profinite integer in \(2+6\hat{\ZZ}\) and a profinite integer in \(5+15\hat{\ZZ}\) will lie in \(1+3\hat{\ZZ}\), while any product will lie in \(10+30\hat{\ZZ}\):
sage: b = Zhat(5, 15); b
5 mod 15
sage: a + b
1 mod 3
sage: a * b
10 mod 30
The Chinese Remainder Theorem induces a natural isomorphism
where \(p\) ranges over all prime numbers and \(\ZZ_p\) denotes the ring of \(p\)-adic integers. This point of view can be taken in SageMath as well:
sage: a_2 = Zp(2)(7, 4); a_2
1 + 2 + 2^2 + O(2^4)
sage: a_5 = Zp(5)(2, 2); a_5
2 + O(5^2)
sage: a = Zhat([a_2, a_5]); a
327 mod 400
sage: a[2]
1 + 2 + 2^2 + O(2^4)
sage: a[3]
O(3^0)
sage: a[5]
2 + O(5^2)
sage: print(a.str(style='padic'))
Profinite integer with values:
at 2: 1 + 2 + 2^2 + O(2^4)
at 5: 2 + O(5^2)
As SageMath currently has no implementation of completions of number fields at finite places, the above \(p\)-adic functionality only works for profinite \(\QQ\)-integers.
The general case¶
In general, for \(K\) a number field with ring of integers \(O\), a
ProfiniteInteger
consists of an element \(x \in O\), called its value,
and an ideal \(I\) of \(O\), called its modulus. Such a ProfiniteInteger
represents all elements in its represented subset \(x + I \hat{O}\),
similar to how the RealInterval
RIF(1.2, 1.3)
represents all elements
of the subset \([1.2, 1,3]\) of \(\RR\).
sage: K.<a> = NumberField(x^2+5)
sage: Ohat = ProfiniteIntegers(K); Ohat
Ring of Profinite Integers of Number Field in a with defining polynomial x^2 + 5
sage: b = Ohat(a+1, K.ideal(4, 2*a+2)); b
a + 1 mod (4, 2*a + 2)
sage: b.value()
a + 1
sage: b.modulus()
Fractional ideal (4, 2*a + 2)
We always keep the value HNF-reduced (cf. Algorithm 1.4.12 of [Coh2000]):
sage: c = Ohat(100000, K.ideal(3, a+1)); c
-a mod (3, a + 1)
sage: c.value()
-a
If a
is a ProfiniteInteger
representing a profinite \(K\)-integer \(\alpha
\in \hat{O}\) and b
is a ProfiniteInteger
representing \(\beta \in
\hat{O}\), then a + b
represents \(\alpha + \beta\). Similar statements holds
for the other arithmetic operations.
sage: 3*b + c
-a mod (3, a + 1)
sage: b * c
0 mod (2, a + 1)
See the arithmetic methods such as _add_()
for details.
In the rest of this file, we shall write “profinite integer” to mean an instance
of ProfiniteInteger
, as opposed to element of \(\hat{O}\).
See also
To see an application of these profinite integers, see for example
ProfiniteGraph
. There a graph of the
profinite Fibonacci function \(\hat{\ZZ} \to \hat{\ZZ}\) is created using
these profinite integers.
See also
Note
Upon creating a number field in SageMath as follows:
sage: K.<a> = NumberField(x^2+5)
the element a
has K
as its parent, not the maximal order of K
.
This can cause arithmetic in a ring of profinite integers to give results
in a ring of profinite numbers when the user might not expect it:
sage: Ohat = ProfiniteIntegers(K)
sage: b = Ohat(a, 15) + a; b
2*a mod (15)
sage: b.parent() is Ohat
False
sage: from profinite_number import ProfiniteNumbers
sage: b.parent() is ProfiniteNumbers(K)
True
Although above the element a
lies in the maximal order of K
, its
parent is K
. Hence the coercion model will look for a common parent of
Ohat(a, 15)
and a
, which is not Ohat
, but the ring of profinite
numbers over K
.
REFERENCES:
[Her2021] Mathé Hertogh, Computing with adèles and idèles, master’s thesis, Leiden University, 2021.
This implementation of profinite integers is based on [Her2021]. An extensive exposition of properties, design choices and two applications can be found there.
AUTHORS:
Mathé Hertogh (2021-07): initial version based on [Her2021]
-
class
adeles.profinite_integer.
ProfiniteCompletionFunctor
(args=None, kwds=None)¶ Bases:
sage.categories.pushout.ConstructionFunctor
The functor sending (the maximal order of) a number field to its profinite completion
Due to this functor, we have the following functionality.
sage: Zhat(3, 6) + 1/2 7/2 mod 6
sage: R.<X> = ZZ['X'] sage: f = X^2 + 1 sage: f + Zhat(5, 20) X^2 + 6 mod 20
-
class
adeles.profinite_integer.
ProfiniteInteger
(parent, value, modulus)¶ Bases:
sage.structure.element.CommutativeAlgebraElement
Profinite Integer over a Number Field
REFERENCES:
Section 3.1 of [Her2021].
-
__init__
(parent, value, modulus)¶ Construct the profinite integer “
value
modmodulus
”INPUT:
parent
– aProfiniteIntegers
object for some base number field \(K\)value
– an integral element of \(K\)modulus
– if \(K\) is \(\QQ\): an integer; else: an ideal of \(O\), the maximal order of \(K\)
OUTPUT:
The profinite integer representing the subset
value
+modulus
* \(\hat{O}\) of \(\hat{O}\), the profinite completion of \(O\).EXAMPLES:
sage: ProfiniteInteger(Zhat, 4, 15) 4 mod 15
sage: K.<a> = NumberField(x^7+3) sage: Ohat = ProfiniteIntegers(K) sage: ProfiniteInteger(Ohat, a^6-a, 30*a^3) a^6 - a mod (30*a^3) sage: I = K.ideal(a^5+3*a^2, 120) sage: ProfiniteInteger(Ohat, 7, I) 14*a^6 + 1 mod (-a^6 + a^5 + 3*a - 3)
TESTS:
sage: Zhat(3, -10) 3 mod 10 sage: ProfiniteInteger(Ohat, a^2, 0) a^2 sage: ProfiniteInteger(Ohat, None, a) Traceback (most recent call last): ... TypeError: value must be an element of Maximal Order in Number Field in a with defining polynomial x^7 + 3 sage: ProfiniteInteger(Ohat, a, None) Traceback (most recent call last): ... TypeError: modulus must be an ideal of Maximal Order in Number Field in a with defining polynomial x^7 + 3 sage: ProfiniteInteger(Ohat, a, 1/a) Traceback (most recent call last): ... TypeError: modulus must be an ideal of Maximal Order in Number Field in a with defining polynomial x^7 + 3 sage: ProfiniteInteger(Zhat, 3, 1/25) Traceback (most recent call last): ... TypeError: modulus must be an integer
-
__getitem__
(p)¶ Return the projection of this profinite integer to the ring of
p
-adic integersOnly implemented for profinite integers over \(\QQ\), as no general implementation of completions at finite places of a number field exists in SageMath at the time of writing.
The Chinese Remainder Theorem induces a canonical isomorphism \(\hat{\ZZ} \cong \prod_p \ZZ_p\), where \(p\) runs over all prime numbers. This method computes the image of
self
under this isomorphism and returns the projection to thep
-th coordinate.INPUT:
p
– a prime number
EXAMPLES:
sage: a = Zhat(4, 27) sage: a[3] 1 + 3 + O(3^3) sage: b = Zhat(5, 2^6 * 5^12) sage: b[2] 1 + 2^2 + O(2^6) sage: b[3] O(3^0) sage: b[5] 5 + O(5^12) sage: c = Zhat(-1, 7^5) sage: c[7] 6 + 6*7 + 6*7^2 + 6*7^3 + 6*7^4 + O(7^5) sage: c[7].parent() 7-adic Ring with capped relative precision 20
TESTS:
sage: d[2] Traceback (most recent call last): ... NotImplementedError: projection to `p`-adics only implemented over rationals sage: d[K.prime_above(5)] Traceback (most recent call last): ... NotImplementedError: projection to `p`-adics only implemented over rationals sage: c[-1] Traceback (most recent call last): ... ValueError: p must be a prime number sage: c[6] Traceback (most recent call last): ... ValueError: p must be a prime number
-
_add_
(other)¶ Return the sum of this profinite integer and
other
The sum of two profinite integers \(a\) and \(b\) is defined to be the profinite integer \(c\) with smallest represented subset (with respect to inclusion) containing the sum of the represented subsets of \(a\) and \(b\), i.e. containig \(\alpha + \beta\) for all \(\alpha\) represented by \(a\) and \(\beta\) represented by \(b\).
EXAMPLES:
sage: Zhat = ProfiniteIntegers(ZZ) sage: a = Zhat(3, 20) sage: b = Zhat(-1, 30) sage: a + b 2 mod 10 sage: a + 3 6 mod 20
sage: K.<a> = NumberField(x^2-7) sage: O = K.maximal_order() sage: Ohat = ProfiniteIntegers(O) sage: b = Ohat(3*a+1, a*13) sage: c = Ohat(2*a+1, 7) sage: b+c 2 mod (a) sage: O(-a)+c a + 1 mod (7)
REFERENCES:
Section Arithmetic of Section 3.1 of [Her2021].
-
_sub_
(other)¶ Return the difference of this profinite integer and
other
The difference of two profinite integers \(a\) and \(b\) is defined to be the profinite integer with smallest represented subset (with respect to inclusion) containing the sum of the represented subsets of \(a\) and \(b\), i.e. containig \(\alpha + \beta\) for all \(\alpha\) represented by \(a\) and \(\beta\) represented by \(b\).
EXAMPLES:
sage: Zhat = ProfiniteIntegers(ZZ) sage: a = Zhat(3, 20) sage: b = Zhat(-1, 30) sage: a-b 4 mod 10 sage: b-0 29 mod 30
sage: K.<a> = NumberField(x^2-7) sage: Ohat = ProfiniteIntegers(K) sage: b = Ohat(3*a+1, a*13) sage: c = Ohat(2*a+1, 7) sage: b-c 0 mod (a) sage: c-1 2*a mod (7)
REFERENCES:
Section Arithmetic of Section 3.1 of [Her2021].
-
_mul_
(other)¶ Return the product of this profinite integer and
other
The product of two profinite integers \(a\) and \(b\) is defined to be the profinite integer with smallest represented subset (with respect to inclusion) containing the sum of the represented subsets of \(a\) and \(b\), i.e. containig \(\alpha + \beta\) for all \(\alpha\) represented by \(a\) and \(\beta\) represented by \(b\).
EXAMPLES:
sage: Zhat = ProfiniteIntegers(ZZ) sage: a = Zhat(3, 20) sage: b = Zhat(-1, 30) sage: a*b 7 mod 10 sage: 0*a 0
sage: K.<a> = NumberField(x^2-7) sage: Ohat = ProfiniteIntegers(K) sage: b = Ohat(3*a+1, a*13) sage: c = Ohat(2*a+1, 7) sage: b*c 1 mod (a) sage: 1*c 2*a + 1 mod (7)
REFERENCES:
Section Arithmetic of Section 3.1 of [Her2021].
-
_div_
(other)¶ Divide this profinite integer by
other
in the ring of profinite numbers and return the resultOnly implemented for
other
having zero-modulus and non-zero value.EXAMPLES:
sage: b = Zhat(4, 10) / 7; b 4/7 mod 10/7 sage: b.parent() Profinite Numbers of Rational Field
sage: K.<a> = NumberField(x^2+x-7) sage: Ohat = ProfiniteIntegers(K) sage: Ohat(a^2, 20) / a a mod (20/7*a + 20/7)
TESTS:
sage: Zhat(4, 10) / Zhat(2, 10) Traceback (most recent call last): ... NotImplementedError: Cannot divide by profinite integers of non-zero modulus
-
_floordiv_
(other)¶ Return the quotient of this profinite integer by
other
Only implemented when
other
has zero modulus andself.value()
andself.modulus()
are both divisible byother.value()
.EXAMPLES:
sage: Zhat(5, 100) // 5 1 mod 20
sage: K.<a> = NumberField(x^2+5) sage: Ohat = ProfiniteIntegers(K) sage: Ohat(9*a, 75) // O(3*a) 3 mod (-5*a)
TESTS:
sage: b // Zhat(5, 10) Traceback (most recent call last): ... TypeError: can only divide by elements of the base sage: b/0 Traceback (most recent call last): ... ZeroDivisionError: division by zero sage: b/3 Traceback (most recent call last): ... NotImplementedError: value is not divisible by 3 sage: c/9 Traceback (most recent call last): ... NotImplementedError: modulus is not divisible by 9
-
_richcmp_
(other, op)¶ Compare this profinite integer to
other
based on the relationop
We only implement equality and non-equality.
Two elements
x mod I
andy mod J
are considered equal if and only if \(x \equiv y \mod (I+J)\).EXAMPLES:
sage: K.<a> = NumberField(x^4+17) sage: O = K.maximal_order() sage: Ohat = ProfiniteIntegers(O) sage: b = O(a^2+1) sage: c = Ohat(a^2+1, 1000) sage: d = Ohat(a^2+11, a*10) sage: e = Ohat(a^3+a-5, 170) sage: c == c True
Transitivity of equality does not hold:
sage: b == c True sage: c == d True sage: b == d False
sage: c == e False sage: c != e True sage: b != d True sage: c != d False
REFERENCES:
Section 5.4 of [Her2021].
TESTS:
sage: b < d Traceback (most recent call last): ... NotImplementedError: only equality and inequality are implemented
-
factorial_digits
()¶ Return the factorial digits of this profinite integer
Only implemented for profinite integers over \(\QQ\) with non-zero modulus.
Let \(k\) be the largest integer such that \(k!\) divides our modulus (this is called our “factorial precision”). Then our factorial digits are the unique integers \(d_1, d_2, ..., d_{k-1}\) satisfying \(0 \leq d_i \leq i\) such that
\[x \equiv d_1 \cdot 1! + d_2 \cdot 2! + ... + d_{k-1} \cdot (k-1)! \mod k!\]where \(x\) denotes the value of this profinite integer.
EXAMPLES:
sage: digits = Zhat(11, 48).factorial_digits(); digits [1, 2, 1] sage: sum([digits[i] * factorial(i+1) for i in range(3)]) 11
REFERENCES:
Section 7.2 of [Her2021].
-
is_integral
()¶ Return
True
, indicating that this profinite integer is integralEXAMPLES:
sage: Zhat(-5, 12).is_integral() True
-
is_unit
()¶ Return whether or not
self
could be a unitMore precisely, we return
True
if and only if the subset of profinite integers thatself
represents contains a unit.If
self
isx mod m
, this is equivalent to \(x \in (O/mO)^*\), where \(O\) denotes our base ring of integers.EXAMPLES:
sage: Zhat(3, 0).is_unit() False sage: Zhat(-1, 0).is_unit() True sage: Zhat(3, 25).is_unit() True sage: Zhat(5, 25).is_unit() False
sage: K.<a> = NumberField(x^3-2) sage: Ohat = ProfiniteIntegers(K) sage: Ohat(3, 8).is_unit() True sage: Ohat(a, 8).is_unit() False
-
modulus
()¶ Return the modulus of this profinite integer
This is an integer if the base number field is
QQ
. Otherwise it is an ideal of the base maximal order.EXAMPLES:
sage: Zhat(50, 100).modulus() 100
sage: K.<a> = NumberField(x^4-17) sage: Ohat = ProfiniteIntegers(K) sage: Ohat(a^3, a*160).modulus() Fractional ideal (2720, 160*a)
-
represents
(element)¶ Return whether or not this profinite integer represents
element
The represented subset of this profinite integer is \(x + m \hat{O}\), where \(x\) is our value, \(m\) is our modulus and \(\hat{O}\) is the ring of profinite numbers over our base field. Hence this profinite number represents \(\alpha \in \hat{O}\) if and only if \(\alpha \in x + m \hat{O}\).
INPUT:
element
– an integral element of the base number field
EXAMPLES:
sage: b = Zhat(3, 10) sage: [n for n in range(-50, 50) if b.represents(n)] [-47, -37, -27, -17, -7, 3, 13, 23, 33, 43]
sage: K.<a> = NumberField(x^2+2) sage: Ohat = ProfiniteIntegers(K) sage: c = Ohat(a+1, 3*a) sage: [m*a+n for m in range(-7, 7) for n in range(-7, 7) if c.represents(m*a+n)] [-5*a - 5, -5*a + 1, -2*a - 5, -2*a + 1, a - 5, a + 1, 4*a - 5, 4*a + 1]
-
str
(style='value-modulus')¶ Return a string representation of this profinite integer
INPUT:
style
– string (default: “value-modulus”); style to use. The other options are “factorial” and “padic”.
EXAMPLES:
sage: a = Zhat(970, 2^7 * 3^3 * 5^2) sage: print(a.str(style='value-modulus')) 970 mod 86400 sage: print(a.str(style='factorial')) 2*2! + 1*3! + 2*5! + O(6!) sage: print(a.str(style='padic')) Profinite integer with values: at 2: 2 + 2^3 + 2^6 + O(2^7) at 3: 1 + 2*3 + 2*3^2 + O(3^3) at 5: 4*5 + O(5^2)
TESTS:
sage: print(a.str(style='blah')) Traceback (most recent call last): ... ValueError: unkown style ``blah''
-
value
()¶ Return the value of this profinite integer
EXAMPLES:
sage: Zhat(3, 6).value() 3 sage: Zhat(7, 6).value() # the value is reduced 1
-
visual
()¶ Return the smallest closed interval within the unitinterval \([0,1]\) in which the image of this profinite integer under the visualization map is contained
The visualization function is defined by
\[\phi(a) = \sum_{i=1}^\infty \frac{d_i}{(1+i)!}\]for \(a \in \hat{\ZZ}\) with factorial digit sequence \((d_i)_{i=1}^\infty\).
EXAMPLES:
The subset \(1 + 2\hat{\ZZ}\) of \(\hat{\ZZ}\) maps onto \([1/2, 1]\) by \(\phi\). Hence we have
sage: Zhat(1, 2).visual() (1/2, 1)
The subset \(2 + 3\hat{\ZZ}\) is mapped onto \([1/6, 1/3] \cup [5/6, 1]\) by \(\phi\). So we get
sage: Zhat(2, 3).visual() (1/6, 1)
REFERENCES:
Section 7.3 of [Her2021].
-
-
class
adeles.profinite_integer.
ProfiniteIntegers
(O)¶ Bases:
sage.structure.unique_representation.UniqueRepresentation
,sage.rings.ring.CommutativeAlgebra
Ring of profinite integers over a number field
REFERENCES:
Section 3.1 of [Her2021].
-
_element_constructor_
(x, y=None)¶ Construct a profinite integer
INPUT:
We accept many input formats. The most common one is the following:
x
– element of the base maximal order; the valuey
– ideal of the base maximal order; the modulus
All other formats only accept one argument, which can be one of the following:
a profinite \(K\)-integer for \(K\) a subfield of our base number field
an integral profinite \(K\)-number for \(K\) a subfield of our base number field
an element of a quotient of our base maximal order
an element of our base maximal order
For constructing profinite \(\QQ\)-integers, even more formats are accepted, namely:
a factorial digit list, i.e. a list of non-negative integers such that the \(i\)-th entry is at most \(i+1\) (see
factorial_digits()
).a \(p\)-adic integer, for some prime number \(p\)
a list of \(p\)-adic integers for distinct prime numbers \(p\)
EXAMPLES:
We start with standard
(value, modulus)
input:sage: Zhat(-4, 17) 13 mod 17 sage: K.<a> = NumberField(x^3-5*x^2+1) sage: Ohat = ProfiniteIntegers(K) sage: Ohat(a^2+1, 4*a) a^2 + 1 mod (4*a)
Upon giving a
ProfiniteInteger
as input we get:sage: Zhat(Zhat(3, 5)) 3 mod 5 sage: Ohat(Zhat(4, 6)) -2 mod (6) sage: Ohat(Ohat(a, 8)) a mod (8)
Integral profinite numbers can be converted to profinite integers:
sage: Zhat(Qhat(-1, 5)) 4 mod 5 sage: Khat = ProfiniteNumbers(K) sage: Ohat(Khat(a+1, 6)) a + 1 mod (6)
Quotient ring elements can be given as input as well:
sage: Zhat(Zmod(40)(7)) 7 mod 40 sage: R = K.maximal_order().quotient(30*a, 'b') sage: Ohat(R(2*a+3)) 2*a + 3 mod (30*a)
Elements of the base maximal order a coerced to profinite integers with zero modulus:
sage: Zhat(97) 97 sage: Ohat(79*a) 79*a
Profinite integers over \(\QQ\) can be constructed from factorial digits:
sage: Zhat([1, 0, 0, 2, 0]) 49 mod 720
And profinite integers over \(\QQ\) can also be constructed from \(p\)-adic integers:
sage: Zhat(Zp(5)(-1)) 95367431640624 mod 95367431640625 sage: Zhat([Zp(2)(20, 5), Zp(3)(7, 2)]) 52 mod 288
-
Element
¶ alias of
ProfiniteInteger
-
characteristic
()¶ Return the characteristic of this ring, which is zero
EXAMPLES:
sage: Zhat = ProfiniteIntegers() sage: Zhat.characteristic() 0
-
construction
()¶ Return a pair
(functor, parent)
such thatfunctor(parent)
returns this profinite integers ring.EXAMPLES:
sage: F, P = Zhat.construction(); F, P (ProfiniteCompletionFunctor, Integer Ring) sage: F(P) is Zhat True
sage: K.<a> = NumberField(x^3-2) sage: Ohat = ProfiniteIntegers(K) sage: F, P = Ohat.construction(); F, P (ProfiniteCompletionFunctor, Maximal Order in Number Field in a with defining polynomial x^3 - 2) sage: F(P) is Ohat True
-
epsilon
()¶ Return the precision error of elements in this ring
As this depends on the elements, we can give no reasonable answer and hence raise a
NotImplementedError
.EXAMPLES:
sage: Zhat.epsilon() Traceback (most recent call last): ... NotImplementedError: precision error depends on the elements involved
-
gen
(n=0)¶ Return the
n
-th generator of this ringAs this ring has only one generator, we only accept
n == 0
.INPUT:
n
– the index of the generator to return (default:0
); must be zero
EXAMPLES:
sage: Zhat.gen() 1 sage: Zhat.gen(0) 1
TESTS:
sage: Zhat.gen(1) Traceback (most recent call last): ... IndexError: n must be 0
-
gens
()¶ Return a tuple of generators of this ring, which is
(1,)
EXAMPLES:
sage: Zhat.gens() (1,)
-
is_exact
()¶ Return
False
, indicating that doing arithmetic can lead to precision lossEXAMPLES:
sage: Zhat.is_exact() False
-
is_field
(proof=True)¶ Return
False
, indicating that this ring is not a fieldNote that this ring of profinite integers is (canonically isomorphic to) the product of all completions of \(K\) at the finite primes of \(K\), where \(K\) denotes our base number field. As a product of non-trivial rings, this ring is clearly not a field.
EXAMPLES:
sage: Zhat.is_field() False
-
is_finite
()¶ Return
False
, indicating that this ring is not finiteEXAMPLES:
sage: Zhat.is_finite() False
-
is_integral_domain
(proof=None)¶ Return
False
, indicating that this ring is not an integral domainNote that this ring of profinite integers is (canonically isomorphic to) the product of all completions of \(K\) at the finite primes of \(K\), where \(K\) denotes our base number field. As a product of non-trivial rings, this ring is clearly not an integral domain.
EXAMPLES:
sage: Zhat = ProfiniteIntegers() sage: Zhat.is_integral_domain() False
-
is_noetherian
()¶ Return
False
, indicating that this ring is not NoetherianNote that this ring of profinite integers is (canonically isomorphic to) the product of all completions of \(K\) at the finite primes of \(K\), where \(K\) denotes our base number field. As a product of infinitely many non-trivial rings, this ring is clearly not Noetherian.
EXAMPLES:
sage: Zhat.is_noetherian() False
-
krull_dimension
()¶ Return
1
, indiciting that the Krull dimension of this ring is oneNote that this ring of profinite integers is (canonically isomorphic to) the product of all completions of \(K\) at the finite primes of \(K\), where \(K\) denotes our base number field. Each such completion has Krull dimension one and therefore this ring has Krull dimension one as well.
EXAMPLES:
sage: Zhat.krull_dimension() 1
-
ngens
()¶ Return the number of generators of this ring, which is \(1\)
EXAMPLES:
sage: Zhat.ngens() 1
-
number_field
()¶ Return the base number field of this ring of profinite integers
The base number field equals the fraction field of
self.base()
.EXAMPLES:
sage: Zhat = ProfiniteIntegers() sage: Zhat.number_field() Rational Field sage: K.<a> = NumberField(x^2+x-7) sage: Ohat = ProfiniteIntegers(K) sage: Ohat.number_field() Number Field in a with defining polynomial x^2 + x - 7
-
order
()¶ Return
Infinity
, indicating that this ring has infinitely many elementsEXAMPLES:
sage: Zhat.order() +Infinity
-
random_element
()¶ Return a random element of this ring
EXAMPLES:
sage: Ohat.random_element() # random 0 mod (1) sage: Ohat.random_element() # random 2/3*a^2 mod (a - 1) sage: Ohat.random_element() # random 1/3*a^2 + a mod (-1/3*a^2 + a - 1) sage: Ohat.random_element() # random 4/3*a^2 + a mod (-10773*a^2 - 75978*a - 229392) sage: Ohat.random_element() # random 0 mod (1) sage: Ohat.random_element() # random a^2 + 3*a - 1 mod (104*a^2 + 52*a + 364)
-
some_elements
()¶ Return some elements of this ring
EXAMPLES:
sage: Zhat.some_elements() [0, 2 mod 6, 1, 66 mod 79, 20, 10 mod 100]
-