This file contains a common superclass for -adic elements and power series elements.
AUTHORS:
Bases: sage.structure.element.CommutativeRingElement
Returns whether self is an integral element.
INPUT:
OUTPUT:
EXAMPLES:
sage: R = Qp(3,20)
sage: a = R(7/3); a.is_integral()
False
sage: b = R(7/5); b.is_integral()
True
Returns whether self is a unit
INPUT:
OUTPUT:
EXAMPLES:
sage: R = Zp(3,20,'capped-rel'); K = Qp(3,20,'capped-rel')
sage: R(0).is_unit()
False
sage: R(1).is_unit()
True
sage: R(2).is_unit()
True
sage: R(3).is_unit()
False
TESTS:
sage: R(4).is_unit()
True
sage: R(6).is_unit()
False
sage: R(9).is_unit()
False
sage: K(0).is_unit()
False
sage: K(1).is_unit()
True
sage: K(2).is_unit()
True
sage: K(3).is_unit()
False
sage: K(4).is_unit()
True
sage: K(6).is_unit()
False
sage: K(9).is_unit()
False
sage: K(1/3).is_unit()
False
sage: K(1/9).is_unit()
False
Returns the normalized valuation of this local ring element, i.e., the valuation divided by the absolute ramification index.
INPUT:
self – a local ring element.
OUTPUT:
rational – the normalized valuation of self.
EXAMPLES:
sage: Q7 = Qp(7)
sage: R.<x> = Q7[]
sage: F.<z> = Q7.ext(x^3+7*x+7)
sage: z.normalized_valuation()
1/3
Returns the sum of the terms of the series expansion of self, for between and inclusive, and an arbitrary integer. Behaves analogously to the slice function for lists.
INPUT:
TODO: document what “extend” and “all” do
INPUT:
OUTPUT:
EXAMPLES:
sage: R = Zp(13, 10, 'capped-rel', 'series')
sage: a = sqrt(R(-1)); a * a
12 + 12*13 + 12*13^2 + 12*13^3 + 12*13^4 + 12*13^5 + 12*13^6 + 12*13^7 + 12*13^8 + 12*13^9 + O(13^10)
sage: sqrt(R(4))
2 + O(13^10)
sage: sqrt(R(4/9)) * 3
2 + O(13^10)