(* ::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:: *)
tm[x_, y_, z_][\[Beta]_A] := \[Alpha]Collect[\[Beta] /. {t[x]->t[z], t[y]->t[z], Subscript[c, x]->Subscript[c, z], Subscript[c, y]->Subscript[c, z]}];


(* ::Input::Initialization:: *)
hm[x_, y_, z_][A[\[Omega]_, \[Sigma]_, \[Mu]_]] := Module[
{\[Alpha]= D[\[Mu], h[x]], \[Beta]=D[\[Mu], h[y]], \[CapitalXi]=\[Mu] /. h[x]|h[y] -> 0},
A[\[Omega],
h[z](\!\(
\*SubscriptBox[\(\[PartialD]\), \(h[x]\)]\[Sigma]\))(\!\(
\*SubscriptBox[\(\[PartialD]\), \(h[y]\)]\[Sigma]\))+(\[Sigma] /. h[x|y]->0),
\[CapitalXi]+h[z](\[Alpha]+(\!\(
\*SubscriptBox[\(\[PartialD]\), \(h[x]\)]\[Sigma]\))\[Beta])
] // \[Alpha]Collect ];


(* ::Input::Initialization:: *)
tha[u_,x_][A[\[Omega]_, \[Sigma]_, \[Mu]_]] := Module[{\[Alpha], \[Theta], \[Phi], \[CapitalXi], \[Nu]},
\[Alpha] = Coefficient[\[Mu], h[x]t[u]]; \[Theta] = D[\[Mu], t[u]] /. h[x] -> 0;
\[Phi] = D[\[Mu], h[x]] /. t[u] -> 0; \[CapitalXi] = \[Mu] /. h[x]|t[u] -> 0;
\[Nu] = 1+Subscript[c, u]\[Alpha];
A[\[Omega]*\[Nu], \[Sigma], Plus[
\[Alpha] (\!\(
\*SubscriptBox[\(\[PartialD]\), \(h[x]\)]\[Sigma]\))/\[Nu]*h[x]t[u], \[Theta] (\!\(
\*SubscriptBox[\(\[PartialD]\), \(h[x]\)]\[Sigma]\))/\[Nu]*t[u],
\[Phi]/\[Nu]*h[x], \[CapitalXi]-Subscript[c, u]\[Phi]*\[Theta]/\[Nu]
]] // \[Alpha]Collect ];


(* ::Input::Initialization:: *)
Subscript[dm, i_\[InvisibleComma]j_->k_][\[CapitalGamma][\[Omega]_,\[Sigma]_,\[Lambda]_]] := Module[{\[Alpha],\[Beta],\[Gamma],\[Delta],\[Theta],\[Epsilon],\[Phi],\[Psi],\[CapitalXi],\[Mu]},
({
 {\[Alpha], \[Beta], \[Theta]},
 {\[Gamma], \[Delta], \[Epsilon]},
 {\[Phi], \[Psi], \[CapitalXi]}
})=({
 {\!\(
  \*SubscriptBox[\(\[PartialD]\), \(
   \*SubscriptBox[\(t\), \(i\)], 
   \*SubscriptBox[\(h\), \(i\)]\)]\[Lambda]\), \!\(
  \*SubscriptBox[\(\[PartialD]\), \(
   \*SubscriptBox[\(t\), \(i\)], 
   \*SubscriptBox[\(h\), \(j\)]\)]\[Lambda]\), \!\(
  \*SubscriptBox[\(\[PartialD]\), 
   SubscriptBox[\(t\), \(i\)]]\[Lambda]\)},
 {\!\(
  \*SubscriptBox[\(\[PartialD]\), \(
   \*SubscriptBox[\(t\), \(j\)], 
   \*SubscriptBox[\(h\), \(i\)]\)]\[Lambda]\), \!\(
  \*SubscriptBox[\(\[PartialD]\), \(
   \*SubscriptBox[\(t\), \(j\)], 
   \*SubscriptBox[\(h\), \(j\)]\)]\[Lambda]\), \!\(
  \*SubscriptBox[\(\[PartialD]\), 
   SubscriptBox[\(t\), \(j\)]]\[Lambda]\)},
 {\!\(
  \*SubscriptBox[\(\[PartialD]\), 
   SubscriptBox[\(h\), \(i\)]]\[Lambda]\), \!\(
  \*SubscriptBox[\(\[PartialD]\), 
   SubscriptBox[\(h\), \(j\)]]\[Lambda]\), \[Lambda]}
})/.Subscript[(t|h), i|j]->0;
\[CapitalGamma]Collect[\[CapitalGamma][(\[Mu]=1-\[Beta])\[Omega],
Subscript[h, k](\!\(
\*SubscriptBox[\(\[PartialD]\), 
SubscriptBox[\(h\), \(i\)]]\[Sigma]\))(\!\(
\*SubscriptBox[\(\[PartialD]\), 
SubscriptBox[\(h\), \(j\)]]\[Sigma]\))+(\[Sigma] /. Subscript[h, i|j]->0),
{Subscript[t, k],1}.\!\(\*
TagBox[
RowBox[{"(", "", GridBox[{
{
RowBox[{"\[Gamma]", "+", 
RowBox[{"\[Alpha]", " ", 
RowBox[{"\[Delta]", "/", "\[Mu]"}]}]}], 
RowBox[{"\[Epsilon]", "+", 
RowBox[{"\[Delta]", " ", 
RowBox[{"\[Theta]", "/", "\[Mu]"}]}]}]},
{
RowBox[{"\[Phi]", "+", 
RowBox[{"\[Alpha]", " ", 
RowBox[{"\[Psi]", "/", "\[Mu]"}]}]}], 
RowBox[{"\[CapitalXi]", "+", 
RowBox[{"\[Theta]", " ", 
RowBox[{"\[Psi]", "/", "\[Mu]"}]}]}]}
},
GridBoxAlignment->{"Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {Offset[0.27999999999999997`], {Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {Offset[0.2], {Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "", ")"}],
Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]\).{Subscript[h, k],1}
]] /. {Subscript[T, i]->Subscript[T, k], Subscript[T, j]->Subscript[T, k],Subscript[b, i]->Subscript[b, k], Subscript[b, j]->Subscript[b, k]} // \[CapitalGamma]Collect ];


(* ::Input::Initialization:: *)
A[\[Omega]_, \[Sigma]_, \[Mu]_] // \[CapitalGamma] := Module[{S}, S=dL[{\[Omega], \[Mu]}];
\[CapitalGamma][\[Omega],
Total[Subscript[h, #]& /@ S]+\[Mu] /. {h[a_] :> Subscript[h, a], t[a_] :> Subscript[c, a]},
Total[(Subscript[t, #] Subscript[h, #])& /@ S]+(\[Mu] /. t[a_] :> Subscript[c, a] /. h[a_] :> Subscript[h, a] Subscript[t, a])-\[Mu] /. {h[a_] :> Subscript[h, a], t[a_] :> Subscript[c, a] Subscript[t, a]}
] /. Subscript[c, a_]:>Log[Subscript[T, a]]// \[CapitalGamma]Collect[FullSimplify[# /. Sinh[x_] :> (E^x-E^-x)/2]&] ];


(* ::Input::Initialization:: *)
\[CapitalGamma][\[Omega]_,\[Sigma]_,\[Lambda]_] // A := Module[{S, \[Mu]}, S=dL[\[CapitalGamma][\[Omega],\[Sigma],\[Lambda]]];
\[Mu]=Total[((\!\(
\*SubscriptBox[\(\[PartialD]\), 
SubscriptBox[\(h\), \(#\)]]\[Sigma]\))Subscript[t, #] Subscript[h, #])& /@ S]-\[Lambda];
A[\[Omega],
\[Sigma] /. Subscript[h, a_]:>h[a], \[Mu] /. {Subscript[h, a_]:>h[a], Subscript[t, a_] :> t[a]/Subscript[c, a]}
] /. Subscript[T, a_]:>E^Subscript[c, a]// \[Alpha]Collect ];
