These are the Mathematica solutions for the paper:

“Permutation-type solutions to the Yang-Baxter and other n-simplex equations” by J. Hietarinta.

computations by Dara O Shayda

dara@lossofgenerality.com

<<Notation`

This formulation is incomprehensible and I guessed how it works:

Notation[(NotationTemplateTag[(Subscript[R, i_,j_])]) ⟹ (NotationTemplateTag[makeA[A,{i_,j_},3]])]
Notation[(NotationTemplateTag[(Subscript[R, i_,j_,k_])]) ⟹ (NotationTemplateTag[makeA[A,{i_,j_,k_},6]])]
Notation[(NotationTemplateTag[(Subscript[R, i_,j_,k_,h_])]) ⟹ (NotationTemplateTag[makeA[A,{i_,j_,k_,h_},10]])]

makeMatrix[dim_, a_]:=Array[Subscript[a,#1,#2]&,dim]

(* makeA generates the A matrices in Hietarinta paper *)

makeA[A_, list_,n_]:=Module[{res, i,j,k},

res=ConstantArray[-1,{n,n}];

Table[If[MemberQ[list, i]!= True, res [[i]][[j]]=KroneckerDelta[i,j]; res [[j]][[i]]=KroneckerDelta[j,i] ], {i, 1, n}, {j, 1, n}];
 
Table[k=1;Table[ If[res[[list[[i]]]][[j]] == -1, res[[list[[i]]]][[j]] = A[[i]][[k]];k=k+1];,{j,1,n}],{i , 1, Length[list]}];
res

]

2-Simplex

Make a 2x2 matrix:

A=makeMatrix[{2,2},a];
A//MatrixForm

Rename the entries to match the paper:

A= A/.{(Subscript[a, 1,1])->a, (Subscript[a, 1,2])->b, (Subscript[a, 1,3])->c, (Subscript[a, 2,1])->c, (Subscript[a, 2,2])->d};
A//MatrixForm

Make the R matrices for 2-simplex:

(Subscript[R, 1,2])  //MatrixForm

(Subscript[R, 1,3])  //MatrixForm

(Subscript[R, 2,3])  //MatrixForm

The matrix equation:

((Subscript[R, 1,2]).(Subscript[R, 1,3]). (Subscript[R, 2,3])- (Subscript[R, 2,3]).(Subscript[R, 1,3]).(Subscript[R, 1,2]))//MatrixForm

Solve the matrix equation:

sol=Solve[(Subscript[R, 1,2]).(Subscript[R, 1,3]). (Subscript[R, 2,3])- (Subscript[R, 2,3]).(Subscript[R, 1,3]).(Subscript[R, 1,2]) == ConstantArray[0,{3,3}], {a,b,c,d}];

Table[ A/.sol[[i]] // MatrixForm , {i, 1, Length[sol]}]