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): major refactoring and clean-up

class sage.rings.padics.witt_vector.WittVector(parent, vec=None)[source]

Bases: CommutativeRingElement

Base 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)

sage: TestSuite(w).run()
>>> 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)

>>> TestSuite(w).run()
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)
class sage.rings.padics.witt_vector.WittVector_finotti(parent, vec=None)[source]

Bases: WittVector

Child 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: WittVector

Child class for truncated Witt vectors using the phantom algorithm.

Here, a Witt vector with coefficients in \(\mathbb F_q\) (respectively in a polynomial ring over that field), is lifted to another Witt vector with coefficients in \(\mathbb Q_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 \(\mathbb F_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). When True, 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: WittVector

Child class for truncated Witt vectors using the p_invertible algorithm.

EXAMPLES:

sage: W = WittVectorRing(QQ, p=3, prec=3)
sage: t = W.random_element()
sage: t-t
(0, 0, 0)
>>> from sage.all import *
>>> W = WittVectorRing(QQ, p=Integer(3), prec=Integer(3))
>>> t = W.random_element()
>>> t-t
(0, 0, 0)
class sage.rings.padics.witt_vector.WittVector_standard(parent, vec=None)[source]

Bases: WittVector

Child class for truncated Witt vectors using the standard algorithm.

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)