(* ::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`; <<Rot.m];
<< FormalGaussianIntegration.m;
SuperPlus[i_]:=i+1;


(* ::Input::Initialization:: *)
Subscript[T, 3]=Subscript[T, 1] Subscript[T, 2];
\[ScriptCapitalS]={Subscript[x, __],Subscript[p, __]};
q[s_,i_,j_]:=Sum[
Subscript[x, \[Nu],i] (Subscript[p, \[Nu],SuperPlus[i]]-Subscript[p, \[Nu],i])+Subscript[x, \[Nu],j] (Subscript[p, \[Nu],SuperPlus[j]]-Subscript[p, \[Nu],j])+(\!\(
\*SubsuperscriptBox[\(T\), \(\[Nu]\), \(s\)] - 1\))Subscript[x, \[Nu],i](Subscript[p, \[Nu],SuperPlus[i]]-Subscript[p, \[Nu],SuperPlus[j]]),
{\[Nu],3}];
\[ScriptCapitalL][Subscript[X, i_,j_][s_]]:=\!\(
\*SubsuperscriptBox[\(T\), \(3\), \(s\)] \(\[DoubleStruckCapitalE][q[s, i, j] + 
\*SuperscriptBox[\(B\), \(-1\)] 
\(\*SubscriptBox[\(r\), \(0\)]\)[s, i, j] + \[Epsilon]\ B\ 
\(\*SubscriptBox[\(r\), \(1\)]\)[s, i, j] + \[Epsilon]\ 
\(\*SubscriptBox[\(r\), \(42\)]\)[s, i, j] + 
\*SuperscriptBox[\(O[\[Epsilon]]\), \(2\)]]\)\);
(*Subscript[\[Gamma], 1][\[CurlyPhi]_,k_]:=\[CurlyPhi](3/2-Subscript[x, 1,k]Subscript[p, 1,k]-Subscript[x, 2,k]Subscript[p, 2,k]-Subscript[x, 3,k]Subscript[p, 3,k]);*)
\[ScriptCapitalL][Subscript[C, k_][0]]:=\[DoubleStruckCapitalE][Sum[Subscript[x, \[Nu],k](Subscript[p, \[Nu],SuperPlus[k]]-Subscript[p, \[Nu],k]),{\[Nu],3}]+O[\[Epsilon]]^2 ];
\[ScriptCapitalL][Subscript[C, k_][\[CurlyPhi]_]]:=\!\(
\*SubsuperscriptBox[\(T\), \(3\), \(\[CurlyPhi]\)] \(\[DoubleStruckCapitalE][Sum[
\*SubscriptBox[\(x\), \(\[Nu], k\)] \((
\*SubscriptBox[\(p\), \(\[Nu], 
\*SuperscriptBox[\(k\), \(+\)]\)] - 
\*SubscriptBox[\(p\), \(\[Nu], k\)])\), {\[Nu], 3}] + 
\*SuperscriptBox[\(B\), \(-1\)] 
\(\*SubscriptBox[\(\[Gamma]\), \(0\)]\)[\[CurlyPhi], k] + \[Epsilon]\ B\ 
\(\*SubscriptBox[\(\[Gamma]\), \(1\)]\)[\[CurlyPhi], k] + \[Epsilon]\ 
\(\*SubscriptBox[\(\[Gamma]\), \(42\)]\)[\[CurlyPhi], k] + 
\*SuperscriptBox[\(O[\[Epsilon]]\), \(2\)]\ ]\)\);
Subscript[ps, i_]:=Sequence[Subscript[p, 1,i],Subscript[p, 2,i],Subscript[p, 3,i]];
Subscript[xs, i_]:=Sequence[Subscript[x, 1,i],Subscript[x, 2,i],Subscript[x, 3,i]];
Subscript[vs, i_]:=Sequence[Subscript[ps, i],Subscript[xs, i]];
\[ScriptCapitalF][is___]:=\[DoubleStruckCapitalE][Sum[Subscript[\[Pi], \[Nu],i] Subscript[p, \[Nu],i],{i,{is}}, {\[Nu],3}]];
\[ScriptCapitalL][K_]:=CF[\[ScriptCapitalL]/@Features[K][[2]]];
vs[K_] := Union@@Table[{Subscript[vs, i]},{i,Features[K][[1]]}]



