Module: sage.algebras.steenrod_algebra_element
Steenrod algebra elements
Author: - John H. Palmieri (2008-07-30: version 0.9)
This package provides for basic algebra with elements in the mod
Steenrod algebra. In this package, elements in the Steenrod algebra
are represented, by default, using the Milnor basis.
Basic arithmetic,
. To construct an element of the mod 2
Steenrod algebra, use the function Sq:
sage: a = Sq(1,2) sage: b = Sq(4,1) sage: z = a + b sage: z Sq(1,2) + Sq(4,1) sage: Sq(4) * Sq(1,2) Sq(1,1,1) + Sq(2,3) + Sq(5,2) sage: z**2 # non-negative exponents work as they should Sq(1,2,1) + Sq(4,1,1) sage: z**0 Sq(0)
Basic arithmetic,
. To construct an element of the mod
Steenrod algebra when
is odd, you should first define a Steenrod
algebra, using the SteenrodAlgebra command:
sage: SteenrodAlgebra() # 2 is the default prime mod 2 Steenrod algebra sage: A3 = SteenrodAlgebra(3) sage: A3 mod 3 Steenrod algebra
Having done this, the newly created algebra A3 has methods
Q and P which construct elements of A3:
sage: c = A3.Q(1,3,6); c Q_1 Q_3 Q_6 sage: d = A3.P(2,0,1); d P(2,0,1) sage: c * d Q_1 Q_3 Q_6 P(2,0,1) sage: e = A3.P(3) sage: d * e P(5,0,1) sage: e * d P(1,1,1) + P(5,0,1) sage: c * c 0 sage: e ** 3 2 P(1,2)
Note that one can construct an element like c above in one step,
without first constructing the algebra:
sage: c = SteenrodAlgebra(3).Q(1,3,6) sage: c Q_1 Q_3 Q_6
And of course, you can do similar constructions with the mod 2 Steenrod algebra:
sage: A = SteenrodAlgebra(2); A mod 2 Steenrod algebra sage: A.Sq(2,3,5) Sq(2,3,5) sage: A.P(2,3,5) # when p=2, P = Sq Sq(2,3,5) sage: A.Q(1,4) # when p=2, this gives a product of Milnor primitives Sq(0,1,0,0,1)
Regardless of the prime, each element has an excess, and if the
element is homogeneous, a degree. The excess of
Sq
is
; when
is odd, the excess of
is
. The
excess of a linear combination of Milnor basis elements is the minimum
of the excesses of those basis elements.
The degree of
Sq
is
, and
when
is odd, the degree of
is
. The degree of a linear combination of such terms is
only defined if the terms all have the same degree.
Here are some simple examples:
sage: z = Sq(1,2) + Sq(4,1) sage: z.degree() 7 sage: (Sq(0,0,1) + Sq(5,3)).degree() Element is not homogeneous. sage: Sq(7,2,1).excess() 10 sage: z.excess() 3 sage: B = SteenrodAlgebra(3) sage: x = B.Q(1,4) sage: y = B.P(1,2,3) sage: x.degree() 166 sage: x.excess() 2 sage: y.excess() 12
Elements have a weight in the May filtration, which (when
) is
related to the height function defined by Wall:
sage: Sq(2,1,5).may_weight() 9 sage: Sq(2,1,5).wall_height() [2, 3, 2, 1, 1] sage: b = Sq(4)*Sq(8) + Sq(8)*Sq(4) sage: b.may_weight() 2 sage: b.wall_height() [0, 0, 1, 1]
Odd primary May weights:
sage: A5 = SteenrodAlgebra(5) sage: a = A5.Q(1,2,4) sage: b = A5.P(1,2,1) sage: a.may_weight() 10 sage: b.may_weight() 8 sage: (a * b).may_weight() 18 sage: A5.P(0,0,1).may_weight() 3
Since the Steenrod algebra is a Hopf algebra, every element has an antipode.
sage: d = Sq(0,0,1); d Sq(0,0,1) sage: d.antipode() Sq(0,0,1) sage: Sq(4).antipode() Sq(1,1) + Sq(4) sage: (Sq(4) * Sq(2)).antipode() Sq(6) sage: SteenrodAlgebra(7).P(3,1).antipode() 4 P(3,1) + 5 P(11)
Applying the antipode twice returns the original element:
sage: y = Sq(8)*Sq(4) sage: y == (y.antipode()).antipode() True
You can treat elements of the Steenrod algebra like lists of Milnor basis elements:
sage: y = Sq(4) * Sq(1,2); y Sq(1,1,1) + Sq(2,3) + Sq(5,2) sage: for m in y: m Sq(1,1,1) Sq(2,3) Sq(5,2) sage: [(m.degree(),m.excess()) for m in y] [(11, 3), (11, 5), (11, 7)]
Once you've define a Steenrod algebra, the method pst is another
way to define elements of it: pst(s,t) defines the Margolis element
, the basis element
with
in position
:
sage: A2 = SteenrodAlgebra(2) sage: Q2 = A2.pst(0,3) sage: Q2 Sq(0,0,1) sage: Q2*Q2 0 sage: A2.pst(1,2) == Sq(2)*Sq(4) + Sq(4)*Sq(2) True sage: A5 = SteenrodAlgebra(5) sage: A5.pst(2,2) P(0,25)
There are a number of different bases available in which to represent
elements of the Steenrod algebra. When
, the choices are the
Milnor basis ('milnor') or the Serre-Cartan basis ('serre-cartan' or
'adem' or 'admissible'). When
, the choices are those, along
with Wood's Y basis ('wood_y'), Wood's Z basis ('wood_z'), Wall's
basis ('wall' or 'wall_long'), Arnon's A basis ('arnon_a' or
'arnon_a_long'), Arnon's C basis ('arnon_c'), various
bases
('pst_ORDER' for various values of ORDER), and various commutator
bases ('comm_ORDER' or 'comm_ORDER_long' for various values of ORDER).
See documentation for the function steenrod_algebra_basis for
full descriptions of these bases.
To access representations of elements with respect to these different
bases, you can either use the basis method for an element, or define
a Steenrod algebra with respect to a particular basis and then use that:
sage: c = Sq(2) * Sq(1); c
Sq(0,1) + Sq(3)
sage: c.basis('serre-cartan')
Sq^{2} Sq^{1}
sage: c.basis('milnor')
Sq(0,1) + Sq(3)
sage: adem = SteenrodAlgebra(2, 'serre-cartan')
sage: x = Sq(7,3,1) # top class in the subalagebra A(2)
sage: adem(x)
Sq^{17} Sq^{5} Sq^{1}
sage: SteenrodAlgebra(2, 'pst')(x)
P^{0}_{1} P^{0}_{2} P^{1}_{1} P^{0}_{3} P^{1}_{2} P^{2}_{1}
Multiplication works within bases:
sage: adem = SteenrodAlgebra(2, 'adem')
sage: x = adem.Sq(5)
sage: y = adem.Sq(1)
sage: x * y
Sq^{5} Sq^{1}
When multiplying elements defined with respect to different bases, the result is printed in the basis of the left-hand factor:
sage: milnor = SteenrodAlgebra(2, 'milnor')
sage: xm = milnor.Sq(5)
sage: ym = milnor.Sq(1)
sage: xm * ym
Sq(3,1)
sage: xm * y
Sq(3,1)
sage: x * ym
Sq^{5} Sq^{1}
Several of these bases ('arnon_a', 'wall', 'comm') have alternate,
longer, representations. These provide ways of expressing elements of
the Steenrod algebra in terms of the
Sq
.
sage: Sq(6).basis('arnon_a_long')
Sq^{1} Sq^{2} Sq^{1} Sq^{2} + Sq^{2} Sq^{4}
sage: Sq(6).basis('wall_long')
Sq^{2} Sq^{1} Sq^{2} Sq^{1} + Sq^{2} Sq^{4}
sage: SteenrodAlgebra(2,'comm_deg_long')(Sq(6))
s_{1} s_{2} s_{12} + s_{2} s_{4}
**************
INTERNAL DOCUMENTATION:
Here are details on the class SteenrodAlgebraElement (for people who
want to delve into or extend the code):
Attributes for a SteenrodAlgebraElement self:
self._base_field:
, where
is the associated prime
self._prime:
self._basis: basis in which to print this element
self._raw: dictionary. keys are basis names, taken from
_steenrod_basis_unique_names, and the associated values are
dictionaries themselves; if the dictionary is nonempty, it gives
the representation for that element in the given basis. If it is
empty, that means that the representation in that basis hasn't
been computed yet. The representation of an element with respect
to a basis (other than the Milnor basis, which is how elements are
stored internally) isn't computed until requested, either by
calling the method _basis_dictionary('basis_name'), or more
typically, by calling the method basis('basis_name') or by
defining a Steenrod algebra at that basis and applying its call
method to the element.
The dictionaries are defined as follows. In the Milnor basis at
the prime 2, for example, since monomials are of the form
Sq
, then monomials are stored as tuples of
integers (a,b,c,...). Thus if
Sq
Sq
, then y._raw['milnor'] is {(0, 0,
2): 1, (5, 3): 1}. (The 1's following the colons are the
coefficients of the monomials associated to the tuples.) Each
basis has its own representation as a dictionary; Arnon's C basis
represents basis elements as tuples of integers, just like the
Milnor basis and the Serre-Cartan basis, while the other bases
represent basis elements as tuples of pairs of integers. From the
descriptions of the bases given in the file
'steenrod_algebra_bases.py', it should be clear how to associate a
tuple of pairs of integers to a basis element. See also the
function string_rep.
When the element is initially defined by calling Sq or
SteenrodAlgebraElement, typically only the 'milnor' dictionary
is non-empty, while if the element is defined by the function
steenrod_algebra_basis, its dictionary for the given basis is
also initialized correctly. For example:
sage: B = steenrod_algebra_basis(6,'adem'); B
(Sq^{6}, Sq^{5} Sq^{1}, Sq^{4} Sq^{2})
sage: x = B[1]; x
Sq^{5} Sq^{1}
sage: x._raw
{'milnor': {(3, 1): 1}, 'serre-cartan': {(5, 1): 1}}
Note that the keys 'milnor' and 'serre-cartan' (a synonym for 'adem') have nonempty associated values.
When any element is converted to another basis (by changing the basis and then printing the element), its dictionary for that basis gets stored, as well:
sage: x.basis('arnona')
X^{0}_{0} X^{1}_{0} X^{1}_{1}
sage: x._raw
{'arnona': {((0, 0), (1, 0), (1, 1)): 1},
'milnor': {(3, 1): 1},
'serre-cartan': {(5, 1): 1}}
Methods for a SteenrodAlgebraElement self:
Most of these are self-explanatory.
_mul_: multiply two elements. This is done using Milnor
multiplication, the code for which is in a separate file,
'steenrod_milnor_multiplication'. In a long computation, it seems
that a lot of time is spent here, so one way to speed things up
would be to optimize the Milnor multiplication routine.
_basis_dictionary: compute the dictionary of the element
with respect to the given basis. This is basically done by doing
a basis conversion from the Milnor basis to the given basis.
There are two parts to this function; first, some elements (e.g.,
Sq
) may be easy to convert directly. This is done
one basis at a time, and so takes up most of the lines of code.
If the element is not recognizable as being easy to convert, then
the function milnor_convert from the file
'steenrod_algebra_bases.py' is called. This does linear algebra:
it computes the Milnor basis and the new basis in the appropriate
dimension, computes the change-of-basis matrix, etc.
basis: display the element in the given basis.
milnor: display the element in the Milnor basis.
serre_cartan: display the element in the Serre-Cartan basis.
adem: display the element in the Serre-Cartan basis.
_repr_ and _latex_ call the function
string_rep, which has cases depending on the basis.
REFERENCES:
[Mil] J. W. Milnor, "The Steenrod algebra and its dual," Ann. of Math. (2) 67 (1958), 150-171.
[Mon] K. G. Monks, "Change of basis, monomial relations, and
bases for the Steenrod algebra," J. Pure Appl. Algebra 125 (1998),
no. 1-3, 235-260.
[Woo] R. M. W. Wood, "Problems in the Steenrod algebra," Bull. London Math. Soc. 30 (1998), no. 5, 449-517.
Module-level Functions
| ) |
Milnor element Sq(a,b,c,...).
Input:
This returns the Milnor basis element
.
sage: Sq(5) Sq(5) sage: Sq(5) + Sq(2,1) + Sq(5) # addition is mod 2: Sq(2,1) sage: (Sq(4,3) + Sq(7,2)).degree() 13
Entries must be non-negative integers; otherwise, an error results.
This function is a good way to define elements of the Steenrod algebra.
| x) |
Serre-Cartan representation of x.
Input:
sage: from sage.algebras.steenrod_algebra_element import serre_cartan
sage: x = Sq(3,2); x
Sq(3,2)
sage: serre_cartan(x)
Sq^{7} Sq^{2}
| x) |
Serre-Cartan representation of x.
Input:
sage: from sage.algebras.steenrod_algebra_element import serre_cartan
sage: x = Sq(3,2); x
Sq(3,2)
sage: serre_cartan(x)
Sq^{7} Sq^{2}
| mono, [latex=False], [p=2]) |
Alternate string representation of element of Arnon's A basis.
This is used by the _repr_ and _latex_ methods.
Input:
sage: from sage.algebras.steenrod_algebra_element import arnonA_long_mono_to_string
sage: arnonA_long_mono_to_string(((1,2),(3,0)))
'Sq^{8} Sq^{4} Sq^{2} Sq^{1}'
sage: arnonA_long_mono_to_string(((1,2),(3,0)),latex=True)
'\text{Sq}^{8} \text{Sq}^{4} \text{Sq}^{2} \text{Sq}^{1}'
The empty tuple represents the unit element Sq(0):
sage: arnonA_long_mono_to_string(()) 'Sq(0)'
| mono, [latex=False], [p=2]) |
String representation of element of Arnon's A basis.
This is used by the _repr_ and _latex_ methods.
Input:
sage: from sage.algebras.steenrod_algebra_element import arnonA_mono_to_string
sage: arnonA_mono_to_string(((1,2),(3,0)))
'X^{1}_{2} X^{3}_{0}'
sage: arnonA_mono_to_string(((1,2),(3,0)),latex=True)
'X^{1}_{2} X^{3}_{0}'
The empty tuple represents the unit element Sq(0):
sage: arnonA_mono_to_string(()) 'Sq(0)'
| n, p) |
Return list of digits in the base p expansion of n.
Input:
sage: sage.algebras.steenrod_algebra_element.base_p_expansion(10,2) [0, 1, 0, 1] sage: sage.algebras.steenrod_algebra_element.base_p_expansion(10,3) [1, 0, 1] sage: sage.algebras.steenrod_algebra_element.base_p_expansion(10,5) [0, 2] sage: sage.algebras.steenrod_algebra_element.base_p_expansion(10,7) [3, 1] sage: sage.algebras.steenrod_algebra_element.base_p_expansion(0,7) [] sage: sage.algebras.steenrod_algebra_element.base_p_expansion(100000,13) [4, 9, 6, 6, 3]
| nums) |
Check that list or tuple consists of non-negative integers, and strip trailing zeroes.
Input:
If nums contains anything other than a non-negative integer, raise an exception, identifying the right-most problematic entry. Otherwise, return a new list or tuple, obtained from nums by omitting any zeroes from the end.
sage: from sage.algebras.steenrod_algebra_element import check_and_trim sage: check_and_trim([3,4,1]) [3, 4, 1] sage: a=[3,2,1,0,0] sage: check_and_trim(a) [3, 2, 1] sage: a # check_and_trim doesn't affect its input [3, 2, 1, 0, 0] sage: check_and_trim([0]*127) [] sage: check_and_trim((1,2,3,4,0,0,0)) # works on tuples, too (1, 2, 3, 4)
| mono, [latex=False], [p=2]) |
Alternate string representation of element of a commutator basis.
Okay in low dimensions, but gets unwieldy as the dimension increases.
Input:
sage: from sage.algebras.steenrod_algebra_element import comm_long_mono_to_string
sage: comm_long_mono_to_string(((1,2),(0,3)))
's_{24} s_{124}'
sage: comm_long_mono_to_string(((1,2),(0,3)),latex=True)
's_{24} s_{124}'
The empty tuple represents the unit element Sq(0):
sage: comm_long_mono_to_string(()) 'Sq(0)'
| mono, [latex=False], [p=2]) |
String representation of element of a commutator basis.
This is used by the _repr_ and _latex_ methods.
Input:
sage: from sage.algebras.steenrod_algebra_element import comm_mono_to_string
sage: comm_mono_to_string(((1,2),(0,3)))
'c_{1,2} c_{0,3}'
sage: comm_mono_to_string(((1,2),(0,3)),latex=True)
'c_{1,2} c_{0,3}'
The empty tuple represents the unit element Sq(0):
sage: comm_mono_to_string(()) 'Sq(0)'
| m) |
Convert tuple m of non-negative integers to a permutation in one-line form.
Input:
If m=(3,7,4), then one can view m as representing the permutation of the set 3,4,7 sending 3 to 3, 4 to 7, and 7 to 4. This function converts m to the list [1,3,2], which represents essentially the same permutation, but of the set 1,2,3. This list can then be passed to Permutation, and its signature can be computed.
sage: sage.algebras.steenrod_algebra_element.convert_perm((3,7,4)) [1, 3, 2] sage: sage.algebras.steenrod_algebra_element.convert_perm((5,0,6,3)) [2, 4, 1, 3]
| x) |
Degree of x.
Input:
The degree of
Sq
is
.
When
is odd, the degree of
is
.
The degree of a sum is undefined (and this function returns None), unless each summand has the same degree: that is, unless the element is homogeneous.
sage: from sage.algebras.steenrod_algebra_element import degree sage: a = Sq(1,2,1) sage: degree(a) 14 sage: degree(Sq(3) + Sq(5,1)) Element is not homogeneous. sage: B = SteenrodAlgebra(3) sage: x = B.Q(1,4) sage: y = B.P(1,2,3) sage: degree(x) 166 sage: degree(y) 192
| x) |
Excess of x.
Input:
The excess of
Sq
is
.
When
is odd, the excess of
is
.
The excess of a linear combination of Milnor basis elements is the minimum of the excesses of those basis elements.
sage: from sage.algebras.steenrod_algebra_element import excess sage: a = Sq(1,2,3) sage: excess(a) 6 sage: excess(Sq(0,0,1) + Sq(4,1) + Sq(7)) 1 sage: [excess(m) for m in (Sq(0,0,1) + Sq(4,1) + Sq(7))] [1, 5, 7] sage: B = SteenrodAlgebra(7) sage: a = B.Q(1,2,5) sage: b = B.P(2,2,3) sage: excess(a) 3 sage: excess(b) 14 sage: excess(a + b) 3 sage: excess(a * b) 17
| n) |
Largest integer k so that
Input:
This returns the integer
so that
and
.
sage: sage.algebras.steenrod_algebra_element.integer_base_2_log(7) 2 sage: sage.algebras.steenrod_algebra_element.integer_base_2_log(8) 3 sage: sage.algebras.steenrod_algebra_element.integer_base_2_log(9) 3
| x) |
Milnor representation of x.
Input:
sage: from sage.algebras.steenrod_algebra_element import milnor
sage: x = Sq(5) * Sq(2) * Sq(1); x.adem()
Sq^{5} Sq^{2} Sq^{1}
sage: milnor(x)
Sq(1,0,1) + Sq(5,1)
| mono, [latex=False], [p=2]) |
String representation of element of the Milnor basis.
This is used by the _repr_ and _latex_ methods.
Input:
This returns a string like 'Sq(a,b,c,...)' when p=2, or a string like 'Q_e0 Q_e1 Q_e2 ... P(r1, r2, ...)' when p is odd.
sage: from sage.algebras.steenrod_algebra_element import milnor_mono_to_string
sage: milnor_mono_to_string((1,2,3,4))
'Sq(1,2,3,4)'
sage: milnor_mono_to_string((1,2,3,4),latex=True)
'\text{Sq}(1,2,3,4)'
sage: milnor_mono_to_string(((1,0), (2,3,1)), p=3)
'Q_1 Q_0 P(2,3,1)'
sage: milnor_mono_to_string(((1,0), (2,3,1)), latex=True, p=3)
'Q_{1} Q_{0} \mathcal{P}(2,3,1)'
The empty tuple represents the unit element Sq(0) (or P(0) at an odd prime):
sage: milnor_mono_to_string(()) 'Sq(0)' sage: milnor_mono_to_string((), p=5) 'P(0)'
| s, t, [p=2]) |
The Margolis element
.
Input:
This returns the Margolis element
of the mod p Steenrod
algebra: the element equal to
, where
the
is in position
.
sage: from sage.algebras.steenrod_algebra_element import pst sage: pst(3,5) Sq(0,0,0,0,8) sage: pst(1,2) + Sq(4)*Sq(2) + Sq(2)*Sq(4) 0 sage: pst(3,5,5) P(0,0,0,0,125) sage: pst(3,5,p=5) P(0,0,0,0,125)
| mono, [latex=False], [p=2]) |
String representation of element of a
-basis.
This is used by the _repr_ and _latex_ methods.
Input:
sage: from sage.algebras.steenrod_algebra_element import pst_mono_to_string
sage: pst_mono_to_string(((1,2),(0,3)))
'P^{1}_{2} P^{0}_{3}'
sage: pst_mono_to_string(((1,2),(0,3)),latex=True)
'P^{1}_{2} P^{0}_{3}'
The empty tuple represents the unit element Sq(0):
sage: pst_mono_to_string(()) 'Sq(0)'
| x) |
Serre-Cartan representation of x.
Input:
sage: from sage.algebras.steenrod_algebra_element import serre_cartan
sage: x = Sq(3,2); x
Sq(3,2)
sage: serre_cartan(x)
Sq^{7} Sq^{2}
| mono, [latex=False], [p=2]) |
String representation of element of the Serre-Cartan basis.
This is used by the _repr_ and _latex_ methods.
Input:
This returns a string like '
when
,
or a string like
when
is odd.
sage: from sage.algebras.steenrod_algebra_element import serre_cartan_mono_to_string
sage: serre_cartan_mono_to_string((1,2,3,4))
'Sq^{1} Sq^{2} Sq^{3} Sq^{4}'
sage: serre_cartan_mono_to_string((1,2,3,4),latex=True)
'\\text{Sq}^{1} \\text{Sq}^{2} \\text{Sq}^{3} \\text{Sq}^{4}'
sage: serre_cartan_mono_to_string((0,5,1,1,0), p=3)
'P^{5} beta P^{1}'
sage: serre_cartan_mono_to_string((0,5,1,1,0), p=3, latex=True)
'\\mathcal{P}^{5} \\beta \\mathcal{P}^{1}'
The empty tuple represents the unit element
(or
at an odd prime):
sage: serre_cartan_mono_to_string(())
'Sq^{0}'
sage: serre_cartan_mono_to_string((), p=7)
'P^{0}'
| element, [latex=False], [sort=True]) |
String representation of element.
Input:
If latex is True, output a string suitable for LaTeX; otherwise, output a plain string. If sort is True, sort element left lexicographically; otherwise, no sorting is done, and so the order in which the summands are printed may be unpredictable.
sage: from sage.algebras.steenrod_algebra_element import string_rep
sage: a = Sq(0,0,2)
sage: A = SteenrodAlgebra(2, 'admissible')
sage: string_rep(A(a))
'Sq^{8} Sq^{4} Sq^{2} + Sq^{9} Sq^{4} Sq^{1} + Sq^{10} Sq^{3} Sq^{1} +
Sq^{10} Sq^{4} + Sq^{11} Sq^{2} Sq^{1} + Sq^{12} Sq^{2} + Sq^{13} Sq^{1}
+ Sq^{14}'
sage: b = Sq(0,2)
sage: string_rep(A(b),latex=True)
'\text{Sq}^{4} \text{Sq}^{2} + \text{Sq}^{5} \text{Sq}^{1} +
\text{Sq}^{6}'
sage: A_wood_z = SteenrodAlgebra(2, 'woodz')
sage: string_rep(A_wood_z(a))
'Sq^{6} Sq^{7} Sq^{1} + Sq^{14} + Sq^{4} Sq^{7} Sq^{3} + Sq^{4} Sq^{7}
Sq^{2} Sq^{1} + Sq^{12} Sq^{2} + Sq^{8} Sq^{6} + Sq^{8} Sq^{4} Sq^{2}'
sage: string_rep(SteenrodAlgebra(2, 'arnonc')(a), sort=False)
'Sq^{4} Sq^{4} Sq^{6} + Sq^{6} Sq^{8} + Sq^{4} Sq^{2} Sq^{8} + Sq^{4}
Sq^{6} Sq^{4} + Sq^{8} Sq^{4} Sq^{2} + Sq^{8} Sq^{6}'
sage: string_rep(SteenrodAlgebra(2, 'arnonc')(a))
'Sq^{4} Sq^{2} Sq^{8} + Sq^{4} Sq^{4} Sq^{6} + Sq^{4} Sq^{6} Sq^{4} +
Sq^{6} Sq^{8} + Sq^{8} Sq^{4} Sq^{2} + Sq^{8} Sq^{6}'
sage: string_rep(SteenrodAlgebra(2, 'pst_llex')(a))
'P^{1}_{3}'
sage: Ac = SteenrodAlgebra(2, 'comm_revz')
sage: string_rep(Ac(a),latex=True,sort=False)
'c_{0,2} c_{0,3} c_{2,1} + c_{1,3} + c_{0,1} c_{1,1} c_{0,3} c_{2,1}'
sage: string_rep(Ac(a),latex=True)
'c_{0,1} c_{1,1} c_{0,3} c_{2,1} + c_{0,2} c_{0,3} c_{2,1} + c_{1,3}'
sage: string_rep(a)
'Sq(0,0,2)'
sage: string_rep(a,latex=True)
'\text{Sq}(0,0,2)'
Some odd primary examples:
sage: A5 = SteenrodAlgebra(5)
sage: a = A5.P(5,1); b = A5.Q(0,1,3)
sage: string_rep(b)
'Q_0 Q_1 Q_3'
sage: string_rep(a, latex=True)
'\mathcal{P}(5,1)'
sage: A5sc = SteenrodAlgebra(5, 'serre-cartan')
sage: string_rep(A5sc(a))
'P^{10} P^{1} + 4 P^{11}'
| mono, [latex=False], [p=2]) |
Alternate string representation of element of Wall's basis.
This is used by the _repr_ and _latex_ methods.
Input:
sage: from sage.algebras.steenrod_algebra_element import wall_long_mono_to_string
sage: wall_long_mono_to_string(((1,2),(3,0)))
'Sq^{1} Sq^{2} Sq^{4} Sq^{8}'
sage: wall_long_mono_to_string(((1,2),(3,0)),latex=True)
'\text{Sq}^{1} \text{Sq}^{2} \text{Sq}^{4} \text{Sq}^{8}'
The empty tuple represents the unit element Sq(0):
sage: wall_long_mono_to_string(()) 'Sq(0)'
| mono, [latex=False], [p=2]) |
String representation of element of Wall's basis.
This is used by the _repr_ and _latex_ methods.
Input:
sage: from sage.algebras.steenrod_algebra_element import wall_mono_to_string
sage: wall_mono_to_string(((1,2),(3,0)))
'Q^{1}_{2} Q^{3}_{0}'
sage: wall_mono_to_string(((1,2),(3,0)),latex=True)
'Q^{1}_{2} Q^{3}_{0}'
The empty tuple represents the unit element Sq(0):
sage: wall_mono_to_string(()) 'Sq(0)'
| mono, [latex=False], [p=2]) |
String representation of element of Wood's Y and Z bases.
This is used by the _repr_ and _latex_ methods.
Input:
sage: from sage.algebras.steenrod_algebra_element import wood_mono_to_string
sage: wood_mono_to_string(((1,2),(3,0)))
'Sq^{14} Sq^{8}'
sage: wood_mono_to_string(((1,2),(3,0)),latex=True)
'\text{Sq}^{14} \text{Sq}^{8}'
The empty tuple represents the unit element Sq(0):
sage: wood_mono_to_string(()) 'Sq(0)'
Class: SteenrodAlgebraElement
At the prime 2, use the function 'Sq' to define these, as in 'w=Sq(4,3,3)' or 'z=Sq(1,2)+Sq(4,1)' or 'q=Sq(8)*Sq(4) + Sq(12)'.
At odd primes, use the methods 'P' and 'Q' to define these, as in 'w=SteenrodAlgebra(3).Q(1,5) * SteenrodAlgebra(3).P(4,3)'.
sage: w = Sq(4,3,3) sage: w Sq(4,3,3)
The function 'Sq', together with addition, provides an easy way to
define elements when
:
sage: b = Sq(3) + Sq(0,1) sage: b Sq(0,1) + Sq(3)
When
is odd, first define a Steenrod algebra to specify the
prime, and then use the methods 'P' and 'Q', together with
multiplication and addition:
sage: A7 = SteenrodAlgebra(7) sage: u = A7.Q(0,4); u Q_0 Q_4 sage: v = A7.P(1,2,3); v P(1,2,3) sage: u * v Q_0 Q_4 P(1,2,3) sage: 10 * u * v 3 Q_0 Q_4 P(1,2,3) sage: u + v P(1,2,3) + Q_0 Q_4
| self, poly, [p=2], [basis=milnor]) |
Input:
At odd primes, the monomials are pairs of tuples: they are
of the form ((e0, e1, e2, ...), (r1, r2, ...)),
corresponding to the element
.
Alternatively, poly can be an integer n, in which case it is viewed as being in the field GF(p): the resulting element is n * Sq(0).
sage: from sage.algebras.steenrod_algebra_element import SteenrodAlgebraElement
sage: SteenrodAlgebraElement({(1,2,3): 1}, 2)
Sq(1,2,3)
sage: SteenrodAlgebraElement({(1,2,3): 4}, 2)
0
sage: SteenrodAlgebraElement({((0,3), (1,2)): 5}, 7)
5 Q_0 Q_3 P(1,2)
sage: SteenrodAlgebraElement({((0,3), (1,2)): 5}, p=7)
5 Q_0 Q_3 P(1,2)
The input can also be an integer, in which case it is treated as a multiple, mod p, of the unit element P(0) (a.k.a. Sq(0) at the prime 2):
sage: SteenrodAlgebraElement(3,2) Sq(0) sage: SteenrodAlgebraElement(6) # p=2 is the default prime 0 sage: SteenrodAlgebraElement(6, p=5) P(0)
Functions: additive_order,
adem,
antipode,
basis,
degree,
excess,
is_decomposable,
is_nilpotent,
is_unit,
may_weight,
milnor,
serre_cartan,
wall_height
| self) |
The additive order of any element of the mod p Steenrod algebra is p.
Output:
sage: z = Sq(4) + Sq(6) + Sq(0) sage: z.additive_order() 2
| self) |
Serre-Cartan representation of self.
Output: Serre-Cartan representation of self.
sage: x = Sq(0,1); x
Sq(0,1)
sage: x.serre_cartan()
Sq^{2} Sq^{1} + Sq^{3}
sage: x.adem() # 'adem' is a synomym for 'serre_cartan'
Sq^{2} Sq^{1} + Sq^{3}
| self) |
Antipode of element.
Output:
Algorithm: according to a result of Milnor's, the antipode of
Sq
is the sum of all of the Milnor basis elements
in dimension
. So: convert the element to the Serre-Cartan
basis and use this formula for the antipode of
Sq
,
together with the fact that the antipode is an
antihomomorphism: if we call the antipode
, then
.
At odd primes, a similar method is used: the antipode of
is the sum of the Milnor basis elements in
dimension
, and the antipode of
is
. So convert to the Serre-Cartan basis, as in the
case.
sage: d = Sq(0,0,1); d Sq(0,0,1) sage: d.antipode() Sq(0,0,1) sage: Sq(4).antipode() Sq(1,1) + Sq(4) sage: (Sq(4) * Sq(2)).antipode() Sq(6) sage: A3 = SteenrodAlgebra(3) sage: A3.P(2).antipode() P(2) sage: A3.P(2,1).antipode() 2 P(2,1) sage: a = SteenrodAlgebra(7).P(3,1) sage: a.antipode() 4 P(3,1) + 5 P(11)
Applying the antipode twice returns the original element:
sage: y = Sq(8)*Sq(4) sage: y == (y.antipode()).antipode() True
| self, basis) |
Representation of element with respect to basis.
Input:
The choices for basis are:
* 'milnor' for the Milnor basis.
* 'serre-cartan', 'serre_cartan', 'sc', 'adem', 'admissible' for the Serre-Cartan basis.
* 'wood_y' for Wood's Y basis.
* 'wood_z' for Wood's Z basis.
* 'wall' for Wall's basis.
* 'wall_long' for Wall's basis, alternate representation
* 'arnon_a' for Arnon's A basis.
* 'arnon_a_long' for Arnon's A basis, alternate representation.
* 'arnon_c' for Arnon's C basis.
* 'pst', 'pst_rlex', 'pst_llex', 'pst_deg', 'pst_revz' for various
-bases.
* 'comm', 'comm_rlex', 'comm_llex', 'comm_deg', 'comm_revz' for various commutator bases.
* 'comm_long', 'comm_rlex_long', etc., for commutator bases, alternate representations.
See documentation for the function 'steenrod_algebra_basis' for descriptions of the different bases.
sage: c = Sq(2) * Sq(1)
sage: c.basis('milnor')
Sq(0,1) + Sq(3)
sage: c.basis('serre-cartan')
Sq^{2} Sq^{1}
sage: d = Sq(0,0,1)
sage: d.basis('arnonc')
Sq^{2} Sq^{5} + Sq^{4} Sq^{2} Sq^{1} + Sq^{4} Sq^{3} + Sq^{7}
| self) |
Degree of element.
Output:
The degree of
Sq
is
.
When
is odd, the degree of
is
.
The degree of a sum is undefined (and this returns 'None'), unless each summand has the same degree: that is, unless the element is homogeneous.
sage: a = Sq(1,2,1) sage: a.degree() 14 sage: for a in Sq(3) + Sq(5,1): a.degree() 3 8 sage: (Sq(3) + Sq(5,1)).degree() Element is not homogeneous. sage: B = SteenrodAlgebra(3) sage: x = B.Q(1,4) sage: y = B.P(1,2,3) sage: x.degree() 166 sage: y.degree() 192
| self) |
Excess of element.
Output:
The excess of
Sq
is
.
When
is odd, the excess of
is
.
The excess of a linear combination of Milnor basis elements is the minimum of the excesses of those basis elements.
See [Kra] for the proofs of these assertions.
sage: a = Sq(1,2,3) sage: a.excess() 6 sage: (Sq(0,0,1) + Sq(4,1) + Sq(7)).excess() 1 sage: [m.excess() for m in (Sq(0,0,1) + Sq(4,1) + Sq(7))] [1, 5, 7] sage: [m for m in (Sq(0,0,1) + Sq(4,1) + Sq(7))] [Sq(0,0,1), Sq(4,1), Sq(7)] sage: B = SteenrodAlgebra(7) sage: a = B.Q(1,2,5) sage: b = B.P(2,2,3) sage: a.excess() 3 sage: b.excess() 14 sage: (a + b).excess() 3 sage: (a * b).excess() 17
REFERENCES:
[Kra] D. Kraines, "On excess in the Milnor basis," Bull. London Math. Soc. 3 (1971), 363-365.
| self) |
return True if element is decomposable, False otherwise.
Output:
That is, if element is in the square of the augmentation ideal, return True; otherwise, return False.
sage: a = Sq(6) sage: a.is_decomposable() True sage: for i in range(9): ... if not Sq(i).is_decomposable(): ... print Sq(i) Sq(0) Sq(1) Sq(2) Sq(4) Sq(8)
| self) |
True if element is not a unit, False otherwise.
sage: z = Sq(4,2) + Sq(7,1) + Sq(3,0,1) sage: z.is_nilpotent() True sage: u = 1 + Sq(3,1) sage: u == Sq(0) + Sq(3,1) True sage: u.is_nilpotent() False
| self) |
True if element has a nonzero scalar multiple of P(0) as a summand, False otherwise.
sage: z = Sq(4,2) + Sq(7,1) + Sq(3,0,1) sage: z.is_unit() False sage: u = 1 + Sq(3,1) sage: u == Sq(0) + Sq(3,1) True sage: u.is_unit() True sage: A5 = SteenrodAlgebra(5) sage: v = A5.P(0) sage: (v + v + v).is_unit() True
| self) |
May's 'weight' of element.
Output:
If we let
be the May filtration of the Steenrod
algebra, the weight of an element
is the integer
so
that
is in
and not in
. According to
Theorem 2.6 in May's thesis [May], the weight of a Milnor
basis element is computed as follows: first, to compute the
weight of
, write each
in base
as
. Then each nonzero binary
digit
contributes
to the weight: the weight is
. When
is odd, the weight of
is
, so the weight of a product
is
equal
. Then the weight of
is the sum of
and
.
The weight of a sum of basis elements is the minimum of the weights of the summands.
When
, we compute the weight on Milnor basis elements by
adding up the terms in their 'height' - see the method
'wall_height' for documentation. (When
is odd, the height
of an element is not defined.)
sage: Sq(0).may_weight() 0 sage: a = Sq(4) sage: a.may_weight() 1 sage: b = Sq(4)*Sq(8) + Sq(8)*Sq(4) sage: b.may_weight() 2 sage: Sq(2,1,5).wall_height() [2, 3, 2, 1, 1] sage: Sq(2,1,5).may_weight() 9 sage: A5 = SteenrodAlgebra(5) sage: a = A5.Q(1,2,4) sage: b = A5.P(1,2,1) sage: a.may_weight() 10 sage: b.may_weight() 8 sage: (a * b).may_weight() 18 sage: A5.P(0,0,1).may_weight() 3
REFERENCES:
[May]: J. P. May, "The cohomology of restricted Lie algebras and of Hopf algebras; application to the Steenrod algebra." Thesis, Princeton Univ., 1964.
| self) |
Milnor representation of self.
Output: Milnor representation of self.
sage: A = SteenrodAlgebra(2, 'adem')
sage: x = A (Sq(5) * Sq(2) * Sq(1)); x
Sq^{5} Sq^{2} Sq^{1}
sage: x.milnor()
Sq(1,0,1) + Sq(5,1)
| self) |
Serre-Cartan representation of self.
Output: Serre-Cartan representation of self.
sage: x = Sq(0,1); x
Sq(0,1)
sage: x.serre_cartan()
Sq^{2} Sq^{1} + Sq^{3}
sage: x.adem() # 'adem' is a synomym for 'serre_cartan'
Sq^{2} Sq^{1} + Sq^{3}
| self) |
Wall's 'height' of element.
Output:
The height of an element of the mod 2 Steenrod algebra is a
list of non-negative integers, defined as follows: if the
element is a monomial in the generators
Sq
, then
the
th entry in the list is the number of times
Sq
appears. For an arbitrary element, write it
as a sum of such monomials; then its height is the maximum,
ordered right-lexicographically, of the heights of those
monomials.
When
is odd, the height of an element is not defined.
According to Theorem 3 in [Wall], the height of the Milnor
basis element
Sq
is obtained as
follows: write each
in binary as
.
Then each nonzero binary digit
contributes 1 to the
th entry in the height, for
.
sage: Sq(0).wall_height() [] sage: a = Sq(4) sage: a.wall_height() [0, 0, 1] sage: b = Sq(4)*Sq(8) + Sq(8)*Sq(4) sage: b.wall_height() [0, 0, 1, 1] sage: Sq(0,0,3).wall_height() [1, 2, 2, 1]
REFERENCES:
[Wall]: C. T. C. Wall, "Generators and relations for the Steenrod algebra," Ann. of Math. (2) 72 (1960), 429-444.
Special Functions: __cmp__,
__init__,
__iter__,
_add_,
_basis_dictionary,
_latex_,
_mul_,
_neg_,
_repr_,
_sub_
| self, other) |
Two elements are equal iff their difference is zero.
sage: A5 = SteenrodAlgebra(5) sage: cmp(A5.P(0,1), A5.P(0,2)) -1 sage: cmp(A5.P(0,1), A5.pst(0,2)) 0
| self) |
Iterator for looping through summands in an element of the Steenrod algebra.
sage: z = Sq(0,0,1) + Sq(4,1) + Sq(7) sage: [m for m in z] [Sq(0,0,1), Sq(4,1), Sq(7)] sage: [m.excess() for m in z] [1, 5, 7] sage: for m in z: m * Sq(2) Sq(2,0,1) Sq(0,3) + Sq(6,1) Sq(3,2) sage: a = SteenrodAlgebra(5).P(5,5) sage: a * a P(3,6,1) + 2 P(4,11) + P(9,5,1) + 4 P(10,10) sage: for m in a * a: m P(3,6,1) 2 P(4,11) P(9,5,1) 4 P(10,10)
This loops through the summands in the Milnor basis representation of the element. The element w defined below is a single monomial in the Serre-Cartan basis, but a sum of four monomials in the Milnor basis:
sage: w = Sq(4) * Sq(2) * Sq(1)
sage: A = SteenrodAlgebra(2, 'adem')
sage: w = A(Sq(4) * Sq(2) * Sq(1)); w
Sq^{4} Sq^{2} Sq^{1}
sage: for m in w: m.basis('adem')
Sq^{4} Sq^{2} Sq^{1} + Sq^{5} Sq^{2} + Sq^{6} Sq^{1} + Sq^{7}
Sq^{5} Sq^{2} + Sq^{7}
Sq^{6} Sq^{1} + Sq^{7}
Sq^{7}
sage: w.milnor()
Sq(0,0,1) + Sq(1,2) + Sq(4,1) + Sq(7)
sage: for m in w: m
Sq(0,0,1)
Sq(1,2)
Sq(4,1)
Sq(7)
| self, other) |
Addition for elements of the Steenrod algebra.
sage: a = Sq(3,1) + Sq(6) sage: b = Sq(0,2) sage: c = Sq(6) + Sq(0,2) sage: a + b Sq(0,2) + Sq(3,1) + Sq(6) sage: b + c Sq(6) sage: A7 = SteenrodAlgebra(7) sage: x = A7.P(1,2); y = A7.Q(3,4) * A7.P(1,2) sage: x + 3 * y P(1,2) + 3 Q_3 Q_4 P(1,2) sage: x + 10 * y P(1,2) + 3 Q_3 Q_4 P(1,2)
| self, basis) |
Dictionary of terms of the form (mono: coeff), where mono is a monomial in the given basis.
Input:
sage: c = Sq(2) * Sq(1)
sage: c._basis_dictionary('milnor')
{(0, 1): 1, (3,): 1}
sage: c
Sq(0,1) + Sq(3)
sage: c._basis_dictionary('serre-cartan')
{(2, 1): 1}
sage: c.basis('serre-cartan')
Sq^{2} Sq^{1}
sage: d = Sq(0,0,1)
sage: d._basis_dictionary('arnonc')
{(7,): 1, (2, 5): 1, (4, 3): 1, (4, 2, 1): 1}
sage: d.basis('arnonc')
Sq^{2} Sq^{5} + Sq^{4} Sq^{2} Sq^{1} + Sq^{4} Sq^{3} + Sq^{7}
At odd primes:
sage: e = 2 * SteenrodAlgebra(3).P(1,2)
sage: e._basis_dictionary('milnor')
{((), (1, 2)): 2}
sage: e
2 P(1,2)
sage: e._basis_dictionary('serre-cartan')
{(0, 7, 0, 2, 0): 2, (0, 8, 0, 1, 0): 2}
sage: e.basis('adem')
2 P^{7} P^{2} + 2 P^{8} P^{1}
Implementation: to compute this, take the Milnor representation and change bases. Store the result in self._raw[basis], for later use; this way, an element only needs to be converted once.
| self) |
LaTeX representation of element.
Output: string
The string depends on the basis over which the element is defined.
For any element x in the Steenrod algebra, use 'view(x)' to see the typeset LaTeX representation.
sage: A7 = SteenrodAlgebra(7)
sage: x = A7.Q(0,3) * A7.P(2,2)
sage: x._latex_()
'Q_{0} Q_{3} \mathcal{P}(2,2)'
sage: latex(x)
Q_{0} Q_{3} \mathcal{P}(2,2)
sage: b = Sq(0,2)
sage: b.basis('adem')._latex_()
'\text{Sq}^{4} \text{Sq}^{2} + \text{Sq}^{5} \text{Sq}^{1} +
\text{Sq}^{6}'
sage: b.basis('woody')._latex_()
'\text{Sq}^{2} \text{Sq}^{3} \text{Sq}^{1} + \text{Sq}^{6} +
\text{Sq}^{4} \text{Sq}^{2}'
sage: SteenrodAlgebra(2, 'arnona')(b)._latex_()
'X^{1}_{1} X^{2}_{2} + X^{2}_{1}'
| self, other) |
Multiplication for elements of the Steenrod algebra.
sage: Sq(2) * Sq(1) Sq(0,1) + Sq(3) sage: Sq(0) * (Sq(6,2) + Sq(9,1)) Sq(6,2) + Sq(9,1) sage: 1 * (Sq(6,2) + Sq(9,1)) Sq(6,2) + Sq(9,1) sage: 4 * (Sq(6,2) + Sq(9,1)) 0 sage: A5 = SteenrodAlgebra(5) sage: A5.P(5) * A5.P(1,2) 3 P(0,3) + P(6,2) sage: A5.Q(1,2,3) * A5.Q(0,5) 4 Q_0 Q_1 Q_2 Q_3 Q_5 sage: A5.Q(1,2,3) * A5.Q(0,3) 0
| self) |
Multiply every coefficient by the element -1 of the base field.
sage: a = Sq(4,2) + Sq(5) sage: -a Sq(4,2) + Sq(5) sage: A5 = SteenrodAlgebra(5) sage: b = 2 * A5.P(2,0,1) sage: b 2 P(2,0,1) sage: -b 3 P(2,0,1)
| self) |
String representation of element.
Output: string
The string depends on the basis over which the element is defined.
sage: A7 = SteenrodAlgebra(7)
sage: x = A7.Q(0,3) * A7.P(2,2)
sage: x._repr_()
'Q_0 Q_3 P(2,2)'
sage: x
Q_0 Q_3 P(2,2)
sage: a = Sq(0,0,2)
sage: a
Sq(0,0,2)
sage: A2_adem = SteenrodAlgebra(2,'admissible')
sage: A2_adem(a)
Sq^{8} Sq^{4} Sq^{2} + Sq^{9} Sq^{4} Sq^{1} + Sq^{10} Sq^{3} Sq^{1} +
Sq^{10} Sq^{4} + Sq^{11} Sq^{2} Sq^{1} + Sq^{12} Sq^{2} + Sq^{13} Sq^{1}
+ Sq^{14}
sage: SteenrodAlgebra(2, 'woodz')(a)
Sq^{6} Sq^{7} Sq^{1} + Sq^{14} + Sq^{4} Sq^{7} Sq^{3} + Sq^{4} Sq^{7}
Sq^{2} Sq^{1} + Sq^{12} Sq^{2} + Sq^{8} Sq^{6} + Sq^{8} Sq^{4} Sq^{2}
sage: SteenrodAlgebra(2, 'arnonc')(a)
Sq^{4} Sq^{2} Sq^{8} + Sq^{4} Sq^{4} Sq^{6} + Sq^{4} Sq^{6} Sq^{4} +
Sq^{6} Sq^{8} + Sq^{8} Sq^{4} Sq^{2} + Sq^{8} Sq^{6}
sage: SteenrodAlgebra(2, 'pst_llex')(a)
P^{1}_{3}
sage: SteenrodAlgebra(2, 'comm_revz')(a)
c_{0,1} c_{1,1} c_{0,3} c_{2,1} + c_{0,2} c_{0,3} c_{2,1} + c_{1,3}
| self, other) |
Subtraction for elements of the Steenrod algebra.
sage: A7 = SteenrodAlgebra(7) sage: A7.P(2,1) - A7.Q(0,3) P(2,1) + 6 Q_0 Q_3