#16271: Support the generic Steenrod algebra at the prime 2
-------------------------------------+-------------------------------------
Reporter: cnassau | Owner:
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-6.3
Component: algebraic | Resolution:
topology | Merged in:
Keywords: Steenrod algebra | Reviewers:
Authors: Christian Nassau | Work issues:
Report Upstream: N/A | Commit:
Branch: | db6527ec2fdd8b9e896debcded7ed94d3bc2edd9
u/cnassau/ticket/16271 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by jhpalmieri):
I'm not getting this to work. When I evaluate
{{{
sage: SteenrodAlgebra(p=2,generic=True)
}}}
I get an error:
{{{
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
<ipython-input-1-7bd50008c6f7> in <module>()
----> 1 EA = SteenrodAlgebra(p=Integer(2),generic=True) ; EA
/Users/palmieri/Desktop/Sage_stuff/git/sage/local/lib/python2.7/site-
packages/sage/algebras/steenrod/steenrod_algebra.pyc in SteenrodAlgebra(p,
basis, generic, **kwds)
4122 return SteenrodAlgebra_mod_two(p=2, basis=basis, **kwds)
4123 else:
-> 4124 return SteenrodAlgebra_generic(p=p, basis=basis,
generic=True, **kwds)
4125
4126
/Users/palmieri/Desktop/Sage_stuff/git/sage/local/lib/python2.7/site-
packages/sage/misc/classcall_metaclass.so in
sage.misc.classcall_metaclass.ClasscallMetaclass.__call__
(sage/misc/classcall_metaclass.c:1282)()
/Users/palmieri/Desktop/Sage_stuff/git/sage/local/lib/python2.7/site-
packages/sage/algebras/steenrod/steenrod_algebra.pyc in
__classcall__(self, p, basis, **kwds)
525
526 std_basis = get_basis_name(basis, p, generic=std_generic)
--> 527 std_profile, std_type = normalize_profile(profile,
precision=precision, truncation_type=truncation_type, p=p,
generic=std_generic)
528 return super(SteenrodAlgebra_generic,
self).__classcall__(self, p=p, basis=std_basis, profile=std_profile,
529
truncation_type=std_type, generic=std_generic)
/Users/palmieri/Desktop/Sage_stuff/git/sage/local/lib/python2.7/site-
packages/sage/algebras/steenrod/steenrod_algebra_misc.pyc in
normalize_profile(profile, precision, truncation_type, p, generic)
550 k = k[:-1]
551 new_profile = (e, k)
--> 552 if is_valid_profile(new_profile, truncation_type, p):
553 return new_profile, truncation_type
554 else:
/Users/palmieri/Desktop/Sage_stuff/git/sage/local/lib/python2.7/site-
packages/sage/algebras/steenrod/steenrod_algebra_misc.pyc in
is_valid_profile(profile, truncation_type, p)
258 if pro_r < Infinity:
259 for i in range(1,r):
--> 260 if pro_r < min(pro[r-i-1] - i, pro[i-1]):
261 return False
262 else:
}}}
Does `is_valid_profile` also need to accept a `generic` argument? Maybe
something like this:
{{{
#!diff
diff --git a/src/sage/algebras/steenrod/steenrod_algebra_misc.py
b/src/sage/algebras/steenrod/steen
index 70b328c..fe58660 100644
--- a/src/sage/algebras/steenrod/steenrod_algebra_misc.py
+++ b/src/sage/algebras/steenrod/steenrod_algebra_misc.py
@@ -183,7 +183,7 @@ def get_basis_name(basis, p, generic=None):
######################################################
# profile functions
-def is_valid_profile(profile, truncation_type, p=2):
+def is_valid_profile(profile, truncation_type, p=2, generic=None):
"""
True if ``profile``, together with ``truncation_type``, is a valid
profile at the prime `p`.
@@ -250,7 +250,9 @@ def is_valid_profile(profile, truncation_type, p=2):
True
"""
from sage.rings.infinity import Infinity
- if p == 2:
+ if generic is None:
+ generic = False if p==2 else True
+ if p == 2 and not generic:
pro = list(profile) + [truncation_type]*len(profile)
r = 0
for pro_r in pro:
@@ -549,7 +551,7 @@ def normalize_profile(profile, precision=None,
truncation_type='auto', p=2, gen
while len(k) > 0 and k[-1] == 2:
k = k[:-1]
new_profile = (e, k)
- if is_valid_profile(new_profile, truncation_type, p):
+ if is_valid_profile(new_profile, truncation_type, p,
generic=generic):
return new_profile, truncation_type
else:
raise ValueError("Invalid profile")
}}}
Also, in the documentation for the function `SteenrodAlgebra`, I think you
should say a bit more, for example what the degrees of the elements are.
Maybe move the comment about what the dual looks like from `is_generic` to
`SteenrodAlgebra`.
--
Ticket URL: <http://trac.sagemath.org/ticket/16271#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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.