# The moves of chemlambda v2 in mol format

The mol file format for a chemlambda molecule is a list of lines. Each line represents a graphical element, like described at the chemlambda project index page.

The moves, or graph rewrites, are visualised at the moves page.

The expression of the moves in mol format can be inferred from the main script, but perhaps this is tedious, therefore I shall give them here directly.

The graphical elements are L, A, FI, FO, FOE, Arow, T, FRIN, FROUT, each with a certain number of ports, as explained in the mentioned index page. Each port has two types:

• one can be “in” or “out”
• the other can be “middle”, “left” or “right”

and there is a convention of writing the ports of any graphical element in a given order.

Here I shall write a graphical element in the following form. Instead of the line “L a b c” from the mol file I shall write “L[a,b,c]”, and the same for all other graphical elements. Then the mol file will be seen as a commutative and associative product of the graphical elements.

This goes back to the initial proposal by Louis Kauffman, who tried to use the formal reduction from Mathematica for the graphic lambda calculus.

OK?

Now, we can improve the notation L[a,b,c] by thinking about a, b, c as indices of a tensor, of course. This is reasonable because in any mol file which represents a chemlambda molecule, any port variable appears at most twice, so it is like a summing variable.

Let’s do this by writing

$L_{a}^{bc} = L[a,b,c]$

in order to emphasize that “a” has type “in” and “b”, “c” have type out, but otherwise preserving the order a,b,c in the notation (this order allows to infer, from the symbol “L” of the graphical element, they other types of the ports, namely for the L element “a” has also type “middle”, “b” has type “left” and “c” has type “right”).

Same for all other elements.

Here are the moves, then, with the convention that “U=V” means “transform U into V”.

COMB. Denote by $M^{a}$ any graphical element with an out port “a”, then

$M^{a} Arrow_{a}^{b} = M^{b}$

L-A (i.e. the BETA move).

$L_{a}^{bc} A_{cd}^{e} = Arrow_{a}^{e} Arrow_{d}^{b}$

FI-FOE(i.e. the FAN-IN move).

$FI_{ad}^{c} FOE_{c}^{be} = Arrow_{a}^{e} Arrow_{d}^{b}$

L-FO, L-FOE (aka DIST-L).

$L_{a}^{bc} FO_{c}^{de} = FI_{ji}^{b} L_{k}^{id} L_{l}^{je} FOE_{a}^{kl}$

and the same for L-FOE, where the left hand side $L_{a}^{bc} FO_{c}^{de} =$ … is replaced by $L_{a}^{bc} FOE_{c}^{de} =$ and the rest stays the same.

A-FO, A-FOE (aka DIST-A).

$A_{ab}^{c} FO_{c}^{de} = FOE_{a}^{ij} A_{ik}^{d} A_{jl}^{e} FOE_{b}^{kl}$

and the same for A-FOE, where the left hand side $A_{ab}^{c} FO_{c}^{de} =$ … is replaced by $A_{ab}^{c} FOE_{c}^{de} =$ and the rest stays the same.

FI-FO (aka DIST-FI).

$FI_{ab}^{c} FO_{c}^{de} = FO_{a}^{ij} FI_{ik}^{d} FI_{jl}^{e} FO_{b}^{kl}$

FO-FOE  (aka DIST-FO).

$FO_{a}^{bc} FOE_{c}^{de} = FI_{ji}^{b} FO_{k}^{id} FO_{l}^{je} FOE_{a}^{kl}$

PRUNING MOVES.

$A_{ab}^{c} T_{c} = T_{a} T_{b}$

$FI_{ab}^{c} T_{c} = T_{a} T_{b}$

$L_{a}^{bc} T_{c} = T_{a} FRIN_{b}$

$FO_{a}^{bc} T_{b} = Arrow_{a}^{c}$

$FOE_{a}^{bc} T_{b} = Arrow_{a}^{c}$

$FO_{a}^{bc} T_{c} = Arrow_{a}^{b}$

$FOE_{a}^{bc} T_{c} = Arrow_{a}^{b}$

___________________________

The question, of course, is: if we see the moves as equalities and the graphical elements as tensors in a vector space, then how many solutions exist for the moves equations (perhaps eliminating the PRUNING moves, or by seeing  $T_{a}$ as an element of the vector space)?

________________________________________________