Opened 13 years ago

Closed 13 years ago

#7212 closed defect (fixed)

[with patch, positive review] steenrod algebra multiplication bug

Reported by: jhpalmieri Owned by: tbd
Priority: minor Milestone: sage-4.2
Component: algebra Keywords:
Cc: Merged in: sage-4.2.alpha0
Authors: John Palmieri Reviewers: William Stein
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

GitHub link to the corresponding issue

Description

From sage-support:

I have Sage 4.1.1 install on a server, and I run the following code, 
which outputs the following error: 
sage: A3=SteenrodAlgebra(3) 
sage: A3.P(36,6)*A3.P(27,9,81) 
--------------------------------------------------------------------------- 
KeyError                                  Traceback (most recent call 
last) 
/home/user_bob/<ipython console> in <module>() 
/usr/local/sage-4.1.1/local/lib/python2.6/site-packages/sage/structure/ 
element.so in sage.structure.element.RingElement.__mul__ (sage/ 
structure/element.c:9956)() 
/usr/local/sage-4.1.1/local/lib/python2.6/site-packages/sage/structure/ 
element.so in sage.structure.element.RingElement._mul_ (sage/structure/ 
element.c:10021)() 
/usr/local/sage-4.1.1/local/lib/python2.6/site-packages/sage/algebras/ 
steenrod_algebra_element.pyc in _mul_(self, other) 
    925                         new_dict = milnor_multiplication 
(mono1, mono2) 
    926                     else: 
--> 927                         new_dict = milnor_multiplication_odd 
(mono1, mono2, p=p) 
    928                     for new_mono in new_dict: 
    929                         if result.has_key(new_mono): 
/usr/local/sage-4.1.1/local/lib/python2.6/site-packages/sage/algebras/ 
steenrod_milnor_multiplication_odd.pyc in milnor_multiplication_odd 
(m1, m2, p) 
    225                     t = tuple(diagonal[:i+1]) 
    226                     if result.has_key((e,t)): 
--> 227                         result[(e,t)] = F(coeff + result[t]) 
    228                     else: 
    229                         result[(e,t)] = F(coeff) 
KeyError: (26, 8, 86) 

This is because of a simple bug: instead of result[t], it should be result[(e,t)].

Attachments (1)

trac_7212-steenrod.patch (1.4 KB) - added by jhpalmieri 13 years ago.

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by jhpalmieri

Attachment: trac_7212-steenrod.patch added

comment:1 Changed 13 years ago by jason

Status: newneeds_review

comment:2 Changed 13 years ago by was

Status: needs_reviewpositive_review
Summary: [with patch, needs review] steenrod algebra multiplication bug[with patch, positive review] steenrod algebra multiplication bug

comment:3 Changed 13 years ago by mhansen

Authors: jhpalmieriJohn Palmieri
Merged in: sage-4.2.alpha0
Resolution: fixed
Reviewers: William Stein
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.