Tate algebra element¶
A class for series in Tate algebras.
AUTHOR:
Xavier Caruso, Thibaut Verron (2018-09)
- class sage.rings.tate_algebra_element.TateAlgebraElement[source]¶
Bases:
CommutativeAlgebraElementA class for Tate series, elements of Tate algebras.
EXAMPLES:
sage: R = Zp(2, prec=10, print_mode='digits') sage: A.<x,y> = TateAlgebra(R) sage: A(2*x+1) ...0000000001 + ...00000000010*x sage: A(2*x+1, prec=5) ...00001 + ...00010*x + O(2^5 * <x, y>) sage: A(2*x+1, prec=20) ...0000000001 + ...00000000010*x + O(2^20 * <x, y>)
>>> from sage.all import * >>> R = Zp(Integer(2), prec=Integer(10), print_mode='digits') >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> A(Integer(2)*x+Integer(1)) ...0000000001 + ...00000000010*x >>> A(Integer(2)*x+Integer(1), prec=Integer(5)) ...00001 + ...00010*x + O(2^5 * <x, y>) >>> A(Integer(2)*x+Integer(1), prec=Integer(20)) ...0000000001 + ...00000000010*x + O(2^20 * <x, y>)
R = Zp(2, prec=10, print_mode='digits') A.<x,y> = TateAlgebra(R) A(2*x+1) A(2*x+1, prec=5) A(2*x+1, prec=20)
- Spoly(other)[source]¶
Return the S-polynomial of this series and
other.INPUT:
other– a Tate series
NOTE:
If \(f\) and \(g\) are two Tate series with leading term \(t_f\) and \(t_g\) respectively, the S-polynomial of \(f\) and \(g\) is defined by
\[S(f,g) = \frac{\text{lcm}(t_f,t_g)}{t_f} f - \frac{\text{lcm}(t_f,t_g)}{t_g} g\]By construction the terms in \(\text{lcm}(t_f,t_g)\) cancel, so that the leading term of \(S(f,g)\) is strictly smaller than \(\text{lcm}(t_f,t_g)\).
EXAMPLES:
sage: R = Zp(2, 5, print_mode='digits') sage: A.<x,y> = TateAlgebra(R) sage: f = x^3*y + 2*x*y + 4*x^2 sage: g = 2*x*y^2 + 2*x sage: h = f.Spoly(g); h ...111110*x^3 + ...0000100*x*y^2 + ...00001000*x^2*y sage: h == 2*y*f - x^2*g True
>>> from sage.all import * >>> R = Zp(Integer(2), Integer(5), print_mode='digits') >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = x**Integer(3)*y + Integer(2)*x*y + Integer(4)*x**Integer(2) >>> g = Integer(2)*x*y**Integer(2) + Integer(2)*x >>> h = f.Spoly(g); h ...111110*x^3 + ...0000100*x*y^2 + ...00001000*x^2*y >>> h == Integer(2)*y*f - x**Integer(2)*g True
R = Zp(2, 5, print_mode='digits') A.<x,y> = TateAlgebra(R) f = x^3*y + 2*x*y + 4*x^2 g = 2*x*y^2 + 2*x h = f.Spoly(g); h h == 2*y*f - x^2*g
- add_bigoh(n)[source]¶
Return this series truncated at precision
n.INPUT:
n– integer
EXAMPLES:
sage: R = Zp(2, prec=10, print_mode='digits') sage: A.<x,y> = TateAlgebra(R) sage: f = 32*x + 64*x^2; f ...000000000100000*x + ...0000000001000000*x^2 sage: f.add_bigoh(5) O(2^5 * <x, y>) sage: g = f.add_bigoh(6); g ...100000*x + O(2^6 * <x, y>) sage: g.precision_absolute() 6
>>> from sage.all import * >>> R = Zp(Integer(2), prec=Integer(10), print_mode='digits') >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = Integer(32)*x + Integer(64)*x**Integer(2); f ...000000000100000*x + ...0000000001000000*x^2 >>> f.add_bigoh(Integer(5)) O(2^5 * <x, y>) >>> g = f.add_bigoh(Integer(6)); g ...100000*x + O(2^6 * <x, y>) >>> g.precision_absolute() 6
R = Zp(2, prec=10, print_mode='digits') A.<x,y> = TateAlgebra(R) f = 32*x + 64*x^2; f f.add_bigoh(5) g = f.add_bigoh(6); g g.precision_absolute()
- coefficient(exponent)[source]¶
Return the coefficient corresponding to the given exponent.
INPUT:
exponent– tuple of integers
EXAMPLES:
sage: R = Zp(2, prec=10, print_mode='terse') sage: A.<x,y> = TateAlgebra(R) sage: f = 2*x^2 + 53*x*y + y^3 sage: f.coefficient((2,0)) # coeff in x^2 2 + O(2^11) sage: f.coefficient((1,1)) # coeff in x*y 53 + O(2^10) sage: f.coefficient((3,0)) # coeff in x^3 0 sage: g = f.add_bigoh(5) sage: g.coefficient((2,0)) # coeff in x^2 2 + O(2^5) sage: g.coefficient((1,1)) # coeff in x*y 21 + O(2^5) sage: g.coefficient((3,0)) # coeff in x^3 O(2^5)
>>> from sage.all import * >>> R = Zp(Integer(2), prec=Integer(10), print_mode='terse') >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = Integer(2)*x**Integer(2) + Integer(53)*x*y + y**Integer(3) >>> f.coefficient((Integer(2),Integer(0))) # coeff in x^2 2 + O(2^11) >>> f.coefficient((Integer(1),Integer(1))) # coeff in x*y 53 + O(2^10) >>> f.coefficient((Integer(3),Integer(0))) # coeff in x^3 0 >>> g = f.add_bigoh(Integer(5)) >>> g.coefficient((Integer(2),Integer(0))) # coeff in x^2 2 + O(2^5) >>> g.coefficient((Integer(1),Integer(1))) # coeff in x*y 21 + O(2^5) >>> g.coefficient((Integer(3),Integer(0))) # coeff in x^3 O(2^5)
R = Zp(2, prec=10, print_mode='terse') A.<x,y> = TateAlgebra(R) f = 2*x^2 + 53*x*y + y^3 f.coefficient((2,0)) # coeff in x^2 f.coefficient((1,1)) # coeff in x*y f.coefficient((3,0)) # coeff in x^3 g = f.add_bigoh(5) g.coefficient((2,0)) # coeff in x^2 g.coefficient((1,1)) # coeff in x*y g.coefficient((3,0)) # coeff in x^3
- coefficients()[source]¶
Return the list of coefficients of this series.
EXAMPLES:
sage: R = Zp(2, prec=10, print_mode='digits') sage: A.<x,y> = TateAlgebra(R) sage: f = x + 2*x^2 sage: f.coefficients() [...0000000001, ...00000000010]
>>> from sage.all import * >>> R = Zp(Integer(2), prec=Integer(10), print_mode='digits') >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = x + Integer(2)*x**Integer(2) >>> f.coefficients() [...0000000001, ...00000000010]
R = Zp(2, prec=10, print_mode='digits') A.<x,y> = TateAlgebra(R) f = x + 2*x^2 f.coefficients()
- degree()[source]¶
Return the Weierstrass degree of this Tate series.
Note
The Weierstrass degree is the total degree of the polynomial defined by the terms with least valuation in the series.
EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: f = x*y + 2*x^4 + y; f ...0000000001*x*y + ...0000000001*y + ...00000000010*x^4 sage: f.degree() 2
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = x*y + Integer(2)*x**Integer(4) + y; f ...0000000001*x*y + ...0000000001*y + ...00000000010*x^4 >>> f.degree() 2
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) f = x*y + 2*x^4 + y; f f.degree()
- degrees()[source]¶
Return the Weierstrass degrees of this series.
Note
The Weierstrass degrees are the partial degrees of the polynomial defined by the terms with least valuation in the series.
EXAMPLES:
sage: R = Zp(2, print_mode='digits',prec=10) sage: A.<x,y> = TateAlgebra(R) sage: f = x^2 + y^2 + 2*x^3 + y; f ...0000000001*x^2 + ...0000000001*y^2 + ...0000000001*y + ...00000000010*x^3 sage: f.degrees() (2, 2)
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits',prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = x**Integer(2) + y**Integer(2) + Integer(2)*x**Integer(3) + y; f ...0000000001*x^2 + ...0000000001*y^2 + ...0000000001*y + ...00000000010*x^3 >>> f.degrees() (2, 2)
R = Zp(2, print_mode='digits',prec=10) A.<x,y> = TateAlgebra(R) f = x^2 + y^2 + 2*x^3 + y; f f.degrees()
- dict()[source]¶
alias of
monomial_coefficients().
- exp(prec=None)[source]¶
Return the exponential of this series.
INPUT:
prec– integer orNone(default:None); the absolute precision at which the result is computed, ifNonethe cap of the Tate algebra is used
EXAMPLES:
sage: R = Zp(3, 10, print_mode='digits') sage: A.<x,y> = TateAlgebra(R) sage: f = 3*x^2 + 9*y sage: f.exp() ...0000000001 + ...0000000010*x^2 + ...1111111200*x^6 + ...1111111200*x^4 + ...0000000100*y + ... + O(3^10 * <x, y>) sage: f.exp(prec=3) ...001 + ...010*x^2 + ...200*x^6 + ...200*x^4 + ...100*y + O(3^3 * <x, y>)
>>> from sage.all import * >>> R = Zp(Integer(3), Integer(10), print_mode='digits') >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = Integer(3)*x**Integer(2) + Integer(9)*y >>> f.exp() ...0000000001 + ...0000000010*x^2 + ...1111111200*x^6 + ...1111111200*x^4 + ...0000000100*y + ... + O(3^10 * <x, y>) >>> f.exp(prec=Integer(3)) ...001 + ...010*x^2 + ...200*x^6 + ...200*x^4 + ...100*y + O(3^3 * <x, y>)
R = Zp(3, 10, print_mode='digits') A.<x,y> = TateAlgebra(R) f = 3*x^2 + 9*y f.exp() f.exp(prec=3)
If the precision on the input is not enough to determine the result at precision
prec, a result with smaller precision is returned:sage: g = f.add_bigoh(3); g ...010*x^2 + ...100*y + O(3^3 * <x, y>) sage: g.exp() ...001 + ...010*x^2 + ...200*x^6 + ...200*x^4 + ...100*y + O(3^3 * <x, y>) sage: g.exp(prec=10) ...001 + ...010*x^2 + ...200*x^6 + ...200*x^4 + ...100*y + O(3^3 * <x, y>)
>>> from sage.all import * >>> g = f.add_bigoh(Integer(3)); g ...010*x^2 + ...100*y + O(3^3 * <x, y>) >>> g.exp() ...001 + ...010*x^2 + ...200*x^6 + ...200*x^4 + ...100*y + O(3^3 * <x, y>) >>> g.exp(prec=Integer(10)) ...001 + ...010*x^2 + ...200*x^6 + ...200*x^4 + ...100*y + O(3^3 * <x, y>)
g = f.add_bigoh(3); g g.exp() g.exp(prec=10)
When the input value is outside the domain of convergence, an error is raised:
sage: f = x sage: f.exp() Traceback (most recent call last): ... ValueError: not in the domain of convergence
>>> from sage.all import * >>> f = x >>> f.exp() Traceback (most recent call last): ... ValueError: not in the domain of convergence
f = x f.exp()
However \(\exp(x)\) converges on a smaller disk:
sage: f.restriction(-1).exp() ...0000000001 + ...000000001*x + ...1111111.2*x^3 + ...11111112*x^2 + ... + O(3^10 * <x/3, y/3>)
>>> from sage.all import * >>> f.restriction(-Integer(1)).exp() ...0000000001 + ...000000001*x + ...1111111.2*x^3 + ...11111112*x^2 + ... + O(3^10 * <x/3, y/3>)
f.restriction(-1).exp()
- inverse_of_unit(prec=None)[source]¶
Return the inverse of this series if it is invertible.
INPUT:
prec– integer orNone(default:None); the precision at which the result is computed, ifNone, the result is truncated according to the cap of the parent
EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: f = A(1); f ...0000000001 sage: f.inverse_of_unit() ...0000000001 + O(2^10 * <x, y>) sage: f = 2*x + 1; f ...0000000001 + ...00000000010*x sage: f.inverse_of_unit() ...0000000001 + ...1111111110*x + ...0000000100*x^2 + ...1111111000*x^3 + ...0000010000*x^4 + ...1111100000*x^5 + ...0001000000*x^6 + ...1110000000*x^7 + ...0100000000*x^8 + ...1000000000*x^9 + O(2^10 * <x, y>) sage: f.inverse_of_unit(prec=4) ...0001 + ...1110*x + ...0100*x^2 + ...1000*x^3 + O(2^4 * <x, y>)
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = A(Integer(1)); f ...0000000001 >>> f.inverse_of_unit() ...0000000001 + O(2^10 * <x, y>) >>> f = Integer(2)*x + Integer(1); f ...0000000001 + ...00000000010*x >>> f.inverse_of_unit() ...0000000001 + ...1111111110*x + ...0000000100*x^2 + ...1111111000*x^3 + ...0000010000*x^4 + ...1111100000*x^5 + ...0001000000*x^6 + ...1110000000*x^7 + ...0100000000*x^8 + ...1000000000*x^9 + O(2^10 * <x, y>) >>> f.inverse_of_unit(prec=Integer(4)) ...0001 + ...1110*x + ...0100*x^2 + ...1000*x^3 + O(2^4 * <x, y>)
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) f = A(1); f f.inverse_of_unit() f = 2*x + 1; f f.inverse_of_unit() f.inverse_of_unit(prec=4)
If the series is not invertible, an error is raised:
sage: f = 1 + x; f ...0000000001*x + ...0000000001 sage: f.inverse_of_unit() Traceback (most recent call last): ... ValueError: this series in not invertible
>>> from sage.all import * >>> f = Integer(1) + x; f ...0000000001*x + ...0000000001 >>> f.inverse_of_unit() Traceback (most recent call last): ... ValueError: this series in not invertible
f = 1 + x; f f.inverse_of_unit()
- is_monic()[source]¶
Return
Trueif this series is monic, in the sense that it has valuation 0 and its leading coefficient is a power of the uniformizer.EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: f = x*y + 2; f ...0000000001*x*y + ...00000000010 sage: f.is_monic() True sage: g = f.restriction(-1); g ...00000000010 + ...0000000001*x*y sage: g.is_monic() False
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = x*y + Integer(2); f ...0000000001*x*y + ...00000000010 >>> f.is_monic() True >>> g = f.restriction(-Integer(1)); g ...00000000010 + ...0000000001*x*y >>> g.is_monic() False
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) f = x*y + 2; f f.is_monic() g = f.restriction(-1); g g.is_monic()
- is_unit()[source]¶
Return
Trueif this series is invertible.EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: f = 2*x + 1; f ...0000000001 + ...00000000010*x sage: f.is_unit() True sage: f = 1 + x; f ...0000000001*x + ...0000000001 sage: f.is_unit() False
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = Integer(2)*x + Integer(1); f ...0000000001 + ...00000000010*x >>> f.is_unit() True >>> f = Integer(1) + x; f ...0000000001*x + ...0000000001 >>> f.is_unit() False
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) f = 2*x + 1; f f.is_unit() f = 1 + x; f f.is_unit()
Note that invertibility is tested in the parent of this series:
sage: f = 4*x + 2 sage: f.is_unit() True sage: Ao = A.integer_ring() sage: Ao(f).is_unit() False
>>> from sage.all import * >>> f = Integer(4)*x + Integer(2) >>> f.is_unit() True >>> Ao = A.integer_ring() >>> Ao(f).is_unit() False
f = 4*x + 2 f.is_unit() Ao = A.integer_ring() Ao(f).is_unit()
- is_zero(prec=None)[source]¶
Return
Trueif this series is indistinguishable from zero.INPUT:
prec– integer orNone(default:None), the precision at which the series should be compared to zero
EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: f = x + 2*x^2 + x^3; f ...0000000001*x^3 + ...0000000001*x + ...00000000010*x^2 sage: f.is_zero() False sage: g = f << 4; g ...00000000010000*x^3 + ...00000000010000*x + ...000000000100000*x^2 sage: g.is_zero() False sage: g.is_zero(5) False sage: g.is_zero(4) True
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = x + Integer(2)*x**Integer(2) + x**Integer(3); f ...0000000001*x^3 + ...0000000001*x + ...00000000010*x^2 >>> f.is_zero() False >>> g = f << Integer(4); g ...00000000010000*x^3 + ...00000000010000*x + ...000000000100000*x^2 >>> g.is_zero() False >>> g.is_zero(Integer(5)) False >>> g.is_zero(Integer(4)) True
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) f = x + 2*x^2 + x^3; f f.is_zero() g = f << 4; g g.is_zero() g.is_zero(5) g.is_zero(4)
- leading_coefficient(secure=False)[source]¶
Return the leading coefficient of this series.
Note
The leading coefficient is the coefficient of the leading term.
INPUT:
secure– boolean (default:False); ifTrue, raises an error if the leading term cannot be determined due to the existence of terms which are indistinguishable from zero. IfFalse, discard silently these terms.
EXAMPLES:
sage: R = Zp(2, prec=10, print_mode='terse') sage: A.<x,y> = TateAlgebra(R) sage: f = x^4 + 3*x*y + 1; f (1 + O(2^10))*x^4 + (3 + O(2^10))*x*y + (1 + O(2^10)) sage: f.leading_coefficient() 1 + O(2^10) sage: g = f + x^4; g (3 + O(2^10))*x*y + (1 + O(2^10)) + (2 + O(2^10))*x^4 sage: g.leading_coefficient() 3 + O(2^10)
>>> from sage.all import * >>> R = Zp(Integer(2), prec=Integer(10), print_mode='terse') >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = x**Integer(4) + Integer(3)*x*y + Integer(1); f (1 + O(2^10))*x^4 + (3 + O(2^10))*x*y + (1 + O(2^10)) >>> f.leading_coefficient() 1 + O(2^10) >>> g = f + x**Integer(4); g (3 + O(2^10))*x*y + (1 + O(2^10)) + (2 + O(2^10))*x^4 >>> g.leading_coefficient() 3 + O(2^10)
R = Zp(2, prec=10, print_mode='terse') A.<x,y> = TateAlgebra(R) f = x^4 + 3*x*y + 1; f f.leading_coefficient() g = f + x^4; g g.leading_coefficient()
See also
- leading_monomial(secure=False)[source]¶
Return the leading coefficient of this series.
Note
The leading monomial is the monomial of the leading term.
INPUT:
secure– boolean (default:False); ifTrue, raises an error if the leading term cannot be determined due to the existence of terms which are indistinguishable from zero. IfFalse, discard silently these terms.
EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: f = x^4 + x*y + 1; f ...0000000001*x^4 + ...0000000001*x*y + ...0000000001 sage: f.leading_monomial() ...0000000001*x^4 sage: g = f + x^4; g ...0000000001*x*y + ...0000000001 + ...0000000010*x^4 sage: g.leading_monomial() ...0000000001*x*y
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = x**Integer(4) + x*y + Integer(1); f ...0000000001*x^4 + ...0000000001*x*y + ...0000000001 >>> f.leading_monomial() ...0000000001*x^4 >>> g = f + x**Integer(4); g ...0000000001*x*y + ...0000000001 + ...0000000010*x^4 >>> g.leading_monomial() ...0000000001*x*y
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) f = x^4 + x*y + 1; f f.leading_monomial() g = f + x^4; g g.leading_monomial()
See also
- leading_term(secure=False)[source]¶
Return the leading term of this series.
Note
The order on the terms is defined as follows: first we compare the valuation and, in case of equality, we compare the monomials with respect to the order given at the creation of the parent.
INPUT:
secure– boolean (default:False); ifTrue, raises an error if the leading term cannot be determined due to the existence of terms which are indistinguishable from zero. IfFalse, discard silently these terms.
EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: f = x^4 + x*y + 1; f ...0000000001*x^4 + ...0000000001*x*y + ...0000000001 sage: f.leading_term() ...0000000001*x^4 sage: g = f + x^4; g ...0000000001*x*y + ...0000000001 + ...0000000010*x^4 sage: g.leading_monomial() ...0000000001*x*y
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = x**Integer(4) + x*y + Integer(1); f ...0000000001*x^4 + ...0000000001*x*y + ...0000000001 >>> f.leading_term() ...0000000001*x^4 >>> g = f + x**Integer(4); g ...0000000001*x*y + ...0000000001 + ...0000000010*x^4 >>> g.leading_monomial() ...0000000001*x*y
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) f = x^4 + x*y + 1; f f.leading_term() g = f + x^4; g g.leading_monomial()
Observe that the leading term may change after restriction:
sage: f.restriction(-1).leading_term() ...0000000001
>>> from sage.all import * >>> f.restriction(-Integer(1)).leading_term() ...0000000001
f.restriction(-1).leading_term()
See also
- lift_to_precision(prec=None)[source]¶
Return a lift of this series at precision
prec.INPUT:
prec– integer orNone(default:None); ifNone, the cap of the parent is used if it is higher than the current precision
EXAMPLES:
sage: R = Zp(2, prec=10) sage: A.<x,y> = TateAlgebra(R) sage: f = R(1,4)*x*y + R(1,5)*x + R(1,8)*y sage: f (1 + O(2^4))*x*y + (1 + O(2^5))*x + (1 + O(2^8))*y
>>> from sage.all import * >>> R = Zp(Integer(2), prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = R(Integer(1),Integer(4))*x*y + R(Integer(1),Integer(5))*x + R(Integer(1),Integer(8))*y >>> f (1 + O(2^4))*x*y + (1 + O(2^5))*x + (1 + O(2^8))*y
R = Zp(2, prec=10) A.<x,y> = TateAlgebra(R) f = R(1,4)*x*y + R(1,5)*x + R(1,8)*y f
This method lifts the precision of the coefficients:
sage: f.lift_to_precision() (1 + O(2^10))*x*y + (1 + O(2^10))*x + (1 + O(2^10))*y
>>> from sage.all import * >>> f.lift_to_precision() (1 + O(2^10))*x*y + (1 + O(2^10))*x + (1 + O(2^10))*y
f.lift_to_precision()
and also acts on the global
O(.)of the series:sage: g = f.add_bigoh(7) sage: g (1 + O(2^4))*x*y + (1 + O(2^5))*x + (1 + O(2^7))*y + O(2^7 * <x, y>) sage: g.lift_to_precision() (1 + O(2^10))*x*y + (1 + O(2^10))*x + (1 + O(2^10))*y + O(2^10 * <x, y>) sage: g.lift_to_precision(9) (1 + O(2^9))*x*y + (1 + O(2^9))*x + (1 + O(2^9))*y + O(2^9 * <x, y>)
>>> from sage.all import * >>> g = f.add_bigoh(Integer(7)) >>> g (1 + O(2^4))*x*y + (1 + O(2^5))*x + (1 + O(2^7))*y + O(2^7 * <x, y>) >>> g.lift_to_precision() (1 + O(2^10))*x*y + (1 + O(2^10))*x + (1 + O(2^10))*y + O(2^10 * <x, y>) >>> g.lift_to_precision(Integer(9)) (1 + O(2^9))*x*y + (1 + O(2^9))*x + (1 + O(2^9))*y + O(2^9 * <x, y>)
g = f.add_bigoh(7) g g.lift_to_precision() g.lift_to_precision(9)
In the next example, the precision on the coefficient is only lifted to
O(2^10)because it is limited by the cap of the underlying \(p\)-adic ring:sage: g.lift_to_precision(20) (1 + O(2^10))*x*y + (1 + O(2^10))*x + (1 + O(2^10))*y + O(2^20 * <x, y>)
>>> from sage.all import * >>> g.lift_to_precision(Integer(20)) (1 + O(2^10))*x*y + (1 + O(2^10))*x + (1 + O(2^10))*y + O(2^20 * <x, y>)
g.lift_to_precision(20)
- log(prec=None)[source]¶
Return the logarithm of this series.
INPUT:
prec– integer orNone(default:None); the absolute precision at which the result is computed, ifNonethe cap of the Tate algebra is used
EXAMPLES:
sage: R = Zp(3, 10, print_mode='digits') sage: A.<x,y> = TateAlgebra(R) sage: f = 1 + 3*x + 9*y^2 sage: f.log() ...0000000010*x + ...0000000100*x^3 + ...1111111100*x^2 + ...0000000100*y^2 + ...2222222000*x*y^2 + ... + O(3^10 * <x, y>) sage: f.log(prec=4) ...0010*x + ...0100*x^3 + ...1100*x^2 + ...0100*y^2 + ...2000*x*y^2 + O(3^4 * <x, y>)
>>> from sage.all import * >>> R = Zp(Integer(3), Integer(10), print_mode='digits') >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = Integer(1) + Integer(3)*x + Integer(9)*y**Integer(2) >>> f.log() ...0000000010*x + ...0000000100*x^3 + ...1111111100*x^2 + ...0000000100*y^2 + ...2222222000*x*y^2 + ... + O(3^10 * <x, y>) >>> f.log(prec=Integer(4)) ...0010*x + ...0100*x^3 + ...1100*x^2 + ...0100*y^2 + ...2000*x*y^2 + O(3^4 * <x, y>)
R = Zp(3, 10, print_mode='digits') A.<x,y> = TateAlgebra(R) f = 1 + 3*x + 9*y^2 f.log() f.log(prec=4)
If the precision on the input is not enough to determine the result at precision
prec, a result with smaller precision is returned:sage: g = f.add_bigoh(4); g ...0001 + ...0010*x + ...0100*y^2 + O(3^4 * <x, y>) sage: g.log() ...0010*x + ...0100*x^3 + ...1100*x^2 + ...0100*y^2 + ...2000*x*y^2 + O(3^4 * <x, y>) sage: g.log(prec=10) ...0010*x + ...0100*x^3 + ...1100*x^2 + ...0100*y^2 + ...2000*x*y^2 + O(3^4 * <x, y>)
>>> from sage.all import * >>> g = f.add_bigoh(Integer(4)); g ...0001 + ...0010*x + ...0100*y^2 + O(3^4 * <x, y>) >>> g.log() ...0010*x + ...0100*x^3 + ...1100*x^2 + ...0100*y^2 + ...2000*x*y^2 + O(3^4 * <x, y>) >>> g.log(prec=Integer(10)) ...0010*x + ...0100*x^3 + ...1100*x^2 + ...0100*y^2 + ...2000*x*y^2 + O(3^4 * <x, y>)
g = f.add_bigoh(4); g g.log() g.log(prec=10)
When the input value is outside the domain of convergence, an error is raised:
sage: f = 1 + x sage: f.log() Traceback (most recent call last): ... ValueError: not in the domain of convergence
>>> from sage.all import * >>> f = Integer(1) + x >>> f.log() Traceback (most recent call last): ... ValueError: not in the domain of convergence
f = 1 + x f.log()
However \(\log(1+x)\) converges on a smaller disk:
sage: f.restriction(-1).log() ...000000001*x + ...0000000.1*x^3 + ...11111111*x^2 + ... + O(3^10 * <x/3, y/3>)
>>> from sage.all import * >>> f.restriction(-Integer(1)).log() ...000000001*x + ...0000000.1*x^3 + ...11111111*x^2 + ... + O(3^10 * <x/3, y/3>)
f.restriction(-1).log()
- monic()[source]¶
Return this series normalized so that it has valuation 0 and its leading coefficient is a power of the uniformizer.
EXAMPLES:
When the log radii of convergence are all zero, the leading coefficient of the returned series is \(1\):
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R, order='lex') sage: f = 3*x^2*y^2 + 4*x^2*y^3 + y^5; f ...0000000011*x^2*y^2 + ...0000000001*y^5 + ...000000000100*x^2*y^3 sage: f.monic() ...0000000001*x^2*y^2 + ...1010101011*y^5 + ...101010101100*x^2*y^3
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, order='lex', names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = Integer(3)*x**Integer(2)*y**Integer(2) + Integer(4)*x**Integer(2)*y**Integer(3) + y**Integer(5); f ...0000000011*x^2*y^2 + ...0000000001*y^5 + ...000000000100*x^2*y^3 >>> f.monic() ...0000000001*x^2*y^2 + ...1010101011*y^5 + ...101010101100*x^2*y^3
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R, order='lex') f = 3*x^2*y^2 + 4*x^2*y^3 + y^5; f f.monic()
However, when log radii do not vanish, behaviors might be different:
sage: g = f.restriction(-1); g ...0000000011*x^2*y^2 + ...0000000001*y^5 + ...000000000100*x^2*y^3 sage: g.monic() ...000000.0001*x^2*y^2 + ...101010.1011*y^5 + ...10101010.11*x^2*y^3 sage: g.monic().valuation() 0
>>> from sage.all import * >>> g = f.restriction(-Integer(1)); g ...0000000011*x^2*y^2 + ...0000000001*y^5 + ...000000000100*x^2*y^3 >>> g.monic() ...000000.0001*x^2*y^2 + ...101010.1011*y^5 + ...10101010.11*x^2*y^3 >>> g.monic().valuation() 0
g = f.restriction(-1); g g.monic() g.monic().valuation()
- monomial_coefficients()[source]¶
Return a dictionary whose keys are the exponents and whose values are the corresponding coefficients of this series.
EXAMPLES:
sage: R = Zp(2, prec=10, print_mode='digits') sage: A.<x,y> = TateAlgebra(R) sage: f = 2*x^2 + x sage: f.monomial_coefficients() {(1, 0): ...0000000001, (2, 0): ...00000000010}
>>> from sage.all import * >>> R = Zp(Integer(2), prec=Integer(10), print_mode='digits') >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = Integer(2)*x**Integer(2) + x >>> f.monomial_coefficients() {(1, 0): ...0000000001, (2, 0): ...00000000010}
R = Zp(2, prec=10, print_mode='digits') A.<x,y> = TateAlgebra(R) f = 2*x^2 + x f.monomial_coefficients()
dictis an alias:sage: f.dict() {(1, 0): ...0000000001, (2, 0): ...00000000010}
>>> from sage.all import * >>> f.dict() {(1, 0): ...0000000001, (2, 0): ...00000000010}
f.dict()
- monomials()[source]¶
Return a list of the monomials of this series.
EXAMPLES:
sage: R = Zp(2, prec=10, print_mode='digits') sage: A.<x,y> = TateAlgebra(R) sage: f = 2*x^2 + x sage: f.monomials() # indirect doctest [...0000000001*x, ...0000000001*x^2]
>>> from sage.all import * >>> R = Zp(Integer(2), prec=Integer(10), print_mode='digits') >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = Integer(2)*x**Integer(2) + x >>> f.monomials() # indirect doctest [...0000000001*x, ...0000000001*x^2]
R = Zp(2, prec=10, print_mode='digits') A.<x,y> = TateAlgebra(R) f = 2*x^2 + x f.monomials() # indirect doctest
- nth_root(n=2, prec=None)[source]¶
Return the \(n\)-th root of this series.
INPUT:
n– integer (default: \(2\))prec– integer orNone(default:None); the precision at which the result is computed, ifNone, the result is truncated according to the cap of the parent
Note
The \(n\)-th root is computed as \(\exp(\frac 1 n \log(f))\).
EXAMPLES:
sage: R = Zp(3, prec=10, print_mode='digits') sage: A.<x,y> = TateAlgebra(R) sage: f = 1 + 9*x^2 + 9*y^2 sage: g = f.nth_root(3, prec=3); g ...001 + ...010*x^2 + ...010*y^2 + ...200*x^6 + ...200*y^6 + ...200*x^4 + ...100*x^2*y^2 + ...200*y^4 + O(3^3 * <x, y>) sage: g^3 == f True sage: for n in range(2, 9): ....: if f.nth_root(n)^n != f: raise RuntimeError
>>> from sage.all import * >>> R = Zp(Integer(3), prec=Integer(10), print_mode='digits') >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = Integer(1) + Integer(9)*x**Integer(2) + Integer(9)*y**Integer(2) >>> g = f.nth_root(Integer(3), prec=Integer(3)); g ...001 + ...010*x^2 + ...010*y^2 + ...200*x^6 + ...200*y^6 + ...200*x^4 + ...100*x^2*y^2 + ...200*y^4 + O(3^3 * <x, y>) >>> g**Integer(3) == f True >>> for n in range(Integer(2), Integer(9)): ... if f.nth_root(n)**n != f: raise RuntimeError
R = Zp(3, prec=10, print_mode='digits') A.<x,y> = TateAlgebra(R) f = 1 + 9*x^2 + 9*y^2 g = f.nth_root(3, prec=3); g g^3 == f for n in range(2, 9): if f.nth_root(n)^n != f: raise RuntimeErrorIt’s possible that \(f\) has a trivial
n-th root (which is analytic on the correct domain) but that \(\exp(\frac 1 n \log(f))\) does not converge. In this case, an error is raised:sage: f = x^3 sage: f.nth_root(3) Traceback (most recent call last): ... ValueError: not in the domain of convergence
>>> from sage.all import * >>> f = x**Integer(3) >>> f.nth_root(Integer(3)) Traceback (most recent call last): ... ValueError: not in the domain of convergence
f = x^3 f.nth_root(3)
- precision_absolute()[source]¶
Return the maximal precision at which a term of this series is known.
EXAMPLES:
sage: R = Zp(2, prec=10, print_mode='digits') sage: A.<x,y> = TateAlgebra(R) sage: f = x + 2*x^2; f ...0000000001*x + ...00000000010*x^2 sage: f.precision_absolute() +Infinity sage: g = f.add_bigoh(5); g ...00001*x + ...00010*x^2 + O(2^5 * <x, y>) sage: g.precision_absolute() 5
>>> from sage.all import * >>> R = Zp(Integer(2), prec=Integer(10), print_mode='digits') >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = x + Integer(2)*x**Integer(2); f ...0000000001*x + ...00000000010*x^2 >>> f.precision_absolute() +Infinity >>> g = f.add_bigoh(Integer(5)); g ...00001*x + ...00010*x^2 + O(2^5 * <x, y>) >>> g.precision_absolute() 5
R = Zp(2, prec=10, print_mode='digits') A.<x,y> = TateAlgebra(R) f = x + 2*x^2; f f.precision_absolute() g = f.add_bigoh(5); g g.precision_absolute()
The absolute precision may be higher than the precision of some individual coefficients:
sage: g = f.add_bigoh(20); g ...0000000001*x + ...00000000010*x^2 + O(2^20 * <x, y>) sage: g.precision_absolute() 20
>>> from sage.all import * >>> g = f.add_bigoh(Integer(20)); g ...0000000001*x + ...00000000010*x^2 + O(2^20 * <x, y>) >>> g.precision_absolute() 20
g = f.add_bigoh(20); g g.precision_absolute()
- precision_relative()[source]¶
Return the relative precision of this series.
The relative precision is defined as the difference between the absolute precision and the valuation.
EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R.fraction_field()) sage: f = x^4 + 4*x*y + 1; f ...0000000001*x^4 + ...0000000001 + ...000000000100*x*y sage: f.precision_relative() +Infinity sage: g = f.add_bigoh(5) sage: g.precision_relative() 5 sage: g.precision_absolute() 5 sage: g.valuation() 0 sage: h = g + 1/2 ; h ...00001.1 + ...00001*x^4 + ...00100*x*y + O(2^5 * <x, y>) sage: h.precision_relative() 6 sage: h.precision_absolute() 5 sage: h.valuation() -1
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R.fraction_field(), names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = x**Integer(4) + Integer(4)*x*y + Integer(1); f ...0000000001*x^4 + ...0000000001 + ...000000000100*x*y >>> f.precision_relative() +Infinity >>> g = f.add_bigoh(Integer(5)) >>> g.precision_relative() 5 >>> g.precision_absolute() 5 >>> g.valuation() 0 >>> h = g + Integer(1)/Integer(2) ; h ...00001.1 + ...00001*x^4 + ...00100*x*y + O(2^5 * <x, y>) >>> h.precision_relative() 6 >>> h.precision_absolute() 5 >>> h.valuation() -1
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R.fraction_field()) f = x^4 + 4*x*y + 1; f f.precision_relative() g = f.add_bigoh(5) g.precision_relative() g.precision_absolute() g.valuation() h = g + 1/2 ; h h.precision_relative() h.precision_absolute() h.valuation()
- quo_rem(divisors)[source]¶
Return the quotient(s) and the remainder of the division of this series by
divisors.INPUT:
divisors– a series, or a list of series
NOTE:
The condition on the remainder is that it has
no term which is greater than the leading term of the numerator and
no term which is divisible by the leading term of one divisor.
EXAMPLES:
sage: R = Zp(2, 5, print_mode='digits') sage: A.<x,y> = TateAlgebra(R) sage: f = 1 + 2*x*y + 3*x^2*y + 4*x*y^2 sage: g = x^2 sage: q, r = f.quo_rem(g) sage: q ...00011*y sage: r ...00001 + ...00010*x*y + ...00100*x*y^2 + O(2^5 * <x, y>) sage: f == g*q + r True
>>> from sage.all import * >>> R = Zp(Integer(2), Integer(5), print_mode='digits') >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = Integer(1) + Integer(2)*x*y + Integer(3)*x**Integer(2)*y + Integer(4)*x*y**Integer(2) >>> g = x**Integer(2) >>> q, r = f.quo_rem(g) >>> q ...00011*y >>> r ...00001 + ...00010*x*y + ...00100*x*y^2 + O(2^5 * <x, y>) >>> f == g*q + r True
R = Zp(2, 5, print_mode='digits') A.<x,y> = TateAlgebra(R) f = 1 + 2*x*y + 3*x^2*y + 4*x*y^2 g = x^2 q, r = f.quo_rem(g) q r f == g*q + r
We can also divide by a family of divisors:
sage: g0 = x^2 sage: g1 = x*y + 2*x sage: q, r = f.quo_rem([g0, g1]) sage: q [...00011*y, ...11010 + ...00100*y] sage: r ...00001 + ...01100*x + O(2^5 * <x, y>) sage: f == g0*q[0] + g1*q[1] + r True
>>> from sage.all import * >>> g0 = x**Integer(2) >>> g1 = x*y + Integer(2)*x >>> q, r = f.quo_rem([g0, g1]) >>> q [...00011*y, ...11010 + ...00100*y] >>> r ...00001 + ...01100*x + O(2^5 * <x, y>) >>> f == g0*q[Integer(0)] + g1*q[Integer(1)] + r True
g0 = x^2 g1 = x*y + 2*x q, r = f.quo_rem([g0, g1]) q r f == g0*q[0] + g1*q[1] + r
- reduce(I)[source]¶
Return a canonical representative of this series in the quotient of the Tate algebra (in which this series lives) by the ideal
I.EXAMPLES:
sage: R = Zp(3, prec=10, print_mode='digits') sage: A.<x,y> = TateAlgebra(R) sage: f = 3*x^2 + 5*x*y^2 sage: g = 5*x^2*y + 3 sage: I = A.ideal([f, g]) sage: f.reduce(I) O(3^9 * <x, y>) sage: h = (x^2 + 2*y)*f + (x^2*y^3 + 3*x*y^2 + 7)*g + 1 sage: h.reduce(I) ...000000001 + O(3^9 * <x, y>)
>>> from sage.all import * >>> R = Zp(Integer(3), prec=Integer(10), print_mode='digits') >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = Integer(3)*x**Integer(2) + Integer(5)*x*y**Integer(2) >>> g = Integer(5)*x**Integer(2)*y + Integer(3) >>> I = A.ideal([f, g]) >>> f.reduce(I) O(3^9 * <x, y>) >>> h = (x**Integer(2) + Integer(2)*y)*f + (x**Integer(2)*y**Integer(3) + Integer(3)*x*y**Integer(2) + Integer(7))*g + Integer(1) >>> h.reduce(I) ...000000001 + O(3^9 * <x, y>)
R = Zp(3, prec=10, print_mode='digits') A.<x,y> = TateAlgebra(R) f = 3*x^2 + 5*x*y^2 g = 5*x^2*y + 3 I = A.ideal([f, g]) f.reduce(I) h = (x^2 + 2*y)*f + (x^2*y^3 + 3*x*y^2 + 7)*g + 1 h.reduce(I)
- residue(n=None)[source]¶
Return this series modulo the
n-th power of the uniformizer.Note that by definition of Tate series, the output is a polynomial.
INPUT:
n– integer (default: \(1\))
EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: f = x^2 + y^2 + 6*x^3 + 3*y sage: f.residue() x^2 + y^2 + y sage: f.residue().parent() Multivariate Polynomial Ring in x, y over Finite Field of size 2 sage: f.residue(2) 2*x^3 + x^2 + y^2 - y sage: f.residue(2).parent() Multivariate Polynomial Ring in x, y over Ring of integers modulo 4
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = x**Integer(2) + y**Integer(2) + Integer(6)*x**Integer(3) + Integer(3)*y >>> f.residue() x^2 + y^2 + y >>> f.residue().parent() Multivariate Polynomial Ring in x, y over Finite Field of size 2 >>> f.residue(Integer(2)) 2*x^3 + x^2 + y^2 - y >>> f.residue(Integer(2)).parent() Multivariate Polynomial Ring in x, y over Ring of integers modulo 4
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) f = x^2 + y^2 + 6*x^3 + 3*y f.residue() f.residue().parent() f.residue(2) f.residue(2).parent()
The residue can only be computed for series with nonnegative valuation.
sage: g = f >> 2; g …00000000.01*x^2 + …00000000.01*y^2 + …00000000.11*y + …000000001.1*x^3 sage: g.residue() Traceback (most recent call last): … ValueError: element must have nonnegative valuation in order to compute residue
The residue is not implemented for series with convergence radius different from 1.
sage: A.<x,y> = TateAlgebra(R, log_radii=(2,-1)) sage: f = x^2 + y^2 + 6*x^3 + 3*y sage: f.residue() Traceback (most recent call last): … NotImplementedError: residues are only implemented for radius 1
- restriction(log_radii)[source]¶
Return the restriction of this series to a smaller domain.
INPUT:
log_radii– integer or a tuple; the log-radii of convergence of the smaller domain (seeTateAlgebrafor more details)
EXAMPLES:
sage: R = Zp(2, prec=10, print_mode='digits') sage: A.<x,y> = TateAlgebra(R) sage: f = 2*x + y^2; f ...0000000001*y^2 + ...00000000010*x sage: g = f.restriction(-1); g ...0000000001*y^2 + ...00000000010*x sage: g.parent() Tate Algebra in x (val >= 1), y (val >= 1) over 2-adic Field with capped relative precision 10
>>> from sage.all import * >>> R = Zp(Integer(2), prec=Integer(10), print_mode='digits') >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = Integer(2)*x + y**Integer(2); f ...0000000001*y^2 + ...00000000010*x >>> g = f.restriction(-Integer(1)); g ...0000000001*y^2 + ...00000000010*x >>> g.parent() Tate Algebra in x (val >= 1), y (val >= 1) over 2-adic Field with capped relative precision 10
R = Zp(2, prec=10, print_mode='digits') A.<x,y> = TateAlgebra(R) f = 2*x + y^2; f g = f.restriction(-1); g g.parent()
Note that restricting may change the order of the terms:
sage: f.restriction([-1,-2]) ...00000000010*x + ...0000000001*y^2
>>> from sage.all import * >>> f.restriction([-Integer(1),-Integer(2)]) ...00000000010*x + ...0000000001*y^2
f.restriction([-1,-2])
- sqrt(prec=None)[source]¶
Return the square root of this series.
INPUT:
prec– integer orNone(default:None); the precision at which the result is computed, ifNone, the result is truncated according to the cap of the parent
EXAMPLES:
sage: R = Zp(3, prec=10, print_mode='digits') sage: A.<x,y> = TateAlgebra(R) sage: f = 1 + 6*x^2 + 9*y^2 sage: g = f.sqrt(); g ...0000000001 + ...0000000010*x^2 + ...1111111100*x^4 + ...1111111200*y^2 + ...1111112000*x^6 + ...1111111000*x^2*y^2 + ... + O(3^10 * <x, y>) sage: f.sqrt(prec=4) ...0001 + ...0010*x^2 + ...1100*x^4 + ...1200*y^2 + ...2000*x^6 + ...1000*x^2*y^2 + O(3^4 * <x, y>) sage: g^2 == f True
>>> from sage.all import * >>> R = Zp(Integer(3), prec=Integer(10), print_mode='digits') >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = Integer(1) + Integer(6)*x**Integer(2) + Integer(9)*y**Integer(2) >>> g = f.sqrt(); g ...0000000001 + ...0000000010*x^2 + ...1111111100*x^4 + ...1111111200*y^2 + ...1111112000*x^6 + ...1111111000*x^2*y^2 + ... + O(3^10 * <x, y>) >>> f.sqrt(prec=Integer(4)) ...0001 + ...0010*x^2 + ...1100*x^4 + ...1200*y^2 + ...2000*x^6 + ...1000*x^2*y^2 + O(3^4 * <x, y>) >>> g**Integer(2) == f True
R = Zp(3, prec=10, print_mode='digits') A.<x,y> = TateAlgebra(R) f = 1 + 6*x^2 + 9*y^2 g = f.sqrt(); g f.sqrt(prec=4) g^2 == f
It’s possible that \(f\) has a trivial square root (which is analytic on the correct domain) but that it takes its values outside the domain of convergence of the square root function. In this case, an error is raised:
sage: f = x^2 sage: f.sqrt() Traceback (most recent call last): ... ValueError: not in the domain of convergence
>>> from sage.all import * >>> f = x**Integer(2) >>> f.sqrt() Traceback (most recent call last): ... ValueError: not in the domain of convergence
f = x^2 f.sqrt()
- square_root(prec=None)[source]¶
Return the square root of this series.
INPUT:
prec– integer orNone(default:None); the precision at which the result is computed, ifNone, the result is truncated according to the cap of the parent
EXAMPLES:
sage: R = Zp(3, prec=10, print_mode='digits') sage: A.<x,y> = TateAlgebra(R) sage: f = 1 + 6*x^2 + 9*y^2 sage: g = f.sqrt(); g ...0000000001 + ...0000000010*x^2 + ...1111111100*x^4 + ...1111111200*y^2 + ...1111112000*x^6 + ...1111111000*x^2*y^2 + ... + O(3^10 * <x, y>) sage: f.square_root(prec=4) ...0001 + ...0010*x^2 + ...1100*x^4 + ...1200*y^2 + ...2000*x^6 + ...1000*x^2*y^2 + O(3^4 * <x, y>) sage: g^2 == f True
>>> from sage.all import * >>> R = Zp(Integer(3), prec=Integer(10), print_mode='digits') >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = Integer(1) + Integer(6)*x**Integer(2) + Integer(9)*y**Integer(2) >>> g = f.sqrt(); g ...0000000001 + ...0000000010*x^2 + ...1111111100*x^4 + ...1111111200*y^2 + ...1111112000*x^6 + ...1111111000*x^2*y^2 + ... + O(3^10 * <x, y>) >>> f.square_root(prec=Integer(4)) ...0001 + ...0010*x^2 + ...1100*x^4 + ...1200*y^2 + ...2000*x^6 + ...1000*x^2*y^2 + O(3^4 * <x, y>) >>> g**Integer(2) == f True
R = Zp(3, prec=10, print_mode='digits') A.<x,y> = TateAlgebra(R) f = 1 + 6*x^2 + 9*y^2 g = f.sqrt(); g f.square_root(prec=4) g^2 == f
It’s possible that \(f\) has a trivial square root (which is analytic on the correct domain) but that it takes its values outside the domain of convergence of the square root function. In this case, an error is raised:
sage: f = x^2 sage: f.square_root() Traceback (most recent call last): ... ValueError: not in the domain of convergence
>>> from sage.all import * >>> f = x**Integer(2) >>> f.square_root() Traceback (most recent call last): ... ValueError: not in the domain of convergence
f = x^2 f.square_root()
- terms()[source]¶
Return a list of the terms of this series sorted in descending order.
Note
The order on the terms is defined as follows: first we compare the valuation and, in case of equality, we compare the monomials with respect to the order given at the creation of the parent.
EXAMPLES:
sage: R = Zp(2, prec=10, print_mode='digits') sage: A.<x,y> = TateAlgebra(R) sage: f = 2*x^2 + x sage: f.terms() [...0000000001*x, ...00000000010*x^2]
>>> from sage.all import * >>> R = Zp(Integer(2), prec=Integer(10), print_mode='digits') >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = Integer(2)*x**Integer(2) + x >>> f.terms() [...0000000001*x, ...00000000010*x^2]
R = Zp(2, prec=10, print_mode='digits') A.<x,y> = TateAlgebra(R) f = 2*x^2 + x f.terms()
- valuation()[source]¶
Return the valuation of this series.
Note
The valuation of a series \(f\) is defined as the minimal valuation of \(f(x)\) for \(x\) varying in the domain of convergence (specified in the parent).
EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: f = x^4 + 4*x*y + 1; f ...0000000001*x^4 + ...0000000001 + ...000000000100*x*y sage: f.valuation() 0 sage: g = 2*f; g ...00000000010*x^4 + ...00000000010 + ...0000000001000*x*y sage: g.valuation() 1
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = x**Integer(4) + Integer(4)*x*y + Integer(1); f ...0000000001*x^4 + ...0000000001 + ...000000000100*x*y >>> f.valuation() 0 >>> g = Integer(2)*f; g ...00000000010*x^4 + ...00000000010 + ...0000000001000*x*y >>> g.valuation() 1
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) f = x^4 + 4*x*y + 1; f f.valuation() g = 2*f; g g.valuation()
When the radius of convergence is not 1, the variables themselves have a nontrivial valuation:
sage: A.<x,y> = TateAlgebra(R, log_radii=(1,2)) sage: x.valuation() -1 sage: y.valuation() -2 sage: f = x^4 + 4*x*y + 1 sage: f.valuation() -4
>>> from sage.all import * >>> A = TateAlgebra(R, log_radii=(Integer(1),Integer(2)), names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> x.valuation() -1 >>> y.valuation() -2 >>> f = x**Integer(4) + Integer(4)*x*y + Integer(1) >>> f.valuation() -4
A.<x,y> = TateAlgebra(R, log_radii=(1,2)) x.valuation() y.valuation() f = x^4 + 4*x*y + 1 f.valuation()
- weierstrass_degree()[source]¶
Return the Weierstrass degree of this Tate series.
Note
The Weierstrass degree is the total degree of the polynomial defined by the terms with least valuation in the series.
EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: f = x*y + 2*x^4 + y; f ...0000000001*x*y + ...0000000001*y + ...00000000010*x^4 sage: f.weierstrass_degree() 2
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = x*y + Integer(2)*x**Integer(4) + y; f ...0000000001*x*y + ...0000000001*y + ...00000000010*x^4 >>> f.weierstrass_degree() 2
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) f = x*y + 2*x^4 + y; f f.weierstrass_degree()
- weierstrass_degrees()[source]¶
Return the Weierstrass degrees of this Tate series.
Note
The Weierstrass degrees are the partial degrees of the polynomial defined by the terms with least valuation in the series.
EXAMPLES:
sage: R = Zp(2, print_mode='digits',prec=10) sage: A.<x,y> = TateAlgebra(R) sage: f = x^2 + y^2 + 2*x^3 + y; f ...0000000001*x^2 + ...0000000001*y^2 + ...0000000001*y + ...00000000010*x^3 sage: f.weierstrass_degrees() (2, 2)
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits',prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> f = x**Integer(2) + y**Integer(2) + Integer(2)*x**Integer(3) + y; f ...0000000001*x^2 + ...0000000001*y^2 + ...0000000001*y + ...00000000010*x^3 >>> f.weierstrass_degrees() (2, 2)
R = Zp(2, print_mode='digits',prec=10) A.<x,y> = TateAlgebra(R) f = x^2 + y^2 + 2*x^3 + y; f f.weierstrass_degrees()
- class sage.rings.tate_algebra_element.TateAlgebraTerm[source]¶
Bases:
MonoidElementA class for Tate algebra terms.
A term in \(K\{X_1,\dots,X_n\}\) is the product of a coefficient in \(K\) and a monomial in the variables \(X_1,\dots,X_n\).
Those terms form a partially ordered monoid, with term multiplication and the term order of the parent Tate algebra.
INPUT:
coeff– an element in the base fieldexponent– tuple of lengthn
EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: T = A.monoid_of_terms(); T Monoid of terms in x (val >= 0), y (val >= 0) over 2-adic Field with capped relative precision 10 sage: T(2*x*y) ...00000000010*x*y sage: T(0) Traceback (most recent call last): ... TypeError: a term cannot be zero
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> T = A.monoid_of_terms(); T Monoid of terms in x (val >= 0), y (val >= 0) over 2-adic Field with capped relative precision 10 >>> T(Integer(2)*x*y) ...00000000010*x*y >>> T(Integer(0)) Traceback (most recent call last): ... TypeError: a term cannot be zero
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) T = A.monoid_of_terms(); T T(2*x*y) T(0)
- coefficient()[source]¶
Return the coefficient of this Tate algebra term.
EXAMPLES:
sage: R = Zp(2,prec=10) sage: A.<x,y> = TateAlgebra(R) sage: T = A.monoid_of_terms() sage: t = T(2*x*y); t (2 + O(2^11))*x*y sage: t.coefficient() 2 + O(2^11)
>>> from sage.all import * >>> R = Zp(Integer(2),prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> T = A.monoid_of_terms() >>> t = T(Integer(2)*x*y); t (2 + O(2^11))*x*y >>> t.coefficient() 2 + O(2^11)
R = Zp(2,prec=10) A.<x,y> = TateAlgebra(R) T = A.monoid_of_terms() t = T(2*x*y); t t.coefficient()
- divides(other, integral=False)[source]¶
Return
Trueif this term dividesother.INPUT:
other– a Tate termintegral– (default:False) ifTrue, test for divisibility in the ring of integers of the Tate algebra
EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: T = A.monoid_of_terms() sage: s = T(4*x^2*y^2); s ...000000000100*x^2*y^2 sage: t = T(4*x*y^3); t ...000000000100*x*y^3 sage: t.divides(s) False sage: t = T(4*x*y^2); t ...000000000100*x*y^2 sage: t.divides(s) True sage: t = T(16); t ...00000000010000 sage: t.divides(s) True sage: t.divides(s, integral=True) False
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> T = A.monoid_of_terms() >>> s = T(Integer(4)*x**Integer(2)*y**Integer(2)); s ...000000000100*x^2*y^2 >>> t = T(Integer(4)*x*y**Integer(3)); t ...000000000100*x*y^3 >>> t.divides(s) False >>> t = T(Integer(4)*x*y**Integer(2)); t ...000000000100*x*y^2 >>> t.divides(s) True >>> t = T(Integer(16)); t ...00000000010000 >>> t.divides(s) True >>> t.divides(s, integral=True) False
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) T = A.monoid_of_terms() s = T(4*x^2*y^2); s t = T(4*x*y^3); t t.divides(s) t = T(4*x*y^2); t t.divides(s) t = T(16); t t.divides(s) t.divides(s, integral=True)
If you are working over the ring of integers of the Tate algebra, divisibility is always checked in the ring of integers (even if
integralis set toFalse):sage: Ao = A.integer_ring() sage: To = Ao.monoid_of_terms() sage: so = To(s) sage: to = To(t) sage: to.divides(so) False sage: to.divides(so, integral=False) False
>>> from sage.all import * >>> Ao = A.integer_ring() >>> To = Ao.monoid_of_terms() >>> so = To(s) >>> to = To(t) >>> to.divides(so) False >>> to.divides(so, integral=False) False
Ao = A.integer_ring() To = Ao.monoid_of_terms() so = To(s) to = To(t) to.divides(so) to.divides(so, integral=False)
Be careful that coercion between the Tate algebra and its ring of integers can be done silently:
sage: to.divides(s) True
>>> from sage.all import * >>> to.divides(s) True
to.divides(s)
- exponent()[source]¶
Return the exponents of this Tate algebra term.
EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: T = A.monoid_of_terms(); T Monoid of terms in x (val >= 0), y (val >= 0) over 2-adic Field with capped relative precision 10 sage: t = T(2,(1,1)) sage: t.exponent() (1, 1)
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> T = A.monoid_of_terms(); T Monoid of terms in x (val >= 0), y (val >= 0) over 2-adic Field with capped relative precision 10 >>> t = T(Integer(2),(Integer(1),Integer(1))) >>> t.exponent() (1, 1)
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) T = A.monoid_of_terms(); T t = T(2,(1,1)) t.exponent()
- gcd(other)[source]¶
Return the greatest common divisor of this term and
other.The result is normalized so that:
its valuation is equal to the smallest valuation of this term and
otherits coefficient is a power of the uniformizer.
INPUT:
other– a Tate term
EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: T = A.monoid_of_terms() sage: s = T(8*x^2*y^2); s ...0000000001000*x^2*y^2 sage: t = T(4*x*y^3); t ...000000000100*x*y^3 sage: s.gcd(t) ...000000000100*x*y^2
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> T = A.monoid_of_terms() >>> s = T(Integer(8)*x**Integer(2)*y**Integer(2)); s ...0000000001000*x^2*y^2 >>> t = T(Integer(4)*x*y**Integer(3)); t ...000000000100*x*y^3 >>> s.gcd(t) ...000000000100*x*y^2
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) T = A.monoid_of_terms() s = T(8*x^2*y^2); s t = T(4*x*y^3); t s.gcd(t)
- is_coprime_with(other)[source]¶
Return
Trueif this term is coprime withother.INPUT:
other– a Tate term
EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: T = A.monoid_of_terms() sage: t = T(4*x^2*y^2); t ...000000000100*x^2*y^2 sage: s = T(y^3); s ...0000000001*y^3 sage: s.is_coprime_with(t) False sage: t.is_coprime_with(s) False sage: tt = T(3*x^2); tt ...0000000011*x^2 sage: s.is_coprime_with(tt) True sage: tt.is_coprime_with(s) True
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> T = A.monoid_of_terms() >>> t = T(Integer(4)*x**Integer(2)*y**Integer(2)); t ...000000000100*x^2*y^2 >>> s = T(y**Integer(3)); s ...0000000001*y^3 >>> s.is_coprime_with(t) False >>> t.is_coprime_with(s) False >>> tt = T(Integer(3)*x**Integer(2)); tt ...0000000011*x^2 >>> s.is_coprime_with(tt) True >>> tt.is_coprime_with(s) True
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) T = A.monoid_of_terms() t = T(4*x^2*y^2); t s = T(y^3); s s.is_coprime_with(t) t.is_coprime_with(s) tt = T(3*x^2); tt s.is_coprime_with(tt) tt.is_coprime_with(s)
When working over a rational Tate algebra, only the monomial part of terms are compared:
sage: t = T(2*x^2); t ...00000000010*x^2 sage: s = T(4*y^3); s ...000000000100*y^3 sage: s.is_coprime_with(t) True
>>> from sage.all import * >>> t = T(Integer(2)*x**Integer(2)); t ...00000000010*x^2 >>> s = T(Integer(4)*y**Integer(3)); s ...000000000100*y^3 >>> s.is_coprime_with(t) True
t = T(2*x^2); t s = T(4*y^3); s s.is_coprime_with(t)
But coefficients play a role when we are working over the ring of integers of the Tate Algebra:
sage: Ao = A.integer_ring() sage: To = Ao.monoid_of_terms() sage: To(s).is_coprime_with(To(t)) False
>>> from sage.all import * >>> Ao = A.integer_ring() >>> To = Ao.monoid_of_terms() >>> To(s).is_coprime_with(To(t)) False
Ao = A.integer_ring() To = Ao.monoid_of_terms() To(s).is_coprime_with(To(t))
- is_divisible_by(other, integral=False)[source]¶
Return
Trueif this term is divisible byother.INPUT:
other– a Tate termintegral– (default:False) ifTrue, test for divisibility in the ring of integers of the Tate algebra
EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: T = A.monoid_of_terms() sage: s = T(4*x^2*y^2); s ...000000000100*x^2*y^2 sage: t = T(4*x*y^3); t ...000000000100*x*y^3 sage: s.is_divisible_by(t) False sage: t = T(4*x*y^2); t ...000000000100*x*y^2 sage: s.is_divisible_by(t) True sage: t = T(16); t ...00000000010000 sage: s.is_divisible_by(t) True sage: s.is_divisible_by(t, integral=True) False
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> T = A.monoid_of_terms() >>> s = T(Integer(4)*x**Integer(2)*y**Integer(2)); s ...000000000100*x^2*y^2 >>> t = T(Integer(4)*x*y**Integer(3)); t ...000000000100*x*y^3 >>> s.is_divisible_by(t) False >>> t = T(Integer(4)*x*y**Integer(2)); t ...000000000100*x*y^2 >>> s.is_divisible_by(t) True >>> t = T(Integer(16)); t ...00000000010000 >>> s.is_divisible_by(t) True >>> s.is_divisible_by(t, integral=True) False
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) T = A.monoid_of_terms() s = T(4*x^2*y^2); s t = T(4*x*y^3); t s.is_divisible_by(t) t = T(4*x*y^2); t s.is_divisible_by(t) t = T(16); t s.is_divisible_by(t) s.is_divisible_by(t, integral=True)
If you are working over the ring of integers of the Tate algebra, divisibility is always checked in the ring of integers (even if
integralis set toFalse):sage: Ao = A.integer_ring() sage: To = Ao.monoid_of_terms() sage: so = To(s) sage: to = To(t) sage: so.is_divisible_by(to) False sage: so.is_divisible_by(to, integral=False) False
>>> from sage.all import * >>> Ao = A.integer_ring() >>> To = Ao.monoid_of_terms() >>> so = To(s) >>> to = To(t) >>> so.is_divisible_by(to) False >>> so.is_divisible_by(to, integral=False) False
Ao = A.integer_ring() To = Ao.monoid_of_terms() so = To(s) to = To(t) so.is_divisible_by(to) so.is_divisible_by(to, integral=False)
Be careful that coercion between the Tate algebra and its ring of integers can be done silently:
sage: s.is_divisible_by(to) True
>>> from sage.all import * >>> s.is_divisible_by(to) True
s.is_divisible_by(to)
- lcm(other)[source]¶
Return the least common multiple of two Tate terms.
The result is normalized so that \(\gcd(a,b) \lcm(a,b) = ab\).
INPUT:
other– a Tate term
EXAMPLES:
In a Tate algebra over a field:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: T = A.monoid_of_terms() sage: s = T(8*x^2*y^2); s ...0000000001000*x^2*y^2 sage: t = T(4*x*y^3); t ...000000000100*x*y^3 sage: s.lcm(t) ...0000000001000*x^2*y^3
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> T = A.monoid_of_terms() >>> s = T(Integer(8)*x**Integer(2)*y**Integer(2)); s ...0000000001000*x^2*y^2 >>> t = T(Integer(4)*x*y**Integer(3)); t ...000000000100*x*y^3 >>> s.lcm(t) ...0000000001000*x^2*y^3
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) T = A.monoid_of_terms() s = T(8*x^2*y^2); s t = T(4*x*y^3); t s.lcm(t)
- monic()[source]¶
Return this term normalized so that it has valuation 0 and its coefficient is a power of the uniformizer.
EXAMPLES:
When the log radii of convergence are all zero, the coefficient of the returned term is \(1\). In this case, this method does the same thing as
monomial():sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: T = A.monoid_of_terms() sage: s = T(3*x^2*y^2); s ...0000000011*x^2*y^2 sage: s.monic() ...0000000001*x^2*y^2 sage: s.monomial() ...0000000001*x^2*y^2
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> T = A.monoid_of_terms() >>> s = T(Integer(3)*x**Integer(2)*y**Integer(2)); s ...0000000011*x^2*y^2 >>> s.monic() ...0000000001*x^2*y^2 >>> s.monomial() ...0000000001*x^2*y^2
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) T = A.monoid_of_terms() s = T(3*x^2*y^2); s s.monic() s.monomial()
However, when log radii do not vanish, behaviors might be different:
sage: A.<x,y> = TateAlgebra(R, log_radii=1) sage: T = A.monoid_of_terms() sage: s = T(3*x^2*y^2); s ...0000000011*x^2*y^2 sage: s.monic() ...00000000010000*x^2*y^2 sage: s.monomial() ...0000000001*x^2*y^2
>>> from sage.all import * >>> A = TateAlgebra(R, log_radii=Integer(1), names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> T = A.monoid_of_terms() >>> s = T(Integer(3)*x**Integer(2)*y**Integer(2)); s ...0000000011*x^2*y^2 >>> s.monic() ...00000000010000*x^2*y^2 >>> s.monomial() ...0000000001*x^2*y^2
A.<x,y> = TateAlgebra(R, log_radii=1) T = A.monoid_of_terms() s = T(3*x^2*y^2); s s.monic() s.monomial()
We compare the valuations:
sage: s.monic().valuation() 0 sage: s.monomial().valuation() -4
>>> from sage.all import * >>> s.monic().valuation() 0 >>> s.monomial().valuation() -4
s.monic().valuation() s.monomial().valuation()
- monomial()[source]¶
Return this term divided by its coefficient.
EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: T = A.monoid_of_terms() sage: s = T(3*x^2*y^2); s ...0000000011*x^2*y^2 sage: s.monomial() ...0000000001*x^2*y^2
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> T = A.monoid_of_terms() >>> s = T(Integer(3)*x**Integer(2)*y**Integer(2)); s ...0000000011*x^2*y^2 >>> s.monomial() ...0000000001*x^2*y^2
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) T = A.monoid_of_terms() s = T(3*x^2*y^2); s s.monomial()
- valuation()[source]¶
Return the valuation of this term.
EXAMPLES:
sage: R = Zp(2, print_mode='digits', prec=10) sage: A.<x,y> = TateAlgebra(R) sage: T = A.monoid_of_terms() sage: t = T(4*x^2*y^2); t ...000000000100*x^2*y^2 sage: t.valuation() 2
>>> from sage.all import * >>> R = Zp(Integer(2), print_mode='digits', prec=Integer(10)) >>> A = TateAlgebra(R, names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> T = A.monoid_of_terms() >>> t = T(Integer(4)*x**Integer(2)*y**Integer(2)); t ...000000000100*x^2*y^2 >>> t.valuation() 2
R = Zp(2, print_mode='digits', prec=10) A.<x,y> = TateAlgebra(R) T = A.monoid_of_terms() t = T(4*x^2*y^2); t t.valuation()
In case of nonzero log radii, the valuations of the variables contribute:
sage: A.<x,y> = TateAlgebra(R, log_radii=1) sage: T = A.monoid_of_terms() sage: t = T(4*x^2*y^2); t ...000000000100*x^2*y^2 sage: t.valuation() -2
>>> from sage.all import * >>> A = TateAlgebra(R, log_radii=Integer(1), names=('x', 'y',)); (x, y,) = A._first_ngens(2) >>> T = A.monoid_of_terms() >>> t = T(Integer(4)*x**Integer(2)*y**Integer(2)); t ...000000000100*x^2*y^2 >>> t.valuation() -2
A.<x,y> = TateAlgebra(R, log_radii=1) T = A.monoid_of_terms() t = T(4*x^2*y^2); t t.valuation()