physop package

Help
Anonymous
2011-01-06
2012-11-20

  • Anonymous
    2011-01-06

    Hello.
    I think the PHYSOP package has some error.
    My test code is following.

    load_package noncom2;
    load_package physop;
    scalop a,b; noncom a,b; oporder b,a;
    let comm(a,b) = unit;
    a*b*a*b*a*b;
    a*b*a*b*a*b*a*b;

    When I run the above code,
    "a*b*a*b*a*b" return the wrong result:
    "7*b*a + 7*b*b*a*a + b*b*b*a*a*a + unit".
    The expected result is following:
    "7*b*a + 6*b*b*a*a + b*b*b*a*a*a + unit".
    Furthermore, the last line causes segmentation fault.

    Please fix this error.

    Thank you.

     
  • Arthur Norman
    Arthur Norman
    2011-01-06

    I do not yet understand it, but I confirm the abrupt collapse on your last line. When I look into that it is an apparently infinite recursion via multopop!* and physoptimes. Specifically I observe a nesting of calls
      physoptimes((times b b a a b a a) b)
    =>   physoptimes((times b b a a b a a) b)
    *** recursive repeat here
    and the segmentation faiult you see eventually is it being hard to recover gracefully from infinite recursion and stack overflow.

    I do not know the internals of the hephys/physop package at all well - is there somebody else out there who can join in understaning this one? I can look some more but I would hardly recognise a correct answer if I saw one!   Arthur

     
  • The code makes small changes to  very old versions of multf and multfnc which were known to
    have some problems with noncommuting vars. Making a quick (without much thinking) adaption
    to the newer routines at least yields the correct answer to

    a*b*a*b*a*b;

    but still loops on the next expression. Unfortunately, I have no time at the moment to look any further.
    If nobody else volunteers, I might be able next week to give it another try.

     
  • I just commited a fix to this problem. Please fetch the new version and try it out.

    Thanks.