(* ::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:: *)
CF[\[ScriptCapitalE]_] := ExpandDenominator@ExpandNumerator@Together[
Expand[\[ScriptCapitalE]] //. E^x_ E^y_:>E^(x+y) /. E^x_:>E^CF[x]];


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


(* ::Input::Initialization:: *)
\[DoubleStruckCapitalE]/:\[DoubleStruckCapitalE][L1_,Q1_,P1_]\[Congruent]\[DoubleStruckCapitalE][L2_,Q2_,P2_]:=CF[L1==L2]\[And]CF[Q1==Q2]\[And]CF[Normal[P1-P2]==0];
\[DoubleStruckCapitalE]/:\[DoubleStruckCapitalE][L1_,Q1_,P1_]\[DoubleStruckCapitalE][L2_,Q2_,P2_]:=\[DoubleStruckCapitalE][L1+L2,Q1+Q2,P1*P2];


(* ::Input::Initialization:: *)
{SuperStar[t],SuperStar[b],SuperStar[y],SuperStar[a],SuperStar[x],SuperStar[z]}={\[Tau],\[Beta],\[Eta],\[Alpha],\[Xi],\[Zeta]}; 
{SuperStar[\[Tau]],SuperStar[\[Beta]],SuperStar[\[Eta]],SuperStar[\[Alpha]],SuperStar[\[Xi]],SuperStar[\[Zeta]]}={t,b,y,a,x,z}; SuperStar[(Subscript[u_, i_])]:=Subscript[(SuperStar[u]), i];


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


(* ::Input::Initialization:: *)
Subscript[QZip, \[Zeta]s_List]@\[DoubleStruckCapitalE][L_,Q_,P_] := Module[{\[Zeta],z,zs,c,ys,\[Eta]s,qt,zrule,Q1,Q2},
zs=Table[SuperStar[\[Zeta]],{\[Zeta],\[Zeta]s}];
c=Q/.Alternatives@@(\[Zeta]s\[Union]zs)->0;
ys=Table[\!\(
\*SubscriptBox[\(\[PartialD]\), \(\[Zeta]\)]\((Q /. Alternatives @@ zs -> 0)\)\),{\[Zeta],\[Zeta]s}];
\[Eta]s=Table[\!\(
\*SubscriptBox[\(\[PartialD]\), \(z\)]\((Q /. Alternatives @@ \[Zeta]s -> 0)\)\),{z,zs}];
qt=Inverse@Table[Subscript[K\[Delta], z,SuperStar[\[Zeta]]]-\!\(
\*SubscriptBox[\(\[PartialD]\), \(z, \[Zeta]\)]Q\),{\[Zeta],\[Zeta]s},{z,zs}];
zrule=Thread[zs->qt.(zs+ys)];
Q2=(Q1=c+\[Eta]s.zs/.zrule)/.Alternatives@@zs->0;
CF /@ \[DoubleStruckCapitalE][L,Q2,Det[qt]E^-Q2 Subscript[Zip, \[Zeta]s][E^Q1 (P/.zrule)]] ];


(* ::Input::Initialization:: *)
U2l={\!\(
\*SubsuperscriptBox[\(B\), \(i_\), \(p_.\)] -> 
\*SuperscriptBox[\(E\), \(\(-p\)\ \[HBar]\ \[Gamma]\ 
\*SubscriptBox[\(b\), \(i\)]\)]\),B^p_.->E^(-p \[HBar] \[Gamma] b), \!\(
\*SubsuperscriptBox[\(T\), \(i_\), \(p_.\)] -> 
\*SuperscriptBox[\(E\), \(p\ \[HBar]\ 
\*SubscriptBox[\(t\), \(i\)]\)]\),T^p_.->E^(p \[HBar] t),\!\(
\*SubsuperscriptBox[\(\[ScriptCapitalA]\), \(i_\), \(p_.\)] -> 
\*SuperscriptBox[\(E\), \(p\ \[Gamma]\ 
\*SubscriptBox[\(\[Alpha]\), \(i\)]\)]\),\[ScriptCapitalA]^p_.->E^(p \[Gamma] \[Alpha])}; 
l2U={E^(c_. Subscript[b, i_]+d_.):>\!\(
\*SubsuperscriptBox[\(B\), \(i\), \(\(-c\)/\((\[HBar]\ \[Gamma])\)\)] 
\*SuperscriptBox[\(E\), \(d\)]\),E^(c_. b+d_.):>B^(-c/(\[HBar] \[Gamma])) E^d,
E^(c_. Subscript[t, i_]+d_.):>\!\(
\*SubsuperscriptBox[\(T\), \(i\), \(c/\[HBar]\)] 
\*SuperscriptBox[\(E\), \(d\)]\),E^(c_. t+d_.):>T^(c/\[HBar]) E^d,
E^(c_. Subscript[\[Alpha], i_]+d_.):>\!\(
\*SubsuperscriptBox[\(\[ScriptCapitalA]\), \(i\), \(c/\[Gamma]\)] 
\*SuperscriptBox[\(E\), \(d\)]\),E^(c_. \[Alpha]+d_.):>\[ScriptCapitalA]^(c/\[Gamma]) E^d,
E^\[ScriptCapitalE]_:>E^Expand@\[ScriptCapitalE]};


(* ::Input::Initialization:: *)
Subscript[LZip, \[Zeta]s_List]@\[DoubleStruckCapitalE][L_,Q_,P_] := Module[{\[Zeta],z,zs,c,ys,\[Eta]s,lt,zrule,L1,L2,Q1,Q2},
zs=Table[SuperStar[\[Zeta]],{\[Zeta],\[Zeta]s}];
c=L/.Alternatives@@(\[Zeta]s\[Union]zs)->0;
ys=Table[\!\(
\*SubscriptBox[\(\[PartialD]\), \(\[Zeta]\)]\((L /. Alternatives @@ zs -> 0)\)\),{\[Zeta],\[Zeta]s}];
\[Eta]s=Table[\!\(
\*SubscriptBox[\(\[PartialD]\), \(z\)]\((L /. Alternatives @@ \[Zeta]s -> 0)\)\),{z,zs}];
lt=Inverse@Table[Subscript[K\[Delta], z,SuperStar[\[Zeta]]]-\!\(
\*SubscriptBox[\(\[PartialD]\), \(z, \[Zeta]\)]L\),{\[Zeta],\[Zeta]s},{z,zs}];
zrule=Thread[zs->lt.(zs+ys)];
L2=(L1=c+\[Eta]s.zs/.zrule)/.Alternatives@@zs->0;
Q2=(Q1=Q/.U2l/.zrule)/.Alternatives@@zs->0;
CF /@ \[DoubleStruckCapitalE][L2,Q2,Det[lt]E^(-L2-Q2) Subscript[Zip, \[Zeta]s][E^(L1+Q1) (P/.U2l/.zrule)]]//.l2U ];


(* ::Input::Initialization:: *)
\!\(\*SubscriptBox[\(B\), \({}\)]\)[L_,R_]:=L R;
\!\(\*SubscriptBox[\(B\), \({is__}\)]\)[L_\[DoubleStruckCapitalE],R_\[DoubleStruckCapitalE]] := Module[{n},
Times[
L/.Table[Subscript[(v:b|B|t|T|a|x|y), i]->Subscript[v, n@i],{i,{is}}],
R/.Table[Subscript[(v:\[Beta]|\[Tau]|\[Alpha]|\[ScriptCapitalA]|\[Xi]|\[Eta]), i]->Subscript[v, n@i],{i,{is}}]
] // Subscript[LZip, Join@@Table[{Subscript[\[Beta], n@i],Subscript[\[Tau], n@i],Subscript[a, n@i]},{i,{is}}]] // Subscript[QZip, Join@@Table[{Subscript[\[Xi], n@i],Subscript[y, n@i]},{i,{is}}]] ];
Subscript[B, is___][L_,R_]:=\!\(\*SubscriptBox[\(B\), \({is}\)]\)[L,R];


(* ::Input::Initialization:: *)
Subscript[m, i_,j_->k_]:=\[DoubleStruckCapitalE][Subscript[a, k] Subscript[\[Alpha], i]+Subscript[a, k] Subscript[\[Alpha], j]+Subscript[b, k] Subscript[\[Beta], i]+Subscript[b, k] Subscript[\[Beta], j],1/(\[HBar] Subscript[\[ScriptCapitalA], i] Subscript[\[ScriptCapitalA], j]) (\[HBar] Subscript[y, k] Subscript[\[ScriptCapitalA], i] Subscript[\[ScriptCapitalA], j] Subscript[\[Eta], i]+\[HBar] Subscript[y, k] Subscript[\[ScriptCapitalA], j] Subscript[\[Eta], j]+\[HBar] Subscript[x, k] Subscript[\[ScriptCapitalA], i] Subscript[\[Xi], i]+Subscript[\[ScriptCapitalA], i] Subscript[\[ScriptCapitalA], j] Subscript[\[Eta], j] Subscript[\[Xi], i]-Subscript[B, k] Subscript[\[ScriptCapitalA], i] Subscript[\[ScriptCapitalA], j] Subscript[\[Eta], j] Subscript[\[Xi], i]+\[HBar] Subscript[x, k] Subscript[\[ScriptCapitalA], i] Subscript[\[ScriptCapitalA], j] Subscript[\[Xi], j]),1];
Subscript[R, i_,j_]:=\[DoubleStruckCapitalE][\[HBar] Subscript[a, j] Subscript[b, i],\[HBar] Subscript[x, j] Subscript[y, i],1];
Subscript[\!\(\*OverscriptBox[\(R\), \(_\)]\), i_,j_]:=\[DoubleStruckCapitalE][-\[HBar] Subscript[a, j] Subscript[b, i],-((\[HBar] Subscript[x, j] Subscript[y, i])/Subscript[B, i]),1];
Subscript[S, i_]:=\[DoubleStruckCapitalE][-Subscript[a, i] Subscript[\[Alpha], i]-Subscript[b, i] Subscript[\[Beta], i],1/(\[HBar] Subscript[B, i]) (-\[HBar] Subscript[y, i] Subscript[\[ScriptCapitalA], i] Subscript[\[Eta], i]-\[HBar] Subscript[B, i] Subscript[x, i] Subscript[\[ScriptCapitalA], i] Subscript[\[Xi], i]+Subscript[\[ScriptCapitalA], i] Subscript[\[Eta], i] Subscript[\[Xi], i]-Subscript[B, i] Subscript[\[ScriptCapitalA], i] Subscript[\[Eta], i] Subscript[\[Xi], i]),1];
Subscript[\[CapitalDelta], i_->j_,k_]:=\[DoubleStruckCapitalE][Subscript[a, j] Subscript[\[Alpha], i]+Subscript[a, k] Subscript[\[Alpha], i]+Subscript[b, j] Subscript[\[Beta], i]+Subscript[b, k] Subscript[\[Beta], i],Subscript[y, j] Subscript[\[Eta], i]+Subscript[B, j] Subscript[y, k] Subscript[\[Eta], i]+Subscript[x, j] Subscript[\[Xi], i]+Subscript[x, k] Subscript[\[Xi], i],1];
Subscript[C, i_]:=\[DoubleStruckCapitalE][0,0,\!\(\*SubsuperscriptBox[\(B\), \(i\), \(1/2\)]\)];
Subscript[\!\(\*OverscriptBox[\(C\), \(_\)]\), i_]:=\[DoubleStruckCapitalE][0,0,\!\(\*SubsuperscriptBox[\(B\), \(i\), \(\(-1\)/2\)]\)];


(* ::Input::Initialization:: *)
Subscript[Kink, i_] := (Subscript[R, 1,3] Subscript[\!\(\*OverscriptBox[\(C\), \(_\)]\), 2])~Subscript[B, 1,2]~Subscript[m, 1,2->1]~Subscript[B, 1,3]~Subscript[m, 1,3->i];
Subscript[\!\(\*OverscriptBox[\(Kink\), \(_\)]\), i_] := (Subscript[\!\(\*OverscriptBox[\(R\), \(_\)]\), 1,3] Subscript[C, 2])~Subscript[B, 1,2]~Subscript[m, 1,2->1]~Subscript[B, 1,3]~Subscript[m, 1,3->i];


(* ::Input::Initialization:: *)
HL[\[ScriptCapitalE]_] := Style[\[ScriptCapitalE], Background -> Yellow];



