(* ::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"];
Once[<<KnotTheory`; <<../APAI/Rot.m];
TS=T S;
SuperPlus[(SuperPlus[\[Alpha]_])]:=\!\(\*SuperscriptBox[\(\[Alpha]\), \("\<++\>"\)]\);    (* this is for cosmetic reasons only *)
Subscript[\[Delta], i_,j_]:=If[i==j,1,0];


(* ::Input::Initialization:: *)
CF[\[ScriptCapitalE]_]:=Factor@Together[\[ScriptCapitalE]];


(* ::Input::Initialization:: *)
gEval[\[ScriptCapitalE]_]:=CF[\[ScriptCapitalE]/.SuperPlus[\[Alpha]_]:>\[Alpha]+1/.
{Subscript[g, 1,\[Alpha]_,\[Beta]_]:>G[[\[Alpha],\[Beta]]], Subscript[g, 2,\[Alpha]_,\[Beta]_]:>(G[[\[Alpha],\[Beta]]]/.T->S),Subscript[g, 3,\[Alpha]_,\[Beta]_]:>(G[[\[Alpha],\[Beta]]]/.T->TS)}];


(* ::Input::Initialization:: *)
Clear[Y]
Y[\[Alpha]_,\[Beta]_,\[Gamma]_]:=Y[\[Alpha],\[Beta],\[Gamma]]=Sum[{s,i,j}=c;
Subscript[g, 3,\[Alpha],i](S^s (T^s-1)Subscript[g, 1,SuperPlus[j],\[Beta]] Subscript[g, 2,SuperPlus[i],\[Gamma]]+(S^s-1)T^s Subscript[g, 1,SuperPlus[i],\[Beta]] Subscript[g, 2,SuperPlus[j],\[Gamma]]+(S^s+T^s-2 TS^s)Subscript[g, 1,SuperPlus[j],\[Beta]] Subscript[g, 2,SuperPlus[j],\[Gamma]]),
{c,Cs}]


(* ::Input::Initialization:: *)
yEval[\[ScriptCapitalE]_]:=CF[\[ScriptCapitalE]/.Subscript[y, \[Alpha]_,\[Beta]_,\[Gamma]_]:>Y[\[Alpha],\[Beta],\[Gamma]]]


(* ::Input::Initialization:: *)
Subscript[gRules, s_,i_,j_]:={
Subscript[g, 1,i,\[Beta]_]:>Subscript[\[Delta], i,\[Beta]]+T^s Subscript[g, 1,SuperPlus[i],\[Beta]]+(1-T^s)Subscript[g, 1,SuperPlus[j],\[Beta]],Subscript[g, 1,j,\[Beta]_]:>Subscript[\[Delta], j,\[Beta]]+Subscript[g, 1,SuperPlus[j],\[Beta]],
Subscript[g, 1,\[Alpha]_,i]:>T^-s (Subscript[g, 1,\[Alpha],SuperPlus[i]]-Subscript[\[Delta], \[Alpha],SuperPlus[i]]),Subscript[g, 1,\[Alpha]_,j]:>Subscript[g, 1,\[Alpha],SuperPlus[j]]-(1-T^s)Subscript[g, 1,\[Alpha],i]-Subscript[\[Delta], \[Alpha],SuperPlus[j]],
Subscript[g, 2,i,\[Beta]_]:>Subscript[\[Delta], i,\[Beta]]+S^s Subscript[g, 2,SuperPlus[i],\[Beta]]+(1-S^s)Subscript[g, 2,SuperPlus[j],\[Beta]],Subscript[g, 2,j,\[Beta]_]:>Subscript[\[Delta], j,\[Beta]]+Subscript[g, 2,SuperPlus[j],\[Beta]],
Subscript[g, 2,\[Alpha]_,i]:>S^-s (Subscript[g, 2,\[Alpha],SuperPlus[i]]-Subscript[\[Delta], \[Alpha],SuperPlus[i]]),Subscript[g, 2,\[Alpha]_,j]:>Subscript[g, 2,\[Alpha],SuperPlus[j]]-(1-S^s)Subscript[g, 2,\[Alpha],i]-Subscript[\[Delta], \[Alpha],SuperPlus[j]],
Subscript[g, 3,i,\[Beta]_]:>Subscript[\[Delta], i,\[Beta]]+TS^s Subscript[g, 3,SuperPlus[i],\[Beta]]+(1-TS^s)Subscript[g, 3,SuperPlus[j],\[Beta]],Subscript[g, 3,j,\[Beta]_]:>Subscript[\[Delta], j,\[Beta]]+Subscript[g, 3,SuperPlus[j],\[Beta]],
Subscript[g, 3,\[Alpha]_,i]:>TS^-s (Subscript[g, 3,\[Alpha],SuperPlus[i]]-Subscript[\[Delta], \[Alpha],SuperPlus[i]]),Subscript[g, 3,\[Alpha]_,j]:>Subscript[g, 3,\[Alpha],SuperPlus[j]]-(1-TS^s)Subscript[g, 3,\[Alpha],i]-Subscript[\[Delta], \[Alpha],SuperPlus[j]]
}


(* ::Input::Initialization:: *)
Subscript[yRules, s_,i_,j_]:={
Subscript[y, i,\[Beta]_,\[Gamma]_]:>TS^s Subscript[y, SuperPlus[i],\[Beta],\[Gamma]]+(1-TS^s)Subscript[y, SuperPlus[j],\[Beta],\[Gamma]]+(S^s (T^s-1)Subscript[g, 1,SuperPlus[j],\[Beta]] Subscript[g, 2,SuperPlus[i],\[Gamma]]+(S^s-1)T^s Subscript[g, 1,SuperPlus[i],\[Beta]] Subscript[g, 2,SuperPlus[j],\[Gamma]]+(S^s+T^s-2TS^s)Subscript[g, 1,SuperPlus[j],\[Beta]] Subscript[g, 2,SuperPlus[j],\[Gamma]]),
Subscript[y, j,\[Beta]_,\[Gamma]_]:>Subscript[y, SuperPlus[j],\[Beta],\[Gamma]],
Subscript[y, \[Alpha]_,i,\[Gamma]_]:>T^-s Subscript[y, \[Alpha],SuperPlus[i],\[Gamma]]+(1-S^s)Subscript[g, 3,\[Alpha],i] Subscript[g, 2,SuperPlus[j],\[Gamma]],
Subscript[y, \[Alpha]_,j,\[Gamma]_]:>Subscript[y, \[Alpha],SuperPlus[j],\[Gamma]]-(1-T^s)Subscript[y, \[Alpha],i,\[Gamma]]-Subscript[g, 3,\[Alpha],i](S^s (T^s-1)Subscript[g, 2,SuperPlus[i],\[Gamma]]+(S^s+T^s-2 TS^s)Subscript[g, 2,SuperPlus[j],\[Gamma]]),
Subscript[y, \[Alpha]_,\[Beta]_,i]:>S^-s Subscript[y, \[Alpha],\[Beta],SuperPlus[i]]+(1-T^s)Subscript[g, 3,\[Alpha],i] Subscript[g, 1,SuperPlus[j],\[Beta]],
Subscript[y, \[Alpha]_,\[Beta]_,j]:>Subscript[y, \[Alpha],\[Beta],SuperPlus[j]]-(1-S^s)Subscript[y, \[Alpha],\[Beta],i]-Subscript[g, 3,\[Alpha],i](T^s (S^s-1)Subscript[g, 1,SuperPlus[i],\[Beta]]+(S^s+T^s-2 TS^s)Subscript[g, 1,\[Beta],SuperPlus[j]])
}



