<<PolylogTools`

II[indices_List,arguments_List]/;Length[indices]==Length[arguments]&&VectorQ[indices,IntegerQ[#]&&#≥1&]:=G@@Flatten[Join[Table[Join[Table[0,{indices[[j]]-1}],{arguments[[j]]}],{j,Length[indices],1,-1}],{1}]]

cr[{a_,b_,c_,d_}]:=((a-c)/(a-d))/((b-c)/(b-d))
cr[{a_,b_,c_}]:=((a-c)/(b-c))

cr[{a_,b_,c_,d_,e_}] := Sequence[cr[{a,b,c,d}],cr[{a,b,c,e}]];
cr[{a_,b_,c_,d_,e_,f_}] := Sequence[cr[{a,b,c,d}],cr[{a,b,c,e}], cr[{a,b,c,f}]];

cr[{Inf,b_,c_,d_}]:=cr[{d,c,b}]
cr[{a_,Inf,c_,d_}]:=cr[{c,d,a}]
cr[{a_,b_,Inf,d_}]:=cr[{b,a,d}]
cr[{a_,b_,c_,Inf}]:=cr[{a,b,c}]

i11111 = IIi[{1,1,1,1,1},{cri[{a,Inf,b,g}],cri[{a,Inf,c,g}],cri[{a,Inf,d,g}],cri[{a,Inf,e,g}],cri[{a,Inf,f,g}]}];

phi = -IIi[{5},{cri2[{b,d,a,c}]}]+4 IIi[{5},{cri2[{b,d,a,e}]}]-IIi[{5},{cri2[{b,d,a,f}]}]+4 IIi[{5},{cri2[{b,d,a,Inf}]}]-IIi[{5},{cri2[{b,f,a,c}]}]+4 IIi[{5},{cri2[{b,f,a,d}]}]-6 IIi[{5},{cri2[{b,f,a,e}]}]+4 IIi[{5},{cri2[{b,f,a,Inf}]}]+6 IIi[{5},{cri2[{d,Inf,a,b}]}]+IIi[{5},{cri2[{d,Inf,a,c}]}]-4 IIi[{5},{cri2[{d,Inf,a,e}]}]+IIi[{5},{cri2[{d,Inf,a,f}]}]+IIi[{5},{cri2[{f,Inf,a,b}]}]+IIi[{5},{cri2[{f,Inf,a,c}]}]-4 IIi[{5},{cri2[{f,Inf,a,d}]}]+6 IIi[{5},{cri2[{f,Inf,a,e}]}]+2 IIi[{5},{cri2[{Inf,b,a,c}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i[{3,1,1},{cri2[{Inf,b,a,c,e,f}]}]+IIi[{3,1,1},{cri2[{Inf,b,a,d,e,f}]}];

phidiff = phi - (phi/.{a->g});

i11111 - phidiff/.{a->0,g->1,IIi->II,cri->cr,cri2->cr}//CreateTensor//sh//flatTensor//Expand

(* _---------- *)

phi311 = -IIi[{5},{cri2[{b,d,a,c}]}]+15 IIi[{5},{cri2[{b,d,a,e}]}]+15 IIi[{5},{cri2[{b,d,a,f}]}]-2 IIi[{5},{cri2[{b,d,a,Inf}]}]+6 IIi[{5},{cri2[{b,d,c,e}]}]+5 IIi[{5},{cri2[{b,d,c,Inf}]}]+13 IIi[{5},{cri2[{b,d,e,f}]}]+6 IIi[{5},{cri2[{b,d,Inf,e}]}]+6 IIi[{5},{cri2[{b,d,Inf,f}]}]-3 IIi[{5},{cri2[{b,f,a,d}]}]+8 IIi[{5},{cri2[{b,f,a,e}]}]-8 IIi[{5},{cri2[{b,f,a,Inf}]}]+(19/3) IIi[{5},{cri2[{b,f,c,d}]}]-2 IIi[{5},{cri2[{b,f,c,e}]}]+(4/3) IIi[{5},{cri2[{b,f,d,a}]}]-8 IIi[{5},{cri2[{b,f,d,e}]}]+10 IIi[{5},{cri2[{b,f,d,Inf}]}]-8 IIi[{5},{cri2[{b,f,e,a}]}]-(13/3) IIi[{5},{cri2[{b,f,e,Inf}]}]+(32/3) IIi[{5},{cri2[{b,f,Inf,a}]}]+3 IIi[{5},{cri2[{d,Inf,a,b}]}]+21 IIi[{5},{cri2[{d,Inf,a,e}]}]-3 IIi[{5},{cri2[{d,Inf,a,f}]}]+(23/3) IIi[{5},{cri2[{d,Inf,b,e}]}]+2 IIi[{5},{cri2[{d,Inf,b,f}]}]+6 IIi[{5},{cri2[{d,Inf,c,e}]}]-(4/3) IIi[{5},{cri2[{d,Inf,e,a}]}]+(22/3) IIi[{5},{cri2[{d,Inf,e,f}]}]+(16/3) IIi[{5},{cri2[{d,Inf,f,a}]}]+13 IIi[{5},{cri2[{f,Inf,a,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phi311diff = phi311 - (phi311/.{a->g});

i11111 - phi311diff/.{a->0,g->1,IIi->II,cri->cr,cri2->cr}//CreateTensor//sh//flatTensor//Expand

NotebookSave[];