Skip to content

Strange bug with antisymmetric function #696

@crmafra

Description

@crmafra

I found a bug which manifests itself by using the antisymmetric specification for a function.

That is, in the code below the correct result (zero) is obtained if

CFunction bmnp;

is used. However, if I use

CFunction bmnp(a);

it does not work and the result is not zero. The only difference is adding the (a) antisymmetric specification to the function.

The following code shows the bug.

   Indices m,n,p,q,r;
    Cfunction gmn, cdelta, g1100, tmpF;
  •    CFunction bmnp;
    CFunction bmnp(a);
    
    L zero =
    + gmn(m,n)*bmnp(p,q,r)
    - tmpF(m,n,p,q,r)
    ;
    
    id gmn(m?,n?)*bmnp(p?,q?,r?) = g1100(p,q,r)*cdelta(m,n);
    id tmpF(m?,n?,p?,q?,r?) = g1100(p,q,r)*cdelta(m,n);
    
    print +s -f zero;
    .end 
    

When 'Cfunction bmnp' is commented out and 'Cfunction bmnp(a)' is used, instead of zero I get

    zero =
   - cdelta(m,n)*g1100(p,q,r)
   + cdelta(m,n)*g1100(r,p,q)
  ;

which shows that the arguments of bmnp were permuted even though they should not.

This bug happens in the latest code from github and the bug was also present in 2017.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions