Witt vectors¶
Implementation of the class WittVector of truncated Witt vectors.
AUTHORS:
Jacob Dennerlein (2022-11-28): initial version
Rubén Muñoz--Bertrand (2025-02-13, 2025-12-23): major refactoring and new features
- class sage.rings.padics.witt_vector.WittVector(parent, vec=None)[source]¶
Bases:
CommutativeRingElementBase class for truncated Witt vectors.
EXAMPLES:
sage: W = WittVectorRing(GF(25), p=5, prec=3) sage: W(12) (2, 1, 3) sage: W = WittVectorRing(Integers(6), p=3, prec=4) sage: w = W([1,2,3,4]) * W([4,5,0,0]) sage: w (4, 1, 3, 4)
>>> from sage.all import * >>> W = WittVectorRing(GF(Integer(25)), p=Integer(5), prec=Integer(3)) >>> W(Integer(12)) (2, 1, 3) >>> W = WittVectorRing(Integers(Integer(6)), p=Integer(3), prec=Integer(4)) >>> w = W([Integer(1),Integer(2),Integer(3),Integer(4)]) * W([Integer(4),Integer(5),Integer(0),Integer(0)]) >>> w (4, 1, 3, 4)
- additive_order()[source]¶
Return the additive order of
self.EXAMPLES:
sage: W = WittVectorRing(Integers(10), p=2, prec=4) sage: w = W([1, 3, 0, 7]) sage: w.additive_order() 80 sage: W = WittVectorRing(ZZ, p=13, prec=3) sage: w = W([0, 7, -3]) sage: w.additive_order() +Infinity
>>> from sage.all import * >>> W = WittVectorRing(Integers(Integer(10)), p=Integer(2), prec=Integer(4)) >>> w = W([Integer(1), Integer(3), Integer(0), Integer(7)]) >>> w.additive_order() 80 >>> W = WittVectorRing(ZZ, p=Integer(13), prec=Integer(3)) >>> w = W([Integer(0), Integer(7), -Integer(3)]) >>> w.additive_order() +Infinity
- coordinates()[source]¶
Return the underlying tuple of the truncated Witt vector.
EXAMPLES:
sage: W = WittVectorRing(GF(7), p=7, prec=3) sage: v = W([1,2,3]) sage: v.coordinates() (1, 2, 3)
>>> from sage.all import * >>> W = WittVectorRing(GF(Integer(7)), p=Integer(7), prec=Integer(3)) >>> v = W([Integer(1),Integer(2),Integer(3)]) >>> v.coordinates() (1, 2, 3)
- is_unit()[source]¶
Return
Trueifselfhas a multiplicative inverse.EXAMPLES:
sage: W = WittVectorRing(GF(11), prec=4) sage: w = W([1,2,10,0]) sage: w.is_unit() True sage: w = W([0,2,10,5]) sage: w.is_unit() False sage: W = WittVectorRing(ZZ, p=7, prec=3) sage: w = W([2,-2,11]) sage: w.is_unit() False sage: w = W([-1,0,0]) sage: w.is_unit() True
>>> from sage.all import * >>> W = WittVectorRing(GF(Integer(11)), prec=Integer(4)) >>> w = W([Integer(1),Integer(2),Integer(10),Integer(0)]) >>> w.is_unit() True >>> w = W([Integer(0),Integer(2),Integer(10),Integer(5)]) >>> w.is_unit() False >>> W = WittVectorRing(ZZ, p=Integer(7), prec=Integer(3)) >>> w = W([Integer(2),-Integer(2),Integer(11)]) >>> w.is_unit() False >>> w = W([-Integer(1),Integer(0),Integer(0)]) >>> w.is_unit() True
- class sage.rings.padics.witt_vector.WittVector_finotti(parent, vec=None)[source]¶
Bases:
WittVectorChild class for truncated Witt vectors using Finotti’s algorithm.
EXAMPLES:
sage: W = WittVectorRing(GF(7), prec=4, algorithm='finotti') sage: 49*W.one() (0, 0, 1, 0)
>>> from sage.all import * >>> W = WittVectorRing(GF(Integer(7)), prec=Integer(4), algorithm='finotti') >>> Integer(49)*W.one() (0, 0, 1, 0)
- class sage.rings.padics.witt_vector.WittVector_phantom(parent, vec=None, phantom=None)[source]¶
Bases:
WittVectorChild class for truncated Witt vectors using the
phantomalgorithm.Here, a Witt vector with coefficients in \(\GF{q}\) (respectively in a polynomial ring over that field), is lifted to another Witt vector with coefficients in \(\QQ_q\) (respectively in the corresponding polynomial ring with coefficients in that field), whose phantom components are stored. Computations are done with these phantom components, and the corresponding Witt vectors in \(\GF{q}\) (respectively in the polynomial ring) are computed from them only when needed.
EXAMPLES:
sage: W = WittVectorRing(GF(7), prec=5) sage: t = W.one() sage: t (1, 0, 0, 0, 0) sage: t.phantom() (1, 1, 1, 1, 1) sage: u = 7*t sage: u.phantom(lift=True) (7, 7, 7, 7, 7) sage: u[1] 1
>>> from sage.all import * >>> W = WittVectorRing(GF(Integer(7)), prec=Integer(5)) >>> t = W.one() >>> t (1, 0, 0, 0, 0) >>> t.phantom() (1, 1, 1, 1, 1) >>> u = Integer(7)*t >>> u.phantom(lift=True) (7, 7, 7, 7, 7) >>> u[Integer(1)] 1
- coordinates()[source]¶
Return the underlying tuple of the truncated Witt vector.
EXAMPLES:
sage: W = WittVectorRing(GF(7), p=7, prec=3) sage: v = W([1,2,3]) sage: v.coordinates() (1, 2, 3)
>>> from sage.all import * >>> W = WittVectorRing(GF(Integer(7)), p=Integer(7), prec=Integer(3)) >>> v = W([Integer(1),Integer(2),Integer(3)]) >>> v.coordinates() (1, 2, 3)
- phantom(lift=False)[source]¶
Return the phantom components of the lift of
self.INPUT:
lift– a Boolean (default:False). WhenTrue, return the phantom components in the lift of the coefficient ring.
EXAMPLES:
sage: W = WittVectorRing(GF(5,'t'), prec=3) sage: t = W([1,1,3]) sage: t.phantom() (1, 1, 1) sage: t.phantom(lift=True) (1, 1 + 5, 1 + 5 + 3*5^2)
>>> from sage.all import * >>> W = WittVectorRing(GF(Integer(5),'t'), prec=Integer(3)) >>> t = W([Integer(1),Integer(1),Integer(3)]) >>> t.phantom() (1, 1, 1) >>> t.phantom(lift=True) (1, 1 + 5, 1 + 5 + 3*5^2)
- class sage.rings.padics.witt_vector.WittVector_pinvertible(parent, vec=None)[source]¶
Bases:
WittVectorChild class for truncated Witt vectors using the
p_invertiblealgorithm.EXAMPLES:
sage: W = WittVectorRing(QQ, p=3, prec=3) sage: w = W.random_element() sage: w - w (0, 0, 0)
>>> from sage.all import * >>> W = WittVectorRing(QQ, p=Integer(3), prec=Integer(3)) >>> w = W.random_element() >>> w - w (0, 0, 0)
- class sage.rings.padics.witt_vector.WittVector_standard(parent, vec=None)[source]¶
Bases:
WittVectorChild class for truncated Witt vectors using the
standardalgorithm.EXAMPLES:
sage: W = WittVectorRing(GF(5), prec=3, algorithm='standard') sage: 5 * W.one() (0, 1, 0)
>>> from sage.all import * >>> W = WittVectorRing(GF(Integer(5)), prec=Integer(3), algorithm='standard') >>> Integer(5) * W.one() (0, 1, 0)