27
27
:func:`sage.rings.tate_algebra.TateAlgebra`::
28
28
29
29
sage: K = Qp(2, 5, print_mode='digits')
30
- sage: A.<x,y> = TateAlgebra(K)
31
- sage: A
32
- Tate Algebra in x (val >= 0), y (val >= 0) over 2-adic Field with capped relative precision 5
30
+ sage: A.<x,y> = TateAlgebra(K); A
31
+ Tate Algebra in x (val >= 0), y (val >= 0)
32
+ over 2-adic Field with capped relative precision 5
33
33
34
34
As we observe, the default value for the log radii of convergence
35
35
is `0` (the series then converge on the closed unit disc).
36
36
37
37
We can specify different log radii using the following syntax::
38
38
39
39
sage: B.<u,v> = TateAlgebra(K, log_radii=[1,2]); B
40
- Tate Algebra in u (val >= -1), v (val >= -2) over 2-adic Field with capped relative precision 5
40
+ Tate Algebra in u (val >= -1), v (val >= -2)
41
+ over 2-adic Field with capped relative precision 5
41
42
42
43
Note that if we pass in the ring of integers of `p`-adic field,
43
44
the same Tate algebra is returned::
44
45
45
46
sage: A1.<x,y> = TateAlgebra(K.integer_ring()); A1
46
- Tate Algebra in x (val >= 0), y (val >= 0) over 2-adic Field with capped relative precision 5
47
+ Tate Algebra in x (val >= 0), y (val >= 0)
48
+ over 2-adic Field with capped relative precision 5
47
49
sage: A is A1
48
50
True
49
51
50
52
However the method :meth:`integer_ring` constructs the integer ring
51
53
of a Tate algebra, that is the subring consisting of series bounded
52
54
by `1` on the domain of convergence::
53
55
54
- sage: Ao = A.integer_ring()
55
- sage: Ao
56
- Integer ring of the Tate Algebra in x (val >= 0), y (val >= 0) over 2-adic Field with capped relative precision 5
56
+ sage: Ao = A.integer_ring(); Ao
57
+ Integer ring of the Tate Algebra in x (val >= 0), y (val >= 0)
58
+ over 2-adic Field with capped relative precision 5
57
59
58
60
Now we can build elements::
59
61
67
69
sage: f + g
68
70
...00001*x^3*y + ...00101 + ...000010*x*y^3 + ...000010*x*y + ...0000100*x^2*y^2
69
71
sage: f * g
70
- ...00101*x^3*y + ...000010*x^4*y^4 + ...001010*x*y + ...0000100*x^5*y^3 + ...0000100*x^2*y^4 + ...00001000*x^3*y^3
72
+ ...00101*x^3*y + ...000010*x^4*y^4 + ...001010*x*y
73
+ + ...0000100*x^5*y^3 + ...0000100*x^2*y^4 + ...00001000*x^3*y^3
71
74
72
75
An element in the integer ring is invertible if and only if its
73
76
reduction modulo `p` is a nonzero constant. In our example,
@@ -193,7 +196,8 @@ class TateAlgebraFactory(UniqueFactory):
193
196
sage: R = Zp(2, 10, print_mode='digits'); R
194
197
2-adic Ring with capped relative precision 10
195
198
sage: A.<x,y> = TateAlgebra(R, order='lex'); A
196
- Tate Algebra in x (val >= 0), y (val >= 0) over 2-adic Field with capped relative precision 10
199
+ Tate Algebra in x (val >= 0), y (val >= 0)
200
+ over 2-adic Field with capped relative precision 10
197
201
198
202
We observe that the result is the Tate algebra over the fraction
199
203
field of `R` and not `R` itself::
@@ -207,7 +211,8 @@ class TateAlgebraFactory(UniqueFactory):
207
211
we must use the method :meth:`integer_ring`::
208
212
209
213
sage: Ao = A.integer_ring(); Ao
210
- Integer ring of the Tate Algebra in x (val >= 0), y (val >= 0) over 2-adic Field with capped relative precision 10
214
+ Integer ring of the Tate Algebra in x (val >= 0), y (val >= 0)
215
+ over 2-adic Field with capped relative precision 10
211
216
sage: Ao.base_ring()
212
217
2-adic Ring with capped relative precision 10
213
218
sage: Ao.base_ring() is R
@@ -847,15 +852,19 @@ def _pushout_(self, R):
847
852
848
853
sage: A.<u,v> = TateAlgebra(R, log_radii=[1,2])
849
854
sage: A1 = pushout(A, R1); A1
850
- Tate Algebra in u (val >= -1), v (val >= -2) over 2-adic Unramified Extension Field in a defined by x^2 + x + 1
855
+ Tate Algebra in u (val >= -1), v (val >= -2)
856
+ over 2-adic Unramified Extension Field in a defined by x^2 + x + 1
851
857
sage: A2 = pushout(A, R2); A2
852
- Tate Algebra in u (val >= -2), v (val >= -4) over 2-adic Eisenstein Extension Field in pi defined by x^2 - 2
858
+ Tate Algebra in u (val >= -2), v (val >= -4)
859
+ over 2-adic Eisenstein Extension Field in pi defined by x^2 - 2
853
860
854
861
sage: Ao = A.integer_ring()
855
862
sage: pushout(Ao, R1)
856
- Integer ring of the Tate Algebra in u (val >= -1), v (val >= -2) over 2-adic Unramified Extension Field in a defined by x^2 + x + 1
863
+ Integer ring of the Tate Algebra in u (val >= -1), v (val >= -2)
864
+ over 2-adic Unramified Extension Field in a defined by x^2 + x + 1
857
865
sage: pushout(Ao, R2.fraction_field())
858
- Tate Algebra in u (val >= -2), v (val >= -4) over 2-adic Eisenstein Extension Field in pi defined by x^2 - 2
866
+ Tate Algebra in u (val >= -2), v (val >= -4)
867
+ over 2-adic Eisenstein Extension Field in pi defined by x^2 - 2
859
868
860
869
TESTS::
861
870
@@ -1243,20 +1252,23 @@ def random_element(self, degree=2, terms=5, integral=False, prec=None):
1243
1252
sage: R = Zp(2, prec=10, print_mode="digits")
1244
1253
sage: A.<x,y> = TateAlgebra(R)
1245
1254
sage: A.random_element() # random
1246
- (...00101000.01)*y + ...1111011111*x^2 + ...0010010001*x*y + ...110000011 + ...010100100*y^2
1255
+ (...00101000.01)*y + ...1111011111*x^2 + ...0010010001*x*y
1256
+ + ...110000011 + ...010100100*y^2
1247
1257
1248
1258
sage: A.random_element(degree=5, terms=3) # random
1249
1259
(...0101100.01)*x^2*y + (...01000011.11)*y^2 + ...00111011*x*y
1250
1260
1251
1261
sage: A.random_element(integral=True) # random
1252
- ...0001111101*x + ...1101110101 + ...00010010110*y + ...101110001100*x*y + ...000001100100*y^2
1262
+ ...0001111101*x + ...1101110101 + ...00010010110*y
1263
+ + ...101110001100*x*y + ...000001100100*y^2
1253
1264
1254
1265
Note that if we are already working on the ring of integers,
1255
1266
specifying ``integral=False`` has no effect::
1256
1267
1257
1268
sage: Ao = A.integer_ring()
1258
1269
sage: f = Ao.random_element(integral=False); f # random
1259
- ...1100111011*x^2 + ...1110100101*x + ...1100001101*y + ...1110110001 + ...01011010110*y^2
1270
+ ...1100111011*x^2 + ...1110100101*x + ...1100001101*y
1271
+ + ...1110110001 + ...01011010110*y^2
1260
1272
sage: f in Ao
1261
1273
True
1262
1274
@@ -1265,7 +1277,9 @@ def random_element(self, degree=2, terms=5, integral=False, prec=None):
1265
1277
1266
1278
sage: B.<x,y> = TateAlgebra(R, log_radii=[-1,-2])
1267
1279
sage: B.random_element(integral=True) # random
1268
- (...1111111.001)*x*y + (...111000101.1)*x + (...11010111.01)*y^2 + ...0010011011*y + ...0010100011000
1280
+ (...1111111.001)*x*y + (...111000101.1)*x + (...11010111.01)*y^2
1281
+ + ...0010011011*y + ...0010100011000
1282
+
1269
1283
"""
1270
1284
if integral or self ._integral :
1271
1285
polring = self ._polynomial_ring .change_ring (self ._field .integer_ring ())
0 commit comments