Search code examples
juliagap-system

A problem with IrreducibleRepresentationsDixon in Julia


I have a question on using GAP in Julia in Jupyter notebook. I am trying to run the following sequence in Julia:

using GAP 
const g =GAP.Globals
G = g.SmallGroup(4,2)
R = g.IrreducibleRepresentationsDixon(G:unitary)

and every time I am obtaining the same outcome:

UndefVarError: `unitary` not defined

Stacktrace:
 [1] top-level scope
   @ In[44]:1

On the other hand, when I perform

using GAP 
const g =GAP.Globals
GAP.evalstr("G:=SmallGroup(4,2);;IrreducibleRepresentationsDixon(G:unitary);")

I get what is needed:

GAP: [ [ f1, f2 ] -> [ [ [ 1 ] ], [ [ 1 ] ] ], [ f1, f2 ] -> [ [ [ -1 ] ], [ [ 1 ] ] ], [ f1, f2 ] -> [ [ [ 1 ] ], [ [ -1 ] ] ], [ f1, f2 ] -> [ [ [ -1 ] ], [ [ -1 ] ] ] ]

However, I don't want to use the evalstr() method, but rather have a GAP group in Julia and find its unitary representations using the command given above. How can I do this?


Solution

  • You should not blindly copy GAP syntax to Julia; while they look superficially similar, they are different. Indeed, in GAP the colon is used to separate "options" from arguments. There is no direct analogue for GAP options in Julia, although they superficially resemble keyword arguments. They actually have quite different semantics, but for convenience, we still map Julia kwargs in GAP.jl to GAP options. So this input should work:

    using GAP
    const g = GAP.Globals
    G = g.SmallGroup(4,2)
    R = g.IrreducibleRepresentationsDixon(G; unitary = true)
    

    This is also describer in the GAP.jl manual here -- admittedly not the easiest place to find it. There probably should be an intro section discussing this explicitly.