(* ::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:: *)
\[DoubleStruckCapitalE] /: Simplify[\[DoubleStruckCapitalE][\[Omega]_,L_,Q_]] := \[DoubleStruckCapitalE][Expand@Together@\[Omega], Expand[L], Expand@Together[Q/.Subscript[b, l_]:>Log[Subscript[t, l]]]];
\[DoubleStruckCapitalE] /: \[DoubleStruckCapitalE][\[Omega]1_,L1_,Q1_]\[Congruent]\[DoubleStruckCapitalE][\[Omega]2_,L2_,Q2_] := (\[Omega]1==\[Omega]2\[And]L1==L2\[And]Q1==Q2);
\[DoubleStruckCapitalE][\[Omega]_. E^F_] := Simplify@\[DoubleStruckCapitalE][\[Omega]^-1, F/.Subscript[u, _]|Subscript[w, _]|\[Alpha]|\[Beta]->0, \[Omega]^-1 F/.Subscript[c, _]->0];
\[DoubleStruckCapitalE][\[Omega]_] /; FreeQ[\[Omega],E^_]:= \[DoubleStruckCapitalE][\[Omega]^-1,0,0];
\[DoubleStruckCapitalE][\[ScriptCapitalE]_]:=\[DoubleStruckCapitalE][Factor[\[ScriptCapitalE]]];


(* ::Input::Initialization:: *)
\[DoubleStruckCapitalE] /: \[DoubleStruckCapitalE][\[Omega]1_,L1_,Q1_]\[DoubleStruckCapitalE][\[Omega]2_,L2_,Q2_] := Simplify@\[DoubleStruckCapitalE][\[Omega]1 \[Omega]2,L1+L2,\[Omega]2 Q1+\[Omega]1 Q2];


(* ::Input::Initialization:: *)
Rp[i_,j_]:=\[DoubleStruckCapitalE][E^(Subscript[b, i] Subscript[c, j]+Subscript[u, i] Subscript[w, j])]; Rm[i_,j_]:=\[DoubleStruckCapitalE][E^(-Subscript[b, i] Subscript[c, j]-\!\(
\*SubsuperscriptBox[\(t\), \(i\), \(-1\)] 
\*SubscriptBox[\(u\), \(i\)] 
\*SubscriptBox[\(w\), \(j\)]\))];


(* ::Input::Initialization:: *)
NO[Subscript[u, i_],Subscript[c, j_],k_][\[DoubleStruckCapitalE][\[Omega]_,L_,Q_]] := \[DoubleStruckCapitalE][1,L/.Subscript[c, j]->0,\[Omega]^-1 Q/.Subscript[u, i]->0](
\[DoubleStruckCapitalE][\[Omega]^-1 E^(E^-\[Gamma] \[Beta] Subscript[u, k]+\[Gamma] Subscript[c, k])] /. {\[Gamma]->\!\(
\*SubscriptBox[\(\[PartialD]\), 
SubscriptBox[\(c\), \(j\)]]L\),\[Beta]->\[Omega]^-1 \!\(
\*SubscriptBox[\(\[PartialD]\), 
SubscriptBox[\(u\), \(i\)]]Q\)});
NO[Subscript[w, i_],Subscript[c, j_],k_][\[DoubleStruckCapitalE][\[Omega]_,L_,Q_]] := \[DoubleStruckCapitalE][1,L/.Subscript[c, j]->0,\[Omega]^-1 Q/.Subscript[w, i]->0](
\[DoubleStruckCapitalE][\[Omega]^-1 E^(E^\[Gamma] \[Beta] Subscript[w, k]+\[Gamma] Subscript[c, k])] /. {\[Gamma]->\!\(
\*SubscriptBox[\(\[PartialD]\), 
SubscriptBox[\(c\), \(j\)]]L\),\[Beta]->\[Omega]^-1 \!\(
\*SubscriptBox[\(\[PartialD]\), 
SubscriptBox[\(w\), \(i\)]]Q\)});
 NO[Subscript[w, i_],Subscript[u, j_],k_][\[DoubleStruckCapitalE][\[Omega]_,L_,Q_]] :=\[DoubleStruckCapitalE][1,L,\[Omega]^-1 Q/.Subscript[w, i]|Subscript[u, j]->0](
\[DoubleStruckCapitalE][\[Nu] \[Omega]^-1 E^((1-Subscript[t, k])\[Nu] \[Alpha] \[Beta]+\[Nu] \[Beta] Subscript[u, k]+\[Nu] \[Delta] Subscript[u, k] Subscript[w, k]+\[Nu] \[Alpha] Subscript[w, k])] /. \[Nu]->(1+(Subscript[t, k]-1) \[Delta])^-1 /. {
\[Alpha]->\[Omega]^-1 (\!\(
\*SubscriptBox[\(\[PartialD]\), 
SubscriptBox[\(w\), \(i\)]]Q\)/.Subscript[u, j]->0), \[Beta]->\[Omega]^-1 (\!\(
\*SubscriptBox[\(\[PartialD]\), 
SubscriptBox[\(u\), \(j\)]]Q\)/.Subscript[w, i]->0), \[Delta]->\[Omega]^-1 \!\(
\*SubscriptBox[\(\[PartialD]\), \(
\*SubscriptBox[\(w\), \(i\)], 
\*SubscriptBox[\(u\), \(j\)]\)]Q\)});


(* ::Input::Initialization:: *)
m[i_,j_,k_][Z_] :=Module[{a}, Simplify[
(Z /. {Subscript[b, i|j]->Subscript[b, k], Subscript[t, i|j]->Subscript[t, k]} // NO[Subscript[w, i],Subscript[c, j],a]//NO[Subscript[u, i],Subscript[c, a],a]//NO[Subscript[w, a],Subscript[u, j],a]) /. {Subscript[c, i]->Subscript[c, k],Subscript[w, j]->Subscript[w, k],Subscript[y_, a]:>Subscript[y, k]}]]


(* ::Input::Initialization:: *)
\[Sigma][i_,j_][\[ScriptCapitalE]_] := \[ScriptCapitalE] /. {Subscript[b, i]->Subscript[b, j], Subscript[t, i]->Subscript[t, j], Subscript[c, i]->Subscript[c, j], Subscript[u, i]->Subscript[u, j], Subscript[w, i]->Subscript[w, j]}



