Ticket #7212 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[with patch, positive review] steenrod algebra multiplication bug

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

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

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

Change History

Changed 4 years ago by jhpalmieri

comment:1 Changed 4 years ago by jason

  • Status changed from new to needs_review

comment:2 Changed 4 years ago by was

  • Status changed from needs_review to positive_review
  • Summary changed from [with patch, needs review] steenrod algebra multiplication bug to [with patch, positive review] steenrod algebra multiplication bug

comment:3 Changed 4 years ago by mhansen

  • Status changed from positive_review to closed
  • Reviewers set to William Stein
  • Resolution set to fixed
  • Merged in set to sage-4.2.alpha0
  • Authors changed from jhpalmieri to John Palmieri
Note: See TracTickets for help on using tickets.