I wonder whether it is possible to translate an output from the computer algebra system GAP automatically into a nice latex form. I have no experience with programming in latex so Im not sure whether such a thing is possible or whether there exists tools to do an immediate translation.
Here are two examples of such GAP outputs:
[ [ 'x{}'_op_'x{0, 1, 2}' ], [ 'x{2}'_op_'x{0, 1}', 'x{1}'_op_'x{0, 2}', 'x{0}'_op_'x{1, 2}' ],
[ 'x{1, 2}'_op_'x{0}', 'x{0, 2}'_op_'x{1}', 'x{0, 1}'_op_'x{2}' ], [ 'x{0, 1, 2}'_op_'x{}' ] ]
This is a list with several entries, the intended latex output should look as follows:
$( \emptyset , \{ 0,1,2 \} ) \rightarrow ( \{2 \} , \{0,1 \} ) \oplus ( \{1 \} , \{0,2 \} ) \oplus ( \{ 0 \} , \{1,2 \} ) \rightarrow ( \{1,2 \} , \{ 0 \} ) \oplus ( \{ 0,2 \} , \{ 1 \} ) \oplus ( \{ 0,1 \} , \{ 2 \} ) \rightarrow ( \{ 0,1,2 \} , \emptyset )$
Thus the GAP-output consists of several list of the form (example) [ 'x{1, 2}'op'x{0}', 'x{0, 2}'op'x{1}', 'x{0, 1}'op'x{2}' ], which should correspond in latex to $( {1,2 } , { 0 } ) \oplus ( { 0,2 } , { 1 } ) \oplus ( { 0,1 } , { 2 } )$ and the lists are connected in latex by $\rightarrow $.
GAP-output (2. example):
[ [ 'x{}'_op_'x{0, 1, 2}' ], [ 'x{}'_op_'x{0, 1}', 'x{1}'_op_'x{0, 1, 2}', 'x{0}'_op_'x{1, 2}' ],
[ 'x{1, 2}'_op_'x{0}', 'x{0}'_op_'x{1}', 'x{0, 1}'_op_'x{1, 2}' ], [ 'x{0, 1, 2}'_op_'x{}' ] ]
Intended latex form:
$( \emptyset , \{ 0,1,2 \} ) \rightarrow ( \emptyset , \{0,1 \}) \oplus ( \{1\} , \{ 0,1,2 \} ) \oplus ( \{0\} , \{1,2 \}) \rightarrow ( \{1,2 \} , \{0 \} ) \oplus ( \{ 0 \} , \{1 \} ) \oplus ( \{0,1\} , \{1,2 \} ) \rightarrow ( \{0,1,2 \} , \emptyset )$

