(* ::Package:: *)

(************************************************************************)
(* This file was generated automatically by the Mathematica front end.  *)
(* It contains Initialization cells from a Notebook file, which         *)
(* typically will have the same name as this file except ending in      *)
(* ".nb" instead of ".m".                                               *)
(*                                                                      *)
(* This file is intended to be loaded into the Mathematica kernel using *)
(* the package loading commands Get or Needs.  Doing so is equivalent   *)
(* to using the Evaluate Initialization Cells menu command in the front *)
(* end.                                                                 *)
(*                                                                      *)
(* DO NOT EDIT THIS FILE.  This entire file is regenerated              *)
(* automatically each time the parent Notebook file is saved in the     *)
(* Mathematica front end.  Any changes you make to this file will be    *)
(* overwritten.                                                         *)
(************************************************************************)



(* ::Input::Initialization:: *)
SetDirectory["C:\\drorbn\\AcademicPensieve\\Projects\\HigherRank\\Rolands_A2"];
Once[<<KnotTheory`];
<<../Rot.m
SuperPlus[(SuperPlus[\[Alpha]_])]:=\!\(\*SuperscriptBox[\(\[Alpha]\), \("\<++\>"\)]\);    (* this is for cosmetic reasons only *)


(* ::Input::Initialization:: *)
Subscript[r, 0][1,i_,j_]:=2 (-Subscript[T, 1]+Subscript[T, 2]+Subscript[T, 1] Subscript[T, 2]) Subscript[p, 3,j] Subscript[x, 1,i] Subscript[x, 2,i]-2 (-1+Subscript[T, 2]) Subscript[p, 3,j] Subscript[x, 1,j] Subscript[x, 2,i]-2 Subscript[p, 3,j] Subscript[x, 1,i] Subscript[x, 2,j](*from r0p*)
Subscript[r, 0][-1,i_,j_]:=-((2 Subscript[p, 3,j] Subscript[x, 1,i] Subscript[x, 2,i])/Subscript[T, 1])+(2 (-1+Subscript[T, 2]) Subscript[p, 3,j] Subscript[x, 1,j] Subscript[x, 2,i])/Subscript[T, 2]+(2 Subscript[p, 3,j] Subscript[x, 1,i] Subscript[x, 2,j])/Subscript[T, 1]
Subscript[r, 1][1,i_,j_]:=-(3/2)-2 Subscript[p, 1,i] Subscript[x, 1,i]-2 Subscript[p, 1,j] Subscript[x, 1,i]-Subscript[p, 1,i] Subscript[p, 1,j] \!\(\*SubsuperscriptBox[\(x\), \(1, i\), \(2\)]\)-1/2 (-1+Subscript[T, 1]) (2+Subscript[T, 1]) \!\(\*SubsuperscriptBox[\(p\), \(1, j\), \(2\)]\) \!\(\*SubsuperscriptBox[\(x\), \(1, i\), \(2\)]\)+(4 Subscript[p, 1,j] Subscript[x, 1,j])/Subscript[T, 1]-Subscript[p, 1,i] Subscript[p, 1,j] Subscript[x, 1,i] Subscript[x, 1,j]+1/2 (3+Subscript[T, 1]) \!\(\*SubsuperscriptBox[\(p\), \(1, j\), \(2\)]\) Subscript[x, 1,i] Subscript[x, 1,j]-2 Subscript[p, 2,i] Subscript[x, 2,i]+2 Subscript[p, 2,j] Subscript[x, 2,i]-2 Subscript[p, 1,j] Subscript[p, 2,i] Subscript[x, 1,i] Subscript[x, 2,i]+((1-3 Subscript[T, 1]+2 Subscript[T, 2]-4 Subscript[T, 1] Subscript[T, 2]+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-4 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+11 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-18 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) Subscript[p, 1,i] Subscript[p, 2,j] Subscript[x, 1,i] Subscript[x, 2,i])/((-1+Subscript[T, 1]) (-1+2 Subscript[T, 2]))+(1+4 Subscript[T, 1]-6 Subscript[T, 2]+9 Subscript[T, 1] Subscript[T, 2]-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 1,j] Subscript[p, 2,j] Subscript[x, 1,i] Subscript[x, 2,i]+((-4+3 Subscript[T, 1]+16 Subscript[T, 1] Subscript[T, 2]-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]+8 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-22 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 1,j] Subscript[p, 2,i] Subscript[x, 1,j] Subscript[x, 2,i])/((-1+Subscript[T, 1]) (-1+2 Subscript[T, 2]))-((-1+Subscript[T, 2]) (2+Subscript[T, 1]-11 Subscript[T, 1] Subscript[T, 2]-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 1,j] Subscript[p, 2,j] Subscript[x, 1,j] Subscript[x, 2,i])/((-1+Subscript[T, 1]) (-1+2 Subscript[T, 2]))-2 Subscript[p, 2,i] Subscript[p, 2,j] \!\(\*SubsuperscriptBox[\(x\), \(2, i\), \(2\)]\)-1/2 (-1+Subscript[T, 2]) (4+Subscript[T, 2]) \!\(\*SubsuperscriptBox[\(p\), \(2, j\), \(2\)]\) \!\(\*SubsuperscriptBox[\(x\), \(2, i\), \(2\)]\)+2 Subscript[p, 1,i] Subscript[p, 2,j] Subscript[x, 1,i] Subscript[x, 2,j]-((3 Subscript[T, 1]-4 Subscript[T, 2]+7 Subscript[T, 1] Subscript[T, 2]-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 1,j] Subscript[p, 2,j] Subscript[x, 1,i] Subscript[x, 2,j])/(-1+2 Subscript[T, 2])-Subscript[p, 2,i] Subscript[p, 2,j] Subscript[x, 2,i] Subscript[x, 2,j]+1/2 (5+Subscript[T, 2]) \!\(\*SubsuperscriptBox[\(p\), \(2, j\), \(2\)]\) Subscript[x, 2,i] Subscript[x, 2,j]+((Subscript[T, 1]+4 Subscript[T, 2]-11 Subscript[T, 1] Subscript[T, 2]-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 1,j] Subscript[p, 2,i] Subscript[x, 3,i])/(2 (-1+2 Subscript[T, 2]))+1/2 Subscript[p, 1,i] Subscript[p, 2,j] Subscript[x, 3,i]-((-1+Subscript[T, 1]+6 Subscript[T, 2]-11 Subscript[T, 1] Subscript[T, 2]-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 1,j] Subscript[p, 2,j] Subscript[x, 3,i])/(2 (-1+2 Subscript[T, 2]))-2 Subscript[p, 3,i] Subscript[x, 3,i]+Subscript[p, 3,j] Subscript[x, 3,i]+2 Subscript[p, 1,j] Subscript[p, 3,i] Subscript[x, 1,i] Subscript[x, 3,i]-2 Subscript[p, 1,i] Subscript[p, 3,j] Subscript[x, 1,i] Subscript[x, 3,i]-1/(-1+2 Subscript[T, 2]) (-3 Subscript[T, 1]+4 Subscript[T, 2]-5 Subscript[T, 1] Subscript[T, 2]+10 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+2 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-4 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) Subscript[p, 1,j] Subscript[p, 3,j] Subscript[x, 1,i] Subscript[x, 3,i]+((6-4 Subscript[T, 1]+\!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\)+4 Subscript[T, 2]-13 Subscript[T, 1] Subscript[T, 2]-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 1,j] Subscript[p, 3,i] Subscript[x, 1,j] Subscript[x, 3,i])/((-1+Subscript[T, 1]) (-1+Subscript[T, 1] Subscript[T, 2]))+Subscript[p, 1,i] Subscript[p, 3,j] Subscript[x, 1,j] Subscript[x, 3,i]+((-3+Subscript[T, 1]-\!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\)+6 Subscript[T, 2]-4 Subscript[T, 1] Subscript[T, 2]+12 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-7 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-4 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) Subscript[p, 1,j] Subscript[p, 3,j] Subscript[x, 1,j] Subscript[x, 3,i])/((-1+Subscript[T, 1]) (-1+2 Subscript[T, 2]))+Subscript[p, 2,j] Subscript[p, 3,i] Subscript[x, 2,i] Subscript[x, 3,i]-Subscript[p, 2,i] Subscript[p, 3,j] Subscript[x, 2,i] Subscript[x, 3,i]-1/((-1+Subscript[T, 1]) (-1+2 Subscript[T, 2])) (-1+Subscript[T, 1]+5 Subscript[T, 2]-4 Subscript[T, 1] Subscript[T, 2]+2 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-20 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+10 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-8 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+18 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+11 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+8 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(4\)]\)-22 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(4\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(4\)]\)) Subscript[p, 2,j] Subscript[p, 3,j] Subscript[x, 2,i] Subscript[x, 3,i]-((-3+2 Subscript[T, 1]-Subscript[T, 2]+21 Subscript[T, 1] Subscript[T, 2]-11 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]+14 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-44 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+\!\(
\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\ 
\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-8 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+10 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+33 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)-18 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+8 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(4\)]\)-22 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(4\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(4\)]\)) Subscript[p, 2,j] Subscript[p, 3,i] Subscript[x, 2,j] Subscript[x, 3,i])/((-1+Subscript[T, 1]) (-1+Subscript[T, 2]) (-1+2 Subscript[T, 2]) (-1+Subscript[T, 1] Subscript[T, 2]))+((Subscript[T, 1]+4 Subscript[T, 2]-11 Subscript[T, 1] Subscript[T, 2]-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 2,i] Subscript[p, 3,j] Subscript[x, 2,j] Subscript[x, 3,i])/((-1+Subscript[T, 1]) (-1+2 Subscript[T, 2]))-((-1-3 Subscript[T, 2]+12 Subscript[T, 1] Subscript[T, 2]-\!\(
\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\ 
\*SubscriptBox[\(T\), \(2\)]\)+6 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-11 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-7 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) Subscript[p, 2,j] Subscript[p, 3,j] Subscript[x, 2,j] Subscript[x, 3,i])/((-1+Subscript[T, 1]) (-1+Subscript[T, 2]) (-1+2 Subscript[T, 2]))-Subscript[p, 3,i] Subscript[p, 3,j] \!\(\*SubsuperscriptBox[\(x\), \(3, i\), \(2\)]\)+1/(2 (-1+Subscript[T, 1]) (-1+2 Subscript[T, 2])) (-1+Subscript[T, 1] Subscript[T, 2]) (-2+2 Subscript[T, 1]+4 Subscript[T, 2]-7 Subscript[T, 1] Subscript[T, 2]+2 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-2 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+18 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+8 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)-22 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) \!\(\*SubsuperscriptBox[\(p\), \(3, j\), \(2\)]\) \!\(\*SubsuperscriptBox[\(x\), \(3, i\), \(2\)]\)+((-4+9 Subscript[T, 1]) Subscript[p, 3,j] Subscript[x, 3,j])/Subscript[T, 1]-((-4+3 Subscript[T, 1]-\!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\)+12 Subscript[T, 2]-17 Subscript[T, 1] Subscript[T, 2]+12 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+2 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-4 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) Subscript[p, 1,i] Subscript[p, 3,j] Subscript[x, 1,i] Subscript[x, 3,j])/((-1+Subscript[T, 1]) (-1+2 Subscript[T, 2]) (-1+Subscript[T, 1] Subscript[T, 2]))-((2-4 Subscript[T, 1]+\!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\)) Subscript[p, 1,j] Subscript[p, 3,j] Subscript[x, 1,i] Subscript[x, 3,j])/(-1+Subscript[T, 1] Subscript[T, 2])+((-1-Subscript[T, 2]+Subscript[T, 1] Subscript[T, 2]) Subscript[p, 2,i] Subscript[p, 3,j] Subscript[x, 2,i] Subscript[x, 3,j])/((-1+Subscript[T, 2]) (-1+Subscript[T, 1] Subscript[T, 2]))+((-1+Subscript[T, 2]) (1-Subscript[T, 1]-2 Subscript[T, 2]+\!\(
\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\ 
\*SubscriptBox[\(T\), \(2\)]\)-8 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+26 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-11 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+8 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)-22 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) Subscript[p, 2,j] Subscript[p, 3,j] Subscript[x, 2,i] Subscript[x, 3,j])/((-1+Subscript[T, 1]) (-1+2 Subscript[T, 2]) (-1+Subscript[T, 1] Subscript[T, 2]))+((-3+2 Subscript[T, 1]-2 Subscript[T, 2]+18 Subscript[T, 1] Subscript[T, 2]-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]+8 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-22 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 3,i] Subscript[p, 3,j] Subscript[x, 3,i] Subscript[x, 3,j])/((-1+Subscript[T, 1]) (-1+2 Subscript[T, 2]))-1/(2 (-1+Subscript[T, 1]) (-1+2 Subscript[T, 2])) (-5+4 Subscript[T, 1]+2 Subscript[T, 2]+11 Subscript[T, 1] Subscript[T, 2]-7 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]+8 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-24 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+27 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+8 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)-22 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) \!\(\*SubsuperscriptBox[\(p\), \(3, j\), \(2\)]\) Subscript[x, 3,i] Subscript[x, 3,j]
Subscript[r, 1][-1,i_,j_]:=
3/2+2 Subscript[p, 1,i] Subscript[x, 1,i]-(2 (-2+\!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\)) Subscript[p, 1,j] Subscript[x, 1,i])/\!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\)+Subscript[p, 1,i] Subscript[p, 1,j] \!\(\*SubsuperscriptBox[\(x\), \(1, i\), \(2\)]\)-((-1+Subscript[T, 1]) (1+2 Subscript[T, 1]) \!\(\*SubsuperscriptBox[\(p\), \(1, j\), \(2\)]\) \!\(\*SubsuperscriptBox[\(x\), \(1, i\), \(2\)]\))/(2 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\))-(4 Subscript[p, 1,j] Subscript[x, 1,j])/Subscript[T, 1]+Subscript[p, 1,i] Subscript[p, 1,j] Subscript[x, 1,i] Subscript[x, 1,j]-((1+3 Subscript[T, 1]) \!\(\*SubsuperscriptBox[\(p\), \(1, j\), \(2\)]\) Subscript[x, 1,i] Subscript[x, 1,j])/(2 Subscript[T, 1])+2 Subscript[p, 2,i] Subscript[x, 2,i]-2 Subscript[p, 2,j] Subscript[x, 2,i]-((-2+3 Subscript[T, 1]-4 Subscript[T, 2]+16 Subscript[T, 1] Subscript[T, 2]-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]+8 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-22 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 1,j] Subscript[p, 2,i] Subscript[x, 1,i] Subscript[x, 2,i])/(Subscript[T, 1] (-1+2 Subscript[T, 2]))-((-1-Subscript[T, 1]+8 Subscript[T, 2]-10 Subscript[T, 1] Subscript[T, 2]+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-8 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+15 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-18 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) Subscript[p, 1,i] Subscript[p, 2,j] Subscript[x, 1,i] Subscript[x, 2,i])/((-1+Subscript[T, 1]) Subscript[T, 2] (-1+2 Subscript[T, 2]))+1/(Subscript[T, 1] Subscript[T, 2] (-1+2 Subscript[T, 2])) (-4 Subscript[T, 1]+8 Subscript[T, 2]-14 Subscript[T, 1] Subscript[T, 2]+18 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-12 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+35 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-36 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+8 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)-26 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+18 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) Subscript[p, 1,j] Subscript[p, 2,j] Subscript[x, 1,i] Subscript[x, 2,i]-((-4+3 Subscript[T, 1]+16 Subscript[T, 1] Subscript[T, 2]-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]+8 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-22 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 1,j] Subscript[p, 2,i] Subscript[x, 1,j] Subscript[x, 2,i])/((-1+Subscript[T, 1]) (-1+2 Subscript[T, 2]))+((-1+Subscript[T, 2]) (2-4 Subscript[T, 1]+4 Subscript[T, 2]-13 Subscript[T, 1] Subscript[T, 2]+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]) Subscript[p, 1,j] Subscript[p, 2,j] Subscript[x, 1,j] Subscript[x, 2,i])/((-1+Subscript[T, 1]) Subscript[T, 2])+((1+Subscript[T, 2]) Subscript[p, 2,i] Subscript[p, 2,j] \!\(\*SubsuperscriptBox[\(x\), \(2, i\), \(2\)]\))/Subscript[T, 2]-((-1+Subscript[T, 2]) (3+2 Subscript[T, 2]) \!\(\*SubsuperscriptBox[\(p\), \(2, j\), \(2\)]\) \!\(\*SubsuperscriptBox[\(x\), \(2, i\), \(2\)]\))/(2 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\))-2 Subscript[p, 1,i] Subscript[p, 2,j] Subscript[x, 1,i] Subscript[x, 2,j]+((2+Subscript[T, 1]-8 Subscript[T, 2]+11 Subscript[T, 1] Subscript[T, 2]-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 1,j] Subscript[p, 2,j] Subscript[x, 1,i] Subscript[x, 2,j])/(Subscript[T, 1] (-1+2 Subscript[T, 2]))+Subscript[p, 2,i] Subscript[p, 2,j] Subscript[x, 2,i] Subscript[x, 2,j]-(3 (1+Subscript[T, 2]) \!\(\*SubsuperscriptBox[\(p\), \(2, j\), \(2\)]\) Subscript[x, 2,i] Subscript[x, 2,j])/(2 Subscript[T, 2])-((Subscript[T, 1]+4 Subscript[T, 2]-11 Subscript[T, 1] Subscript[T, 2]-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 1,j] Subscript[p, 2,i] Subscript[x, 3,i])/(2 Subscript[T, 1] (-1+2 Subscript[T, 2]))-(Subscript[p, 1,i] Subscript[p, 2,j] Subscript[x, 3,i])/(2 Subscript[T, 2])+((-Subscript[T, 1]+3 Subscript[T, 1] Subscript[T, 2]+4 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-11 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) Subscript[p, 1,j] Subscript[p, 2,j] Subscript[x, 3,i])/(2 Subscript[T, 1] Subscript[T, 2] (-1+2 Subscript[T, 2]))+2 Subscript[p, 3,i] Subscript[x, 3,i]-1/(\!\(
\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\ 
\*SubscriptBox[\(T\), \(2\)]\ \((\(-1\) + 2\ 
\*SubscriptBox[\(T\), \(2\)])\)\)) (-4+9 Subscript[T, 1]-\!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\)+8 Subscript[T, 2]-18 Subscript[T, 1] Subscript[T, 2]+\!\(
\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\ 
\*SubscriptBox[\(T\), \(2\)]\)-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+15 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-4 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) Subscript[p, 3,j] Subscript[x, 3,i]-((4-4 Subscript[T, 1]+\!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\)+4 Subscript[T, 2]-11 Subscript[T, 1] Subscript[T, 2]-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 1,j] Subscript[p, 3,i] Subscript[x, 1,i] Subscript[x, 3,i])/(Subscript[T, 1] (-1+Subscript[T, 1] Subscript[T, 2]))+((-2 Subscript[T, 1]+4 Subscript[T, 2]-7 Subscript[T, 1] Subscript[T, 2]+10 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+2 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-4 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) Subscript[p, 1,i] Subscript[p, 3,j] Subscript[x, 1,i] Subscript[x, 3,i])/((-1+Subscript[T, 1]) Subscript[T, 1] Subscript[T, 2] (-1+2 Subscript[T, 2]))-1/(\!\(
\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\ 
\*SubscriptBox[\(T\), \(2\)]\ \((\(-1\) + 2\ 
\*SubscriptBox[\(T\), \(2\)])\)\)) (2-6 Subscript[T, 1]+\!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\)+Subscript[T, 1] Subscript[T, 2]+8 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+2 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-4 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) Subscript[p, 1,j] Subscript[p, 3,j] Subscript[x, 1,i] Subscript[x, 3,i]-((6-4 Subscript[T, 1]+\!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\)+4 Subscript[T, 2]-13 Subscript[T, 1] Subscript[T, 2]-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 1,j] Subscript[p, 3,i] Subscript[x, 1,j] Subscript[x, 3,i])/((-1+Subscript[T, 1]) (-1+Subscript[T, 1] Subscript[T, 2]))-(Subscript[p, 1,i] Subscript[p, 3,j] Subscript[x, 1,j] Subscript[x, 3,i])/Subscript[T, 2]+((-4+6 Subscript[T, 1]-2 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\)+8 Subscript[T, 2]-11 Subscript[T, 1] Subscript[T, 2]+4 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]+4 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-11 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) Subscript[p, 1,j] Subscript[p, 3,j] Subscript[x, 1,j] Subscript[x, 3,i])/((-1+Subscript[T, 1]) Subscript[T, 1] Subscript[T, 2] (-1+2 Subscript[T, 2]))+((-2+Subscript[T, 1]-3 Subscript[T, 2]+22 Subscript[T, 1] Subscript[T, 2]-10 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]+14 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-42 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-\!\(
\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\ 
\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-8 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+10 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+33 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)-18 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+8 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(4\)]\)-22 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(4\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(4\)]\)) Subscript[p, 2,j] Subscript[p, 3,i] Subscript[x, 2,i] Subscript[x, 3,i])/((-1+Subscript[T, 1]) Subscript[T, 2] (-1+2 Subscript[T, 2]) (-1+Subscript[T, 1] Subscript[T, 2]))+((-2+Subscript[T, 1]) (Subscript[T, 1]+3 Subscript[T, 2]-12 Subscript[T, 1] Subscript[T, 2]-6 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+17 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+4 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)-3 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)-18 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(4\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(4\)]\)) Subscript[p, 2,i] Subscript[p, 3,j] Subscript[x, 2,i] Subscript[x, 3,i])/((-1+Subscript[T, 1]) Subscript[T, 1] (-1+Subscript[T, 2]) Subscript[T, 2] (-1+2 Subscript[T, 2]))-1/((-1+Subscript[T, 1]) Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) (1+Subscript[T, 1]-\!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\)+5 Subscript[T, 2]-24 Subscript[T, 1] Subscript[T, 2]+11 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-8 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+18 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+11 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+8 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)-22 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) Subscript[p, 2,j] Subscript[p, 3,j] Subscript[x, 2,i] Subscript[x, 3,i]+((-3+2 Subscript[T, 1]-Subscript[T, 2]+21 Subscript[T, 1] Subscript[T, 2]-11 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]+14 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-44 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+\!\(
\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\ 
\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-8 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+10 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+33 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)-18 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+8 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(4\)]\)-22 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(4\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(4\)]\)) Subscript[p, 2,j] Subscript[p, 3,i] Subscript[x, 2,j] Subscript[x, 3,i])/((-1+Subscript[T, 1]) (-1+Subscript[T, 2]) (-1+2 Subscript[T, 2]) (-1+Subscript[T, 1] Subscript[T, 2]))-((Subscript[T, 1]+4 Subscript[T, 2]-11 Subscript[T, 1] Subscript[T, 2]-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 2,i] Subscript[p, 3,j] Subscript[x, 2,j] Subscript[x, 3,i])/((-1+Subscript[T, 1]) Subscript[T, 1] (-1+2 Subscript[T, 2]))-1/((-1+Subscript[T, 1]) Subscript[T, 1] Subscript[T, 2] (-1+2 Subscript[T, 2])) (1+6 Subscript[T, 2]-25 Subscript[T, 1] Subscript[T, 2]+10 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-12 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+29 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+11 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+12 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)-31 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) Subscript[p, 2,j] Subscript[p, 3,j] Subscript[x, 2,j] Subscript[x, 3,i]-((2-Subscript[T, 1]+4 Subscript[T, 2]-23 Subscript[T, 1] Subscript[T, 2]+11 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-8 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+20 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+8 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)-22 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) Subscript[p, 3,i] Subscript[p, 3,j] \!\(\*SubsuperscriptBox[\(x\), \(3, i\), \(2\)]\))/((-1+Subscript[T, 1]) Subscript[T, 1] Subscript[T, 2] (-1+2 Subscript[T, 2]))+((-1+Subscript[T, 1] Subscript[T, 2]) (1+6 Subscript[T, 2]-28 Subscript[T, 1] Subscript[T, 2]+13 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-8 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+18 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+27 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-18 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+16 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)-44 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+18 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) \!\(\*SubsuperscriptBox[\(p\), \(3, j\), \(2\)]\) \!\(\*SubsuperscriptBox[\(x\), \(3, i\), \(2\)]\))/(2 (-1+Subscript[T, 1]) \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\) (-1+2 Subscript[T, 2]))-((-4+9 Subscript[T, 1]) Subscript[p, 3,j] Subscript[x, 3,j])/Subscript[T, 1]+((-4+3 Subscript[T, 1]-\!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\)+12 Subscript[T, 2]-17 Subscript[T, 1] Subscript[T, 2]+12 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+2 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-4 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) Subscript[p, 1,i] Subscript[p, 3,j] Subscript[x, 1,i] Subscript[x, 3,j])/((-1+Subscript[T, 1]) (-1+2 Subscript[T, 2]) (-1+Subscript[T, 1] Subscript[T, 2]))-((2+Subscript[T, 1]-8 Subscript[T, 2]+11 Subscript[T, 1] Subscript[T, 2]-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-4 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 1,j] Subscript[p, 3,j] Subscript[x, 1,i] Subscript[x, 3,j])/(Subscript[T, 1] (-1+2 Subscript[T, 2]))-((-1-Subscript[T, 2]+Subscript[T, 1] Subscript[T, 2]) Subscript[p, 2,i] Subscript[p, 3,j] Subscript[x, 2,i] Subscript[x, 3,j])/((-1+Subscript[T, 2]) (-1+Subscript[T, 1] Subscript[T, 2]))-((-2+Subscript[T, 1]) (1+2 Subscript[T, 2]-9 Subscript[T, 1] Subscript[T, 2]-4 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 2,j] Subscript[p, 3,j] Subscript[x, 2,i] Subscript[x, 3,j])/((-1+Subscript[T, 1]) (-1+2 Subscript[T, 2]))-((-3+2 Subscript[T, 1]-2 Subscript[T, 2]+18 Subscript[T, 1] Subscript[T, 2]-9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]+8 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-22 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+9 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)) Subscript[p, 3,i] Subscript[p, 3,j] Subscript[x, 3,i] Subscript[x, 3,j])/((-1+Subscript[T, 1]) (-1+2 Subscript[T, 2]))+((1+6 Subscript[T, 2]-31 Subscript[T, 1] Subscript[T, 2]+15 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) Subscript[T, 2]-8 \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+16 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+45 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)-27 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(2\)]\)+24 Subscript[T, 1] \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)-66 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(2\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)+27 \!\(\*SubsuperscriptBox[\(T\), \(1\), \(3\)]\) \!\(\*SubsuperscriptBox[\(T\), \(2\), \(3\)]\)) \!\(\*SubsuperscriptBox[\(p\), \(3, j\), \(2\)]\) Subscript[x, 3,i] Subscript[x, 3,j])/(2 (-1+Subscript[T, 1]) Subscript[T, 1] Subscript[T, 2] (-1+2 Subscript[T, 2]))


(* ::Input::Initialization:: *)
g2px[\[ScriptCapitalE]_]:=Module[{\[Lambda]},Expand[\[ScriptCapitalE]/.Subscript[g, \[Alpha]_,i_,j_]:>\[Lambda] Subscript[p, \[Alpha],i] Subscript[x, \[Alpha],j]]/.\[Lambda]^k_.:>1/k!]


(* ::Input::Initialization:: *)
{SuperStar[p],SuperStar[x],SuperStar[\[Pi]],SuperStar[\[Xi]]}={\[Pi],\[Xi],p,x};  SuperStar[(Subscript[u_, i__])]:=Subscript[(SuperStar[u]), i];


(* ::Input::Initialization:: *)
\!\(\*SubscriptBox[\(Zip\), \({}\)]\)[\[ScriptCapitalE]_]:=\[ScriptCapitalE];
\!\(\*SubscriptBox[\(Zip\), \({\[Zeta]_, \[Zeta]s___}\)]\)[\[ScriptCapitalE]_] := (Collect[\[ScriptCapitalE]//\!\(\*SubscriptBox[\(Zip\), \({\[Zeta]s}\)]\),\[Zeta]] /. f_. \[Zeta]^d_.:>(D[f,{SuperStar[\[Zeta]],d}]))/.SuperStar[\[Zeta]]->0


(* ::Input::Initialization:: *)
px2g[\[ScriptCapitalE]_]:=Module[{ps,xs,Q},
ps=Union[Cases[\[ScriptCapitalE],Subscript[p, __],\[Infinity]]];
xs=Union[Cases[\[ScriptCapitalE],Subscript[x, __],\[Infinity]]];
Q=Sum[SuperStar[p0] SuperStar[x0] Subscript[g, p0[[2]],x0[[2]],p0[[3]],x0[[3]]],{p0,ps},{x0,xs}];
Expand[Subscript[Zip, ps\[Union]xs][\[ScriptCapitalE] E^Q]/.Subscript[g, \[Alpha]_,\[Beta]_,i_,j_]:>If[\[Alpha]===\[Beta],Subscript[g, \[Alpha],i,j],0]]
]


(* ::Input::Initialization:: *)
Subscript[R, 1][1,i_,j_]:=Evaluate[px2g[Subscript[r, 1][1,i,j]]+(Coefficient[Subscript[r, 1][1,i,j]/.t:Subscript[(x|p), __]:>\[Lambda] t, \[Lambda]^3]/.Subscript[x, 3,\[Alpha]_] Subscript[p, 1,\[Beta]_] Subscript[p, 2,\[Gamma]_]:>Subscript[y, \[Alpha],\[Beta],\[Gamma]])]
Subscript[R, 1][-1,i_,j_]:=Evaluate[px2g[Subscript[r, 1][-1,i,j]]+(Coefficient[Subscript[r, 1][-1,i,j]/.t:Subscript[(x|p), __]:>\[Lambda] t, \[Lambda]^3]/.Subscript[x, 3,\[Alpha]_] Subscript[p, 1,\[Beta]_] Subscript[p, 2,\[Gamma]_]:>Subscript[y, \[Alpha],\[Beta],\[Gamma]])]


(* ::Input::Initialization:: *)
\[Theta][1,i_,j_,\[Alpha]_,\[Beta]_,\[Gamma]_]:=Evaluate[Subscript[r, 0][1,i,j]/.{Subscript[p, 3,j_]:>Subscript[g, 3,j,\[Alpha]],Subscript[x, 1,i_]:>Subscript[g, 1,\[Beta],i],Subscript[x, 2,i_]:>Subscript[g, 2,\[Gamma],i]}] ;(* The \[Theta] graph with light (pxx) vertex  at (1,i,j) and unspecified heavy (xpp) vertex *)
\[Theta][-1,i_,j_,\[Alpha]_,\[Beta]_,\[Gamma]_]:=Evaluate[Subscript[r, 0][-1,i,j]/.{Subscript[p, 3,j_]:>Subscript[g, 3,j,\[Alpha]],Subscript[x, 1,i_]:>Subscript[g, 1,\[Beta],i],Subscript[x, 2,i_]:>Subscript[g, 2,\[Gamma],i]}] ;(* The \[Theta] graph with light (pxx) vertex  at (-1,i,j) and unspecified heavy (xpp) vertex *)
\[Theta][1,5,8,21,22,23]


(* ::Input::Initialization:: *)
Subscript[T, 3]=Subscript[T, 1] Subscript[T, 2];
CF[\[ScriptCapitalE]_]:=Factor@Together[\[ScriptCapitalE]];
\[Lambda][K_]:=Module[{Cs,\[CurlyPhi],n,A,s,i,j,k,\[CapitalDelta],G,gEval,Y,yEval,c,\[Lambda]1},
{Cs,\[CurlyPhi]}=Rot[K]; n=Length[Cs];
A=IdentityMatrix[2n+1];
Cases[Cs,{s_,i_,j_}:>(A[[{i,j},{i+1,j+1}]]+=({
 {-T^s, T^s-1},
 {0, -1}
}))];
\[CapitalDelta]=T^((-Total[\[CurlyPhi]]-Total[Cs[[All,1]]])/2) Det[A];
G=Inverse[A];
gEval[\[ScriptCapitalE]_]:=CF[\[ScriptCapitalE]/.Subscript[g, \[Nu]_,\[Alpha]_,\[Beta]_]:>(G[[\[Alpha],\[Beta]]]/.T->Subscript[T, \[Nu]])];
Y[\[Alpha]_,\[Beta]_,\[Gamma]_]:=Y[\[Alpha],\[Beta],\[Gamma]]=Sum[{s,i,j}=c; (* The expectation value of Subscript[x, 3,\[Alpha]] Subscript[p, 1,\[Beta]] Subscript[p, 2,\[Gamma]]*)
\[Theta][s,i,j,\[Alpha],\[Beta],\[Gamma]],
{c,Cs}];
yEval[\[ScriptCapitalE]_]:=\[ScriptCapitalE]/.Subscript[y, \[Alpha]_,\[Beta]_,\[Gamma]_]:>Y[\[Alpha],\[Beta],\[Gamma]];
\[Lambda]1=\!\(
\*SubsuperscriptBox[\(\[Sum]\), \(k = 1\), \(n\)]\(
\*SubscriptBox[\(R\), \(1\)] @@ Cs[[k]]\)\) - \!\(
\*SubsuperscriptBox[\(\[Sum]\), \(k = 1\), \(2  n\)]\(\[CurlyPhi][[k]] \((
\*SubscriptBox[\(g\), \(1, k, k\)] + 
\*SubscriptBox[\(g\), \(2, k, k\)] + 
\*SubscriptBox[\(g\), \(3, k, k\)] - 3/2)\)\)\);
{\[CapitalDelta],(\[CapitalDelta]^2/.T->Subscript[T, 1])(\[CapitalDelta]^2/.T->Subscript[T, 2])(\[CapitalDelta]^2/.T->Subscript[T, 3])\[Lambda]1}//yEval//gEval
];


(* ::Input::Initialization:: *)
Subscript[\[Delta], i_,j_]:=If[i===j,1,0];


(* ::Input::Initialization:: *)
Subscript[gRules, s_,i_,j_]:={
Subscript[g, \[Nu]_,i,\[Beta]_]:>Subscript[\[Delta], i,\[Beta]]+\!\(
\*SubsuperscriptBox[\(T\), \(\[Nu]\), \(s\)] 
\*SubscriptBox[\(g\), \(\[Nu], 
\*SuperscriptBox[\(i\), \(+\)], \[Beta]\)]\)+(1-\!\(\*SubsuperscriptBox[\(T\), \(\[Nu]\), \(s\)]\))Subscript[g, \[Nu],SuperPlus[j],\[Beta]],Subscript[g, \[Nu]_,j,\[Beta]_]:>Subscript[\[Delta], j,\[Beta]]+Subscript[g, \[Nu],SuperPlus[j],\[Beta]],
Subscript[g, \[Nu]_,\[Alpha]_,i]:>\!\(
\*SubsuperscriptBox[\(T\), \(\[Nu]\), \(-s\)] \((
\*SubscriptBox[\(g\), \(\[Nu], \[Alpha], 
\*SuperscriptBox[\(i\), \(+\)]\)] - 
\*SubscriptBox[\(\[Delta]\), \(\[Alpha], 
\*SuperscriptBox[\(i\), \(+\)]\)])\)\),Subscript[g, \[Nu]_,\[Alpha]_,j]:>Subscript[g, \[Nu],\[Alpha],SuperPlus[j]]-(1-\!\(\*SubsuperscriptBox[\(T\), \(\[Nu]\), \(s\)]\))Subscript[g, \[Nu],\[Alpha],i]-Subscript[\[Delta], \[Alpha],SuperPlus[j]]
};
gRules[Cs_List]:=Union@@((Subscript[gRules, Sequence@@#])&/@Cs)


(* ::Input::Initialization:: *)
Y[\[Alpha]_,\[Beta]_,\[Gamma]_]:=Module[{s,i,j},Sum[{s,i,j}=c;\[Theta][s,i,j,\[Alpha],\[Beta],\[Gamma]],{c,Cs}]];
yEval[\[ScriptCapitalE]_]:=(\[ScriptCapitalE]/.Subscript[y, \[Alpha]_,\[Beta]_,\[Gamma]_]:>Y[\[Alpha],\[Beta],\[Gamma]]);



