<<PolylogTools`

i61[x_,y_] := II[x, 0, 0, 0, 0, 0, y];

i61m[x_,y_] := (i61[x,y] - i61[x,1/y])/2;
i61mhat[x_,y_] := i61m[x,y] + i61m[x,1-y];

G[0, 0, 0, 1, 1, x]//CreateTensor

II[1/x, 1/x, 0, 0, 0]//makeShortTensor//ReduceTensorProduct

N7[x_] := II[1/x, 1/x, 0, 0, 0, 0, 0];

L7[x_] := -II[1/x, 0, 0, 0, 0, 0, 0];

SetAttributes[L7sym,HoldAll];
Options[L7sym]={oneMinusY->False,oneMinusOneOverX->False};
L7sym[coeff_,arg_,opts:OptionsPattern[]]:=Module[{oneMinusYTF,oneMinusOneOverXTF,coeffs,args},(
oneMinusYTF=OptionValue[oneMinusY]==True;
oneMinusOneOverXTF=OptionValue[oneMinusOneOverX]==True;

coeffs={Hold[coeff]};
args={Hold[arg]};

If[oneMinusOneOverXTF,
coeffs=Join[coeffs,coeffs, coeffs];
args=Join[args,args/.{x->1-1/x},args/.{x->1/(1-x)}];];
If[oneMinusYTF,coeffs=Join[coeffs,coeffs];
args=Join[args,args/.{y->1-y}];];

Return[Plus@@Release[MapThread[#1 L7i[#2]&,{coeffs,args}]]];
)];

L7iinv[arg_]:=If[Sort[Factor[{arg,1/arg}]][[1]]===Factor[arg],L7i[Factor[arg]],L7i[Factor[1/arg]]];
L7can[expr_]:=expr/.L7i[arg_]:>L7iinv[arg]

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

i61terms = i61mhat[x,y] + i61mhat[1/(1-x), y] + i61mhat[1-1/x, y];

li7termsFull = N7[1-y]+N7[y]- 2L7i[1-y]-(7/4) L7i[(1/((-1+x) (-1+y)))]+(5/4) L7i[((-1+x)/(-1+y))]+(5/4) L7i[-(1/(x (-1+y)))]-(7/4) L7i[-((-1+x)/(x (-1+y)))]-(7/4) L7i[-(x/(-1+y))]+(5/4) L7i[-(x/((-1+x) (-1+y)))]-(1/36) L7i[-((-1+y)/((-1+x) x (y^2)))]-(1/36) L7i[-(((((-1+x))^2) (-1+y))/(x (y^2)))]-(1/36) L7i[(((x^2) (-1+y))/((-1+x) (y^2)))]-2 L7i[(1/y)]-(7/4) L7i[-(1/((-1+x) y))]+(5/4) L7i[-((-1+x)/y)]+(5/4) L7i[(1/(x y))]-(7/4) L7i[((-1+x)/(x y))]-(7/4) L7i[(x/y)]+(5/4) L7i[(x/((-1+x) y))]+(1/18) L7i[-((-1+x)/((x^2) (-1+y) y))]+(1/18) L7i[(x/((((-1+x))^2) (-1+y) y))]+(1/18) L7i[(((-1+x) x)/((-1+y) y))]-L7i[((-1+y)/y)]+(1/2) L7i[-((-1+y)/((-1+x) y))]+(1/2) L7i[-(((-1+x) (-1+y))/y)]+(1/2) L7i[((-1+y)/(x y))]+(1/2) L7i[(((-1+x) (-1+y))/(x y))]+(1/2) L7i[((x (-1+y))/y)]+(1/2) L7i[((x (-1+y))/((-1+x) y))]-(1/36) L7i[-(((-1+x) (((-1+y))^2))/((x^2) y))]-(1/36) L7i[((x (((-1+y))^2))/((((-1+x))^2) y))]-(1/36) L7i[(((-1+x) x (((-1+y))^2))/y)];

li7termsShort =  N7[1-y]+N7[y] + 
+L7sym[-(1/36),(((x^2) (-1+y))/((-1+x) (y^2))),{oneMinusOneOverX->True,oneMinusY->True}]+
+L7sym[(1/36),(((-1+x) x)/((-1+y) y)),{oneMinusOneOverX->True,oneMinusY->True}]+
+L7sym[(1/2),((x (-1+y))/((-1+x) y)),{oneMinusOneOverX->True,oneMinusY->True}]+
+L7sym[(5/4),x y,{oneMinusOneOverX->True,oneMinusY->True}]+
-L7sym[(7/4),(x/y),{oneMinusOneOverX->True,oneMinusY->True}]+
-L7sym[(2/3),y,{oneMinusOneOverX->True,oneMinusY->True}]+
-L7sym[(1/6),-((1-y)/y),{oneMinusOneOverX->True,oneMinusY->True}];

li7termsFull - li7termsShort//L7can//Expand

result = i61terms - li7termsFull/.{L7i->L7,i61i->i61};

tensor=result//makeShortTensor//sh;
tensor//ReduceTensorProduct//flatTensor//Expand

NotebookSave[];