1 | initial version |
To define GAP functions in Sage, you can use the command libgap.eval()
, as mentioned earlier. For example:
F = libgap.eval("myfunction := function(x, y) if x = y then return true; else return false; fi; end;")
This allows you to call F(x, y)
in Sage as if it were a native function. However, it's important to note that if the GAP function myfunction
contains any string, Sage will return an error. A way to work around this issue is to use the String
function to handle strings properly.