#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 |
-----------------------------------------------------------------------+----
Comment(by jhpalmieri):
Replying to [comment:8 niles]:
Thanks a lot for all the work and careful comments. Among other things,
you've found some bugs in the code, which I think I've fixed. I'm
attaching a new patch, but I'm leaving it as "needs work" while I keep
looking at it to see if I can see other issues which need fixing.
> * 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`.
That's a good idea; I've implemented it.
> * 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
I don't see these, on either sage.math or on OS X. What platform are you
using?
> * The docstring for `.gens()`, last sentence before EXAMPLES::, should
mention the `Q_n`'s too, since both `.gen()` and `.ngens()` mention them.
Fixed.
> * `.gen()` fails for pst basis:
Fixed, plus a new doctest for it.
> * In the docstring for `.milnor_multiplication_odd()`, could you give a
reference for Monks Maple package?
Done, and also in milnor_multiplication().
> * 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.
Me, too. It should give vector spaces of the same dimension regardless of
the basis. This turned out to be a bug in the basis algorithm (with
profile functions, I was accidentally setting a variable n inside a loop
"for n in range(...)", so n was being reset in the middle of the loop,
causing it to end too early). This is fixed, and I've added some tests
for it, both in homogeneous_component and in steenrod_basis_error_check.
> * `.an_element()` sometimes returns an element which may not be in sub
algebra:
Fixed. If the algebra has a profile function, return `1` if the algebra
is just the base field, and otherwise return its first generator. The old
behavior, returning some arbitrarily chosen element, is still there for
the full Steenrod algebra.
> * For sub algebras, `.Q()` should throw an error for elements not in
the sub algebra (as with `.P()`):
Fixed, along with a new doctest.
> * There is a problem with `.antipode()` for sub algebras:
I don't see this one, although it may have been fixed by one of the other
fixes. I've added a doctest for it anyway.
> * 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:
}}}
I don't know how to fix this: it has to do with the implementation (or
lack thereof) of tensor products. I don't think it's particular to the
Steenrod algebra, so I'd like to have it dealt with on another ticket.
> * printing of elements: to be consistent with the rest of sage,
perhaps multiplication should print as `*`:
I understand what you're saying, but I think that printing this way is
ugly. (This was one of the reasons for #9370.) If you really want, I can
change it, but I'd rather not.
> * 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.
This is a very interesting idea, but I don't know how to do it right now.
Can `inject_variables` be used to define functions, not just variables?
I'll think about it, but I may want to defer it to a later ticket.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10052#comment:9>
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.