(* ::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:: *)
K\[Delta]/:Subscript[K\[Delta], i_,j_]:=If[i===j,1,0];
{SuperStar[z],SuperStar[x],SuperStar[y]}={\[Zeta],\[Xi],\[Eta]}; {SuperStar[\[Zeta]],SuperStar[\[Xi]],SuperStar[\[Eta]]}={z,x,y};
SuperStar[(Subscript[u_, i_])]:=Subscript[(SuperStar[u]), i];


(* ::Input::Initialization:: *)
\!\(\*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:: *)
(* \[DoubleStruckCapitalE][Q,P] means \[ExponentialE]^QP *)
\[DoubleStruckCapitalE] /: Subscript[Zip, \[Zeta]s_List]@\[DoubleStruckCapitalE][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)];
Q1=c+\[Eta]s.zs/.zrule;
Q2=Q1/.Alternatives@@zs->0;
Simplify /@ \[DoubleStruckCapitalE][Q2,Det[qt]E^-Q2 Subscript[Zip, \[Zeta]s][E^Q1 (P/.zrule)]] ];


(* ::Input::Initialization:: *)
\[DoubleStruckCapitalE]/:\[DoubleStruckCapitalE][Q1_,P1_]\[DoubleStruckCapitalE][Q2_,P2_]:=\[DoubleStruckCapitalE][Q1+Q2,P1*P2];
Subscript[Bind, \[Zeta]s_List][L_\[DoubleStruckCapitalE],R_\[DoubleStruckCapitalE]] := Module[{n,hide\[Zeta]s,hidezs},
hide\[Zeta]s=Table[\[Zeta]s[[i]]->Subscript[\[Zeta], n@i],{i,Length@\[Zeta]s}];
hidezs=Table[SuperStar[\[Zeta]s[[i]]]->Subscript[z, n@i],{i,Length@\[Zeta]s}];
Subscript[Zip, \[Zeta]s/.hide\[Zeta]s][(L/.hidezs)(R/.hide\[Zeta]s)] ];



