#10052: Improve the implementation of the Steenrod algebra
-----------------------------------------------------------------------+----
Reporter: jhpalmieri |
Owner: AlexGhitza
Type: enhancement |
Status: needs_work
Priority: major |
Milestone: sage-4.6.1
Component: algebra |
Keywords: steenrod, notebook
Author: John Palmieri |
Upstream: N/A
Reviewer: |
Merged:
Work_issues: minor docstring issues, problems with sub-Hopf algebras |
-----------------------------------------------------------------------+----
Changes (by niles):
* status: needs_review => needs_work
* work_issues: => minor docstring issues, problems with sub-Hopf
algebras
Comment:
Hi John,
I've finally had a chance to look over this patch. The functionality is
really great, and I think the documentation is fantastic! I noticed a
couple of minor issues, and then some larger problems related to sub-Hopf
algebras; here goes:
* I really like the
[http://www.sagemath.org/doc/reference/sage/misc/misc.html#sage.misc.misc.verbose
sage.misc.misc.verbose] module; I just wanted to remind you about it for
`steenrod_algebra_bases.steenrod_basis_error_check`. For a lengthy
demonstration, try
{{{
sage: set_verbose(1)
sage: EllipticCurve('11a1').sha().an_padic(5)
}}}
* Two minor doctest failures; the first occurs because -1 = 10 in GF(11),
and Sage prints 10; the second occurs because the way dicts are printed
may vary -- to fix that one I suggest testing that the output of the
function is equal to the given dict.
{{{
sage -t sage/algebras/steenrod/steenrod_algebra.py
**********************************************************************
File "/Applications/sage/devel/sage-
main/sage/algebras/steenrod/steenrod_algebra.py", line 1340:
sage: SteenrodAlgebra(p=11).Q(0,2).coproduct()
Expected:
1 # Q_0 Q_2 + Q_0 # Q_2 + Q_0 Q_2 # 1 - Q_2 # Q_0
Got:
1 # Q_0 Q_2 + Q_0 # Q_2 + Q_0 Q_2 # 1 + 10*Q_2 # Q_0
**********************************************************************
File "/Applications/sage/devel/sage-
main/sage/algebras/steenrod/steenrod_algebra.py", line 3080:
sage: d._basis_dictionary('arnonc')
Expected:
{(7,): 1, (2, 5): 1, (4, 2, 1): 1, (4, 3): 1}
Got:
{(7,): 1, (2, 5): 1, (4, 3): 1, (4, 2, 1): 1}
**********************************************************************
}}}
* The docstring for `.gens()`, last sentence before EXAMPLES::, should
mention the `Q_n`'s too, since both `.gen()` and `.ngens()` mention them.
* `.gen()` fails for pst basis: The following returns an error:
{{{
sage: SteenrodAlgebra(p=5, profile=[[2,1], [2,2,2]], basis='pst').gen(2)
}}}
* In the docstring for `.milnor_multiplication_odd()`, could you give a
reference for Monks Maple package?
* I think the description of `.homogeneous_component()` is a little
misleading: I expected it to return the vector space of elements of
homogeneous degree `n`, and thus was surprised to get different answers
depending on which basis I used. Of course this was clarified by the
description of the algorithm, but maybe the description could be
clarified.
{{{
sage: G = SteenrodAlgebra(p=5, profile=[[2,1], [2,2,2]], basis='pst')
sage: H = SteenrodAlgebra(p=5, profile=[[2,1], [2,2,2]])
sage: [H[n].dimension() - G[n].dimension() for n in range(100)]
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1,
2, 0, 0, 0, 0, 0, 0, 1, 4, 2, 0, 0, 0, 0, 0, 1, 4, 3, 0, 0, 0, 0, 0, 1, 4,
3, 0, 0, 0, 0, 0, 1, 4, 3, 0, 0, 0, 0, 0, 1, 4, 3, 0, 0, 0, 0, 0, 2, 6, 4,
0]
}}}
* `.an_element()` sometimes returns an element which may not be in sub
algebra:
{{{
sage: H = SteenrodAlgebra(profile=[1,2,1,1])
sage: H.an_element()
Sq(2,1)
sage: H.an_element() in H
False
}}}
* For sub algebras, `.Q()` should throw an error for elements not in the
sub algebra (as with `.P()`):
{{{
sage: H = SteenrodAlgebra(p=5, profile=[[2,1], [2,2,2]])
sage: H.Q(4) in H
False
sage: H.Q(4)
Q_4
sage: H.Q(4).parent() is H
True
}}}
* There is a problem with `.antipode()` for sub algebras:
{{{
sage: A = SteenrodAlgebra(2)
sage: A.Sq(2,1).antipode()
Sq(2,1)
sage: H = SteenrodAlgebra(profile=[2,2,1])
sage: H.Sq(2,1).antipode()
Traceback (most recent call last):
...
ValueError: Element does not lie in this Steenrod algebra
}}}
* problems with coercion:
{{{
sage: H.Sq(2,1) == A.Sq(2,1)
True
sage: H.Sq(2,1).coproduct() == A.Sq(2,1).coproduct()
False
sage: A.Sq(2,1).coproduct().parent() is A.tensor_square()
sage: A.tensor_square()(H.Sq(2,1).coproduct())
Traceback (most recent call last):
...
NotImplementedError:
}}}
* printing of elements: to be consistent with the rest of sage, perhaps
multiplication should print as `*`:
{{{
sage: A = SteenrodAlgebra(13)
sage: A.an_element()
12 Q_1 Q_3 P(2,1)
sage: PolynomialRing(GF(13),'x',5).random_element()
5*x1^2 + x0*x2 + x2*x4 - x4^2 - 5*x2
}}}
* it's too bad that elements do not print in a way that can be typed
directly into Sage (I think I read somewhere that this should be done
whenever possible). This could be fixed by allowing the user to declare
Sq, P, Q as global functions (e.g. P = A.P) -- perhaps by using the
.inject_variables() function -- and changing the Q_i to print as Q(i). Of
course this would work for only one Steenrod algebra (or sub algebra) at a
time, but would still be useful for basic testing/playing.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10052#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.