(* ::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\\SL2Portfolio2"];
<< KnotTheory`;
<<"../Profile/Profile.m";
<<"Engine-Speedy.m";
<<"Objects.m";
<<"KT.m";
BeginProfile[];


(* ::Input::Initialization:: *)
$k=0;\[HBar]=1;\[Gamma]=1;


(* ::Input::Initialization:: *)
Subscript[tr, k_]:=\!\(\*SubscriptBox[\(\[DoubleStruckCapitalE]\), \({k} \[Rule] {}\)]\)[ Subscript[\[Beta], k] Subscript[b, k],( Subscript[\[ScriptCapitalA], k] (1-Subscript[B, k]))/(-1+ Subscript[\[ScriptCapitalA], k]) Subscript[\[Xi], k]Subscript[\[Eta], k]/\[HBar],1];
Simplify[(Subscript[dm, i,j->k]//Subscript[tr, k])\[Congruent](Subscript[dm, j,i->k]//Subscript[tr, k])]


(* ::Input::Initialization:: *)
Subscript[Xp, a_,b_]:= Xp[a,b]; Subscript[Xm, a_,b_]:=Xm[a,b];


(* ::Input::Initialization:: *)
SXForm[L_] := SXForm[
Skeleton[L],
Times@@PD[L] /. X[i_,j_,k_,l_] :> If[PositiveQ[X[i,j,k,l]],Xp[l,i], Xm[j,i]]
];


(* ::Input::Initialization:: *)
Z[L_Link] := Module[{s, z},
{s, z} = List @@ SXForm[L];
z=z/.{Xp[i_,j_]:>Subscript[R, i,j], Xm[i_,j_]:>Subscript[\!\(\*OverscriptBox[\(R\), \(_\)]\), i,j]};
Do[z = z // Subscript[dm, s[[c,1]],s[[c,k]] ->s[[c,1]]], {c, Length[s]},{k, 2, Length[s[[c]]]}];
z
];



