I've written some code in Mathematica, related to some group theory questions I have. Subsequently, I found that part of the code could be significantly sped up if I could just call a routine in Magma. Is there any way to have Mathematica ask Magma to run a subroutine, and then have Mathematica use the output?
More specifically, my Mathematica code outputs a bunch of relations, such as $a^2=b^2,ab=ca$. I need to then have Magma run the lines of code:
and then I need Mathematica to use the output $n$.