(* ::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:: *)
HL[\[ScriptCapitalE]_] := Style[\[ScriptCapitalE], Background -> If[TrueQ@\[ScriptCapitalE],RGBColor[Rational[1, 3], 1, Rational[1, 3]],RGBColor[1, 0.5, 0.5]]];


(* ::Input::Initialization:: *)
GenericPolynomial[d_Integer, vars_List, gc_] := Total[Map[
Subscript[gc, Sequence@@#]Times@@(vars^#)&,
Join@@(Permutations /@ IntegerPartitions[d+Length@vars,{Length@vars}])-1
]];
GenericPolynomial[specs_List, vars_List, gc_] := Sum[GenericPolynomial[specs[[1]],vars,gc],specs]


(* ::Input::Initialization:: *)
Unprotect[SeriesData];
Expand[sd_SeriesData] ^:= MapAt[Expand,sd,3];
Protect[SeriesData];


(* ::Input::Initialization:: *)
CF[Subscript[\[LeftAngleBracket]F_,\[ScriptCapitalE]_\[RightAngleBracket], B_]]:=Subscript[\[LeftAngleBracket]Simplify@F,Simplify@\[ScriptCapitalE]\[RightAngleBracket], B];


(* ::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]; SuperStar[(B_List)]:=SuperStar[#]&/@B;


(* ::Input::Initialization:: *)
Subscript[Ev, k_]@Subscript[\[LeftBracketingBar]F_,\[ScriptCapitalE]_\[RightBracketingBar], B_]:=Expand[Total[
CoefficientRules[Normal@Series[E^(SuperStar[B].F.SuperStar[B]/2),{\[HBar],0,k}],SuperStar[B]] /. (ps_->c_) :> c D[\[ScriptCapitalE],Sequence@@Thread[{B,ps}]]
]+O[\[HBar]]^(k+1)];
Subscript[Ev, k_]@Subscript[\[LeftAngleBracket]F_,\[ScriptCapitalE]_\[RightAngleBracket], B_]:= Subscript[Ev, k]@Subscript[\[LeftBracketingBar]F,\[ScriptCapitalE]\[RightBracketingBar], B]/.Alternatives@@B->0


(* ::Input::Initialization:: *)
DeGauss@Subscript[\[LeftAngleBracket]F_,\[ScriptCapitalE]_\[RightAngleBracket], B_]:= Module[{\[ScriptCapitalI],Q,G,M,\[CapitalDelta]},
\[ScriptCapitalI]=IdentityMatrix@Length@B;
Q=Log[Normal[\[ScriptCapitalE]]/.\[Epsilon]->0];
G=Table[\!\(
\*SubscriptBox[\(\[PartialD]\), \(i, j\)]Q\),{i,B},{j,B}];
M=Inverse[\[ScriptCapitalI]-G.F];
\[CapitalDelta]=Simplify@Det@M;
CF@Subscript[\[LeftAngleBracket]F.M,\[CapitalDelta]^(1/2) \[ScriptCapitalE] E^(-B.G.B/2)\[RightAngleBracket], B]
]


(* ::Input::Initialization:: *)
DeLin@Subscript[\[LeftAngleBracket]F_,\[ScriptCapitalE]_\[RightAngleBracket], B_]:= Module[{L,Y},
L=PowerExpand@Log[Normal[\[ScriptCapitalE]]/.\[Epsilon]->0];
Y=Table[\!\(
\*SubscriptBox[\(\[PartialD]\), \(i\)]L\),{i,B}];
CF@Subscript[\[LeftAngleBracket]F,E^(Y.F.Y/2) (E^-B.Y \[ScriptCapitalE]/.Thread[B->B+F.Y])\[RightAngleBracket], B]
]



