(* ::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[sd_SeriesData] := MapAt[CF,sd,3];
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:: *)
expand[sd_SeriesData] := MapAt[expand,sd,3];
expand[\[ScriptCapitalE]_] := Expand[\[ScriptCapitalE]];
\!\(\*SubscriptBox[\(Zip\), \({}\)]\)[P_]:=P; \!\(\*SubscriptBox[\(Zip\), \({\[Zeta]_, \[Zeta]s___}\)]\)[P_] := (expand[P//\!\(\*SubscriptBox[\(Zip\), \({\[Zeta]s}\)]\)] /. f_. \[Zeta]^d_.:>\!\(
\*SubscriptBox[\(\[PartialD]\), \({
\*SuperscriptBox[\(\[Zeta]\), \(*\)], d}\)]f\)) /. SuperStar[\[Zeta]]->0


(* ::Input::Initialization:: *)
Subscript[QZip, \[Zeta]s_List,simp_]@\[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;
simp /@ \[DoubleStruckCapitalE][L,Q2,Det[qt]E^-Q2 Subscript[Zip, \[Zeta]s][E^Q1 (P/.zrule)]] ];
Subscript[QZip, \[Zeta]s_List]:=Subscript[QZip, \[Zeta]s,CF];


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


(* ::Input::Initialization:: *)
Subscript[LZip, \[Zeta]s_List,simp_]@\[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;
simp /@ \[DoubleStruckCapitalE][L2,Q2,Det[lt]E^(-L2-Q2) Subscript[Zip, \[Zeta]s][E^(L1+Q1) (P/.U2l/.zrule)]]//.l2U ];
Subscript[LZip, \[Zeta]s_List]:=Subscript[LZip, \[Zeta]s,CF];


(* ::Input::Initialization:: *)
\!\(\*SubscriptBox[\(Bind\), \({}\)]\)[L_,R_]:=L R;
\!\(\*SubscriptBox[\(Bind\), \({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, Flatten@Table[{Subscript[\[Beta], n@i],Subscript[\[Tau], n@i],Subscript[a, n@i]},{i,{is}}]] // Subscript[QZip, Flatten@Table[{Subscript[\[Xi], n@i],Subscript[y, n@i]},{i,{is}}]] ];
Subscript[B, l_List][L_,R_]:=Subscript[Bind, l][L,R]; Subscript[B, is___][L_,R_]:=\!\(\*SubscriptBox[\(Bind\), \({is}\)]\)[L,R];


(* ::Input::Initialization:: *)
Subscript[am, i_,j_->k_]:=\[DoubleStruckCapitalE][(Subscript[\[Alpha], i]+Subscript[\[Alpha], j])Subscript[a, k],(E^-Subscript[\[Alpha], j] Subscript[\[Xi], i]+Subscript[\[Xi], j])Subscript[x, k],1+O[\[Epsilon]]^2]
Subscript[a\[CapitalDelta], i_->j_,k_]:=\[DoubleStruckCapitalE][Subscript[\[Alpha], i](Subscript[a, j]+Subscript[a, k]),Subscript[\[Xi], i](Subscript[x, j]+Subscript[x, k]),1+\[Epsilon] Subscript[\[Xi], i] Subscript[x, k]( -Subscript[a, j]+ Subscript[\[Xi], i] Subscript[x, j]/2)+O[\[Epsilon]]^2]
Subscript[aS, i_] :=\[DoubleStruckCapitalE][-Subscript[\[Alpha], i] Subscript[a, i],- E^ Subscript[\[Alpha], i] Subscript[\[Xi], i] Subscript[x, i],1- \[Epsilon] E^ Subscript[\[Alpha], i] Subscript[\[Xi], i] Subscript[x, i](Subscript[a, i]+ E^ Subscript[\[Alpha], i] Subscript[\[Xi], i]Subscript[x, i]/2)+O[\[Epsilon]]^2]
Subscript[aSi, i_]:=\[DoubleStruckCapitalE][-Subscript[\[Alpha], i] Subscript[a, i],-E^ Subscript[\[Alpha], i] Subscript[\[Xi], i] Subscript[x, i],1- \[Epsilon] E^ Subscript[\[Alpha], i] Subscript[\[Xi], i] Subscript[x, i](Subscript[a, i]-1+ E^ Subscript[\[Alpha], i] Subscript[\[Xi], i]Subscript[x, i]/2)+O[\[Epsilon]]^2]


(* ::Input::Initialization:: *)
Subscript[bm, i_,j_->k_]:=\[DoubleStruckCapitalE][(Subscript[\[Beta], i]+Subscript[\[Beta], j])Subscript[b, k],(Subscript[\[Eta], i]+Subscript[\[Eta], j])Subscript[y, k],1- \[Epsilon]  Subscript[\[Eta], j] Subscript[y, k] Subscript[\[Beta], i]+O[\[Epsilon]]^2]
Subscript[b\[CapitalDelta], i_->j_,k_]:=\[DoubleStruckCapitalE][Subscript[\[Beta], i](Subscript[b, j]+Subscript[b, k]),Subscript[\[Eta], i](E^-Subscript[b, k] Subscript[y, j]+Subscript[y, k]),1+\[Epsilon] Subscript[\[Eta], i]^2 Subscript[y, j] Subscript[y, k]E^-Subscript[b, k]/2+O[\[Epsilon]]^2]
Subscript[bS, i_]:=\[DoubleStruckCapitalE][-Subscript[\[Beta], i] Subscript[b, i],-E^ Subscript[b, i] Subscript[\[Eta], i] Subscript[y, i],1-\[Epsilon] E^ Subscript[b, i] Subscript[\[Eta], i] Subscript[y, i]( Subscript[\[Beta], i]+ E^Subscript[b, i] Subscript[\[Eta], i]Subscript[y, i]/2)+O[\[Epsilon]]^2]
Subscript[bSi, i_]:=\[DoubleStruckCapitalE][-Subscript[\[Beta], i] Subscript[b, i],-E^Subscript[b, i] Subscript[\[Eta], i] Subscript[y, i],1-\[Epsilon] E^ Subscript[b, i] Subscript[\[Eta], i] Subscript[y, i]( Subscript[\[Beta], i]-1+ E^Subscript[b, i] Subscript[\[Eta], i]Subscript[y, i]/2)+O[\[Epsilon]]^2]


(* ::Input::Initialization:: *)
Subscript[tP, i_,j_]:=\[DoubleStruckCapitalE][Subscript[\[Beta], i] Subscript[\[Alpha], j],Subscript[\[Eta], i] Subscript[\[Xi], j],1+\[Epsilon] Subscript[\[Eta], i]^2 Subscript[\[Xi], j]^2/4]


(* ::Input::Initialization:: *)
Block[{i,j,k}, Subscript[dm, i_,j_->k_]=(\[DoubleStruckCapitalE][Subscript[\[Beta], i] Subscript[b, i] + Subscript[\[Alpha], j] Subscript[a, j],Subscript[\[Eta], i] Subscript[y, i]+Subscript[\[Xi], j] Subscript[x, j],1](Subscript[a\[CapitalDelta], i->h1,h2]~Subscript[B, h2]~Subscript[a\[CapitalDelta], h2->h2,h3])(Subscript[b\[CapitalDelta], j->t1,t2]~Subscript[B, t2]~Subscript[b\[CapitalDelta], t2->t2,t3]))~Subscript[B, h3]~Subscript[aSi, h3]~Subscript[B, t1,h3]~(Subscript[tP, t1,h3])~Subscript[B, t3,h1]~(Subscript[tP, t3,h1])~Subscript[B, h2,j,i,t2]~(Subscript[am, h2,j->k] Subscript[bm, i,t2->k])]


(* ::Input::Initialization:: *)
Block[{i},Subscript[dS, i_]=\[DoubleStruckCapitalE][Subscript[\[Beta], i] Subscript[b, 1]+Subscript[\[Alpha], i] Subscript[a, 2],Subscript[\[Eta], i] Subscript[y, 1]+Subscript[\[Xi], i] Subscript[x, 2],1]~Subscript[B, 1,2]~(Subscript[bSi, 1] Subscript[aS, 2])~Subscript[B, 1,2]~Subscript[dm, 2,1->i]]


(* ::Input::Initialization:: *)
Block[{i,j,k},Subscript[d\[CapitalDelta], i_->j_,k_]=(Subscript[b\[CapitalDelta], i->3,1] Subscript[a\[CapitalDelta], i->2,4])~Subscript[B, 1,2,3,4]~(Subscript[dm, 3,4->k] Subscript[dm, 1,2->j])]


(* ::Input::Initialization:: *)
Subscript[R, i_,j_]:=\[DoubleStruckCapitalE][Subscript[b, i] Subscript[a, j],Subscript[y, i] Subscript[x, j],1- \[Epsilon] \!\(\*SubsuperscriptBox[\(y\), \(i\), \(2\)]\)\!\(
\*SubsuperscriptBox[\(x\), \(j\), \(2\)]\ /4\)+O[\[Epsilon]]^2]


(* ::Input::Initialization:: *)
Block[{i,j}, Subscript[\!\(\*OverscriptBox[\(R\), \(_\)]\), i_,j_]=Expand/@Subscript[R, i,j]~Subscript[B, j]~Subscript[dS, j]]


(* ::Input::Initialization:: *)
Block[{i},{
Subscript[u, i_]=Subscript[R, 1,2]~Subscript[B, 1]~Subscript[dS, 1]~Subscript[B, 1,2]~Subscript[dm, 2,1->i],
Subscript[ui, i_]:=Subscript[R, 1,2]~Subscript[B, 2]~Subscript[dS, 2]~Subscript[B, 2]~Subscript[dS, 2]~Subscript[B, 1,2]~Subscript[dm, 2,1->i]
}]


(* ::Input::Initialization:: *)
Block[{i},
{Subscript[CC, i_]=\[DoubleStruckCapitalE][0,0,\!\(
\*SubsuperscriptBox[\(B\), \(i\), \(1/2\)] 
\*SuperscriptBox[\(E\), \(\(-\[Epsilon]\)\ 
\*SubscriptBox[\(a\), \(i\)]/2\)]\)+O[\[Epsilon]]^2],
Subscript[\!\(\*OverscriptBox[\(CC\), \(_\)]\), i_]=\[DoubleStruckCapitalE][0,0,\!\(
\*SubsuperscriptBox[\(B\), \(i\), \(\(-1\)/2\)] 
\*SuperscriptBox[\(E\), \(\[Epsilon]\ 
\*SubscriptBox[\(a\), \(i\)]/2\)]\)+O[\[Epsilon]]^2]
}]


(* ::Input::Initialization:: *)
Block[{i,j},{
Subscript[Kink, i_] = (Subscript[R, 1,3] Subscript[\!\(\*OverscriptBox[\(CC\), \(_\)]\), 2])~Subscript[B, 1,2]~Subscript[dm, 1,2->1]~Subscript[B, 1,3]~Subscript[dm, 1,3->i],
Subscript[\!\(\*OverscriptBox[\(Kink\), \(_\)]\), j_] = (Subscript[\!\(\*OverscriptBox[\(R\), \(_\)]\), 1,3] Subscript[CC, 2])~Subscript[B, 1,2]~Subscript[dm, 1,2->1]~Subscript[B, 1,3]~Subscript[dm, 1,3->j]
}]


(* ::Input::Initialization:: *)
Subscript[b2t, i_]:=\[DoubleStruckCapitalE][Subscript[\[Alpha], i] Subscript[a, i]-Subscript[\[Beta], i] Subscript[t, i],Subscript[\[Xi], i] Subscript[x, i]+Subscript[\[Eta], i] Subscript[y, i],1+\[Epsilon] Subscript[\[Beta], i] Subscript[a, i]+O[\[Epsilon]]^2]
Subscript[t2b, i_]:=\[DoubleStruckCapitalE][Subscript[\[Alpha], i] Subscript[a, i]-Subscript[\[Tau], i] Subscript[b, i],Subscript[\[Xi], i] Subscript[x, i]+Subscript[\[Eta], i] Subscript[y, i],1+\[Epsilon] Subscript[\[Tau], i] Subscript[a, i]+O[\[Epsilon]]^2]



