(* ::Package:: *)

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

(* ::Input::Initialization:: *)
SetDirectory["C:\\drorbn\\AcademicPensieve\\Talks\\MonteVerita-2604"];


(* ::Input::Initialization:: *)
Subscript[T, 3]=Subscript[T, 1] Subscript[T, 2];


(* ::Input::Initialization:: *)
CF[\[ScriptCapitalE]_] := Expand@Collect[\[ScriptCapitalE],Subscript[g, __],F]/.F->Factor;


(* ::Input::Initialization:: *)
Subscript[F, 1][{s_,i_,j_}]=CF[s(1/2-Subscript[g, 3\[InvisibleComma]i\[InvisibleComma]i]+\!\(
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] 
\*SubscriptBox[\(g\), \(1\[InvisibleComma]i\[InvisibleComma]i\)] 
\*SubscriptBox[\(g\), \(2\[InvisibleComma]j\[InvisibleComma]i\)]\)-Subscript[g, 1\[InvisibleComma]i\[InvisibleComma]i] Subscript[g, 2\[InvisibleComma]j\[InvisibleComma]j]-(\!\(
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] - 1\))Subscript[g, 2\[InvisibleComma]j\[InvisibleComma]i] Subscript[g, 3\[InvisibleComma]i\[InvisibleComma]i]+2Subscript[g, 2\[InvisibleComma]j\[InvisibleComma]j] Subscript[g, 3\[InvisibleComma]i\[InvisibleComma]i]-(1-\!\(\*SubsuperscriptBox[\(T\), \(3\), \(s\)]\))Subscript[g, 2\[InvisibleComma]j\[InvisibleComma]i] Subscript[g, 3\[InvisibleComma]j\[InvisibleComma]i]-Subscript[g, 2\[InvisibleComma]i\[InvisibleComma]i] Subscript[g, 3\[InvisibleComma]j\[InvisibleComma]j]-\!\(
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] 
\*SubscriptBox[\(g\), \(2\[InvisibleComma]j\[InvisibleComma]i\)] 
\*SubscriptBox[\(g\), \(3\[InvisibleComma]j\[InvisibleComma]j\)]\)+Subscript[g, 1\[InvisibleComma]i\[InvisibleComma]i] Subscript[g, 3\[InvisibleComma]j\[InvisibleComma]j]+((\!\(
\*SubsuperscriptBox[\(T\), \(1\), \(s\)] - 1\))Subscript[g, 1\[InvisibleComma]j\[InvisibleComma]i](\!\(
\*SubsuperscriptBox[\(T\), \(2\), \(2  s\)] 
\*SubscriptBox[\(g\), \(2\[InvisibleComma]j\[InvisibleComma]i\)]\)-\!\(
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] 
\*SubscriptBox[\(g\), \(2\[InvisibleComma]j\[InvisibleComma]j\)]\)+\!\(
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] 
\*SubscriptBox[\(g\), \(3\[InvisibleComma]j\[InvisibleComma]j\)]\))+(\!\(
\*SubsuperscriptBox[\(T\), \(3\), \(s\)] - 1\))Subscript[g, 3\[InvisibleComma]j\[InvisibleComma]i](1-\!\(
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] 
\*SubscriptBox[\(g\), \(1\[InvisibleComma]i\[InvisibleComma]i\)]\)-(\!\(
\*SubsuperscriptBox[\(T\), \(1\), \(s\)] - 1\))(\!\(
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] + 1\)) Subscript[g, 1\[InvisibleComma]j\[InvisibleComma]i]+(\!\(
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] - 2\))Subscript[g, 2\[InvisibleComma]j\[InvisibleComma]j]+Subscript[g, 2\[InvisibleComma]i\[InvisibleComma]j]))/(\!\(
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] - 1\)))];


(* ::Input::Initialization:: *)
Subscript[F, 2][{s0_,i0_,j0_},{s1_,i1_,j1_}]:=CF[s1(\!\(
\*SubsuperscriptBox[\(T\), \(1\), \(s0\)] - 1\))(\!\(
\*SubsuperscriptBox[\(T\), \(2\), \(s1\)] - 1\))^-1 (\!\(
\*SubsuperscriptBox[\(T\), \(3\), \(s1\)] - 1\))Subscript[g, 1,j1,i0] Subscript[g, 3,j0,i1]( (\!\(
\*SubsuperscriptBox[\(T\), \(2\), \(s0\)] 
\*SubscriptBox[\(g\), \(2, i1, i0\)]\)-Subscript[g, 2,i1,j0])- (\!\(
\*SubsuperscriptBox[\(T\), \(2\), \(s0\)] 
\*SubscriptBox[\(g\), \(2, j1, i0\)]\)-Subscript[g, 2,j1,j0]))]


(* ::Input::Initialization:: *)
Subscript[F, 3][\[CurlyPhi]_,k_]=-\[CurlyPhi]/2+\[CurlyPhi] Subscript[g, 3\[InvisibleComma]k\[InvisibleComma]k];


(* ::Input::Initialization:: *)
Once[<<KnotTheory`; <<Rot.m; << PolyPlot.m];


(* ::Input::Initialization:: *)
\[CapitalTheta][K_]:=Module[{Cs,\[CurlyPhi],n,A,\[CapitalDelta],G,ev,\[Theta]},
{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];
ev[\[ScriptCapitalE]_]:=Factor[\[ScriptCapitalE]/.Subscript[g, \[Nu]_,\[Alpha]_,\[Beta]_]:>(G[[\[Alpha],\[Beta]]]/.T->Subscript[T, \[Nu]])];
\[Theta]=ev[\!\(
\*SubsuperscriptBox[\(\[Sum]\), \(k = 1\), \(n\)]\(
\(\*SubscriptBox[\(F\), \(1\)]\)[Cs[[k]]]\)\)];
\[Theta]+=ev[\!\(
\*SubsuperscriptBox[\(\[Sum]\), \(k1 = 1\), \(n\)]\(
\*SubsuperscriptBox[\(\[Sum]\), \(k2 = 1\), \(n\)]
\(\*SubscriptBox[\(F\), \(2\)]\)[Cs[[\(k1\)\(]\)], Cs[[\(k2\)\(]\)]]\)\)];
\[Theta]+=ev[\!\(
\*SubsuperscriptBox[\(\[Sum]\), \(k = 1\), \(2  n\)]\(
\(\*SubscriptBox[\(F\), \(3\)]\)[\[CurlyPhi][[\(k\)\(]\)], k]\)\)];
Factor@{\[CapitalDelta],(\[CapitalDelta]/.T->Subscript[T, 1])(\[CapitalDelta]/.T->Subscript[T, 2])(\[CapitalDelta]/.T->Subscript[T, 3])\[Theta]}];


(* ::Input::Initialization:: *)
\[ScriptCapitalL][Subscript[X, i_,j_][s_]]:=\!\(
\*SubsuperscriptBox[\(T\), \(3\), \(s\)] \(\[DoubleStruckCapitalE][CF@Plus[\[IndentingNewLine]
\*SubsuperscriptBox[\(\[Sum]\), \(\[Nu] = 1\), \(3\)]\((
\*SubscriptBox[\(x\), \(\[Nu]\[InvisibleComma]i\)] \((
\*SubscriptBox[\(p\), \(\[Nu]\[InvisibleComma]
\*SuperscriptBox[\(i\), \(+\)]\)] - 
\*SubscriptBox[\(p\), \(\[Nu]\[InvisibleComma]i\)])\) + 
\*SubscriptBox[\(x\), \(\[Nu]\[InvisibleComma]j\)] \((
\*SubscriptBox[\(p\), \(\[Nu]\[InvisibleComma]
\*SuperscriptBox[\(j\), \(+\)]\)] - 
\*SubscriptBox[\(p\), \(\[Nu]\[InvisibleComma]j\)])\) + \((
\*SubsuperscriptBox[\(T\), \(\[Nu]\), \(s\)] - 1)\) 
\*SubscriptBox[\(x\), \(\[Nu]\[InvisibleComma]i\)] \((
\*SubscriptBox[\(p\), \(\[Nu]\[InvisibleComma]
\*SuperscriptBox[\(i\), \(+\)]\)] - 
\*SubscriptBox[\(p\), \(\[Nu]\[InvisibleComma]
\*SuperscriptBox[\(j\), \(+\)]\)])\))\), \[IndentingNewLine]\((
\*SubsuperscriptBox[\(T\), \(1\), \(s\)] - 1)\) 
\*SubscriptBox[\(p\), \(3\[InvisibleComma]j\)] 
\*SubscriptBox[\(x\), \(1\[InvisibleComma]i\)] \((
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] 
\*SubscriptBox[\(x\), \(2\[InvisibleComma]i\)] - 
\*SubscriptBox[\(x\), \(2\[InvisibleComma]j\)])\), \[IndentingNewLine]\[Epsilon]\ s \((
\*SubsuperscriptBox[\(T\), \(3\), \(s\)] - 1)\) 
\*SubscriptBox[\(p\), \(1\[InvisibleComma]j\)] \((
\*SubscriptBox[\(p\), \(2\[InvisibleComma]i\)] - 
\*SubscriptBox[\(p\), \(2\[InvisibleComma]j\)])\) 
\*SubscriptBox[\(x\), \(3\[InvisibleComma]i\)]/\((
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] - 1)\), \[IndentingNewLine]\[Epsilon]\ s \((1/2 + 
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] 
\*SubscriptBox[\(p\), \(1\[InvisibleComma]i\)] 
\*SubscriptBox[\(p\), \(2\[InvisibleComma]j\)] 
\*SubscriptBox[\(x\), \(1\[InvisibleComma]i\)] 
\*SubscriptBox[\(x\), \(2\[InvisibleComma]i\)] - 
\*SubscriptBox[\(p\), \(1\[InvisibleComma]i\)] 
\*SubscriptBox[\(p\), \(2\[InvisibleComma]j\)] 
\*SubscriptBox[\(x\), \(1\[InvisibleComma]i\)] 
\*SubscriptBox[\(x\), \(2\[InvisibleComma]j\)] - 
\*SubscriptBox[\(p\), \(3\[InvisibleComma]i\)] 
\*SubscriptBox[\(x\), \(3\[InvisibleComma]i\)] - \((
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] - 1)\) 
\*SubscriptBox[\(p\), \(2\[InvisibleComma]j\)] 
\*SubscriptBox[\(p\), \(3\[InvisibleComma]i\)] 
\*SubscriptBox[\(x\), \(2\[InvisibleComma]i\)] 
\*SubscriptBox[\(x\), \(3\[InvisibleComma]i\)] + \((
\*SubsuperscriptBox[\(T\), \(3\), \(s\)] - 1)\) 
\*SubscriptBox[\(p\), \(2\[InvisibleComma]j\)] 
\*SubscriptBox[\(p\), \(3\[InvisibleComma]j\)] 
\*SubscriptBox[\(x\), \(2\[InvisibleComma]i\)] 
\*SubscriptBox[\(x\), \(3\[InvisibleComma]i\)] + 2\ 
\*SubscriptBox[\(p\), \(2\[InvisibleComma]j\)] 
\*SubscriptBox[\(p\), \(3\[InvisibleComma]i\)] 
\*SubscriptBox[\(x\), \(2\[InvisibleComma]j\)] 
\*SubscriptBox[\(x\), \(3\[InvisibleComma]i\)] + 
\*SubscriptBox[\(p\), \(1\[InvisibleComma]i\)] 
\*SubscriptBox[\(p\), \(3\[InvisibleComma]j\)] 
\*SubscriptBox[\(x\), \(1\[InvisibleComma]i\)] 
\*SubscriptBox[\(x\), \(3\[InvisibleComma]j\)] - 
\*SubscriptBox[\(p\), \(2\[InvisibleComma]i\)] 
\*SubscriptBox[\(p\), \(3\[InvisibleComma]j\)] 
\*SubscriptBox[\(x\), \(2\[InvisibleComma]i\)] 
\*SubscriptBox[\(x\), \(3\[InvisibleComma]j\)] - 
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] 
\*SubscriptBox[\(p\), \(2\[InvisibleComma]j\)] 
\*SubscriptBox[\(p\), \(3\[InvisibleComma]j\)] 
\*SubscriptBox[\(x\), \(2\[InvisibleComma]i\)] 
\*SubscriptBox[\(x\), \(3\[InvisibleComma]j\)] + \((\((
\*SubsuperscriptBox[\(T\), \(1\), \(s\)] - 1)\) 
\*SubscriptBox[\(p\), \(1\[InvisibleComma]j\)] 
\*SubscriptBox[\(x\), \(1\[InvisibleComma]i\)] \((
\*SubsuperscriptBox[\(T\), \(2\), \(2  s\)] 
\*SubscriptBox[\(p\), \(2\[InvisibleComma]j\)] 
\*SubscriptBox[\(x\), \(2\[InvisibleComma]i\)] - 
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] 
\*SubscriptBox[\(p\), \(2\[InvisibleComma]j\)] 
\*SubscriptBox[\(x\), \(2\[InvisibleComma]j\)] - \((
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] + 1)\) \((
\*SubsuperscriptBox[\(T\), \(3\), \(s\)] - 1)\) 
\*SubscriptBox[\(p\), \(3\[InvisibleComma]j\)] 
\*SubscriptBox[\(x\), \(3\[InvisibleComma]i\)] + 
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] 
\*SubscriptBox[\(p\), \(3\[InvisibleComma]j\)] 
\*SubscriptBox[\(x\), \(3\[InvisibleComma]j\)])\) + \((
\*SubsuperscriptBox[\(T\), \(3\), \(s\)] - 1)\) 
\*SubscriptBox[\(p\), \(3\[InvisibleComma]j\)] 
\*SubscriptBox[\(x\), \(3\[InvisibleComma]i\)] \((1 - 
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] 
\*SubscriptBox[\(p\), \(1\[InvisibleComma]i\)] 
\*SubscriptBox[\(x\), \(1\[InvisibleComma]i\)] + 
\*SubscriptBox[\(p\), \(2\[InvisibleComma]i\)] 
\*SubscriptBox[\(x\), \(2\[InvisibleComma]j\)] + \((
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] - 2)\) 
\*SubscriptBox[\(p\), \(2\[InvisibleComma]j\)] 
\*SubscriptBox[\(x\), \(2\[InvisibleComma]j\)])\))\)/\((
\*SubsuperscriptBox[\(T\), \(2\), \(s\)] - 1)\))\)]]\)\)


(* ::Input::Initialization:: *)
\[ScriptCapitalL][Subscript[C, i_][\[CurlyPhi]_]]:=\!\(
\*SubsuperscriptBox[\(T\), \(3\), \(\[CurlyPhi]\)] \(\[DoubleStruckCapitalE][
\*SubsuperscriptBox[\(\[Sum]\), \(\[Nu] = 1\), \(3\)]
\*SubscriptBox[\(x\), \(\[Nu]\[InvisibleComma]i\)] \((
\*SubscriptBox[\(p\), \(\[Nu]\[InvisibleComma]
\*SuperscriptBox[\(i\), \(+\)]\)] - 
\*SubscriptBox[\(p\), \(\[Nu]\[InvisibleComma]i\)])\) + \[Epsilon]\ \[CurlyPhi] \((
\*SubscriptBox[\(p\), \(3\[InvisibleComma]i\)] 
\*SubscriptBox[\(x\), \(3\[InvisibleComma]i\)] - 1/2)\)]\)\)
