(* ::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:: *)
{SuperStar[t],SuperStar[y],SuperStar[a],SuperStar[x],SuperStar[z]}={\[Tau],\[Eta],\[Alpha],\[Xi],\[Zeta]}; {SuperStar[\[Tau]],SuperStar[\[Eta]],SuperStar[\[Alpha]],SuperStar[\[Xi]],SuperStar[\[Zeta]]}={t,y,a,x,z}; SuperStar[(Subscript[u_, i_])]:=Subscript[(SuperStar[u]), i];


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


(* ::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:: *)
E0=\[DoubleStruckCapitalE][Sum[Subscript[a, 10i+j] Subscript[x, i] Subscript[\[Xi], j],{i,3},{j,3}],1+\[Epsilon] Sum[Subscript[f, i][Subscript[x, 1],Subscript[x, 2],Subscript[x, 3]]Subscript[\[Xi], i],{i,3}]+\[Epsilon]^2 (Sum[Subscript[g, i][Subscript[x, 1],Subscript[x, 2],Subscript[x, 3]]Subscript[\[Xi], i],{i,3}]+Sum[Subscript[g, 10i+j][Subscript[x, 1],Subscript[x, 2],Subscript[x, 3]]Subscript[\[Xi], i] Subscript[\[Xi], j],{i,3},{j,3}])]


(* ::Input::Initialization:: *)
\[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=\[Omega]0^-1 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[\[Omega]Zip, \[Zeta]s][\[Omega]1,E^Q1 (P/.zrule)]] ];


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


(* ::Input::Initialization:: *)
\[DoubleStruckCapitalE] /: Subscript[\[Omega]Zip, \[Zeta]s_List]@\[DoubleStruckCapitalE][\[Omega]_,Q_,P_] := Module[{\[Zeta],z,zs,c,ys,\[Eta]s,m,\[Omega]1,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}];
m=Table[Subscript[K\[Delta], z,SuperStar[\[Zeta]]]-\!\(
\*SubscriptBox[\(\[PartialD]\), \(z, \[Zeta]\)]Q\),{\[Zeta],\[Zeta]s},{z,zs}];
\[Omega]1=Det[m];
qt=\[Omega]1 Inverse[m];
zrule=Thread[zs->qt.(zs+ys)];
Q1=c+\[Eta]s.zs/.zrule;
Q2=Q1/.Alternatives@@zs->0;
Simplify /@ \[DoubleStruckCapitalE][\[Omega]/\[Omega]1,Q2,E^-Q2 Subscript[\[Omega]Zip, \[Zeta]s][\[Omega],E^Q1 (P/.zrule)]] ];



