(* ::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:: *)
SetDirectory["C:\\drorbn\\AcademicPensieve\\Projects\\SL2Portfolio2"];
<<"../Profile/Profile.m";
<<"Engine-Speedy.m";
HL[\[ScriptCapitalE]_] := Style[\[ScriptCapitalE], Background -> If[TrueQ@\[ScriptCapitalE],RGBColor[Rational[1, 3], 1, Rational[1, 3]],RGBColor[1, 0.5, 0.5]]];


(* ::Input::Initialization:: *)
Subscript[sm, i_,j_->k_]:=\!\(\*SubscriptBox[\(\[DoubleStruckCapitalE]\), \({i, j} \[Rule] {k}\)]\)[Subscript[b, k](Subscript[\[Beta], i]+Subscript[\[Beta], j])+Subscript[t, k](Subscript[\[Tau], i]+Subscript[\[Tau], j])+Subscript[a, k](Subscript[\[Alpha], i]+Subscript[\[Alpha], j])+Subscript[y, k](Subscript[\[Eta], i]+Subscript[\[Eta], j])+Subscript[x, k](Subscript[\[Xi], i]+Subscript[\[Xi], j])];
Subscript[s\[CapitalDelta], i_->j_,k_]:=\!\(\*SubscriptBox[\(\[DoubleStruckCapitalE]\), \({i} \[Rule] {j, k}\)]\)[Subscript[\[Beta], i](Subscript[b, j]+Subscript[b, k])+Subscript[\[Tau], i](Subscript[t, j]+Subscript[t, k])+Subscript[\[Alpha], i](Subscript[a, j]+Subscript[a, k])+Subscript[\[Eta], i](Subscript[y, j]+Subscript[y, k])+Subscript[\[Xi], i](Subscript[x, j]+Subscript[x, k])];
Subscript[sS, i_]:=\!\(\*SubscriptBox[\(\[DoubleStruckCapitalE]\), \({i} \[Rule] {i}\)]\)[-Subscript[\[Beta], i] Subscript[b, i]-Subscript[\[Tau], i] Subscript[t, i]-Subscript[\[Alpha], i] Subscript[a, i]-Subscript[\[Eta], i] Subscript[y, i]-Subscript[\[Xi], i] Subscript[x, i]];
Subscript[s\[Eta], i_]:=\!\(\*SubscriptBox[\(\[DoubleStruckCapitalE]\), \({} \[Rule] {i}\)]\)[0];Subscript[s\[Epsilon], i_]:=\!\(\*SubscriptBox[\(\[DoubleStruckCapitalE]\), \({i} \[Rule] {}\)]\)[0];


(* ::Input::Initialization:: *)
Subscript[s\[Sigma], i_->j_]:=\!\(\*SubscriptBox[\(\[DoubleStruckCapitalE]\), \({i} \[Rule] {j}\)]\)[Subscript[\[Beta], i] Subscript[b, j]+Subscript[\[Tau], i] Subscript[t, j]+Subscript[\[Alpha], i] Subscript[a, j]+Subscript[\[Eta], i] Subscript[y, j]+Subscript[\[Xi], i] Subscript[x, j]];
Subscript[s\[CapitalUpsilon], i_->j_,k_,l_,m_]:=\!\(\*SubscriptBox[\(\[DoubleStruckCapitalE]\), \({i} \[Rule] {j, k, l, m}\)]\)[Subscript[\[Beta], i] Subscript[b, k]+Subscript[\[Tau], i] Subscript[t, k]+Subscript[\[Alpha], i] Subscript[a, l]+Subscript[\[Eta], i] Subscript[y, j]+Subscript[\[Xi], i] Subscript[x, m]];


(* ::Input::Initialization:: *)
c\[CapitalLambda]=(Subscript[\[Eta], i]+(E^(-\[Gamma] Subscript[\[Alpha], i]-\[Epsilon] Subscript[\[Beta], i]) Subscript[\[Eta], j])/(1+\[Gamma] \[Epsilon] Subscript[\[Eta], j] Subscript[\[Xi], i]))Subscript[y, k]+(Subscript[\[Beta], i]+Subscript[\[Beta], j]+Log[1+\[Gamma] \[Epsilon] Subscript[\[Eta], j] Subscript[\[Xi], i]]/\[Epsilon])Subscript[b, k]+(Subscript[\[Alpha], i]+Subscript[\[Alpha], j]+Log[1+\[Gamma] \[Epsilon] Subscript[\[Eta], j] Subscript[\[Xi], i]]/\[Gamma])Subscript[a, k]+((E^(-\[Gamma] Subscript[\[Alpha], j]-\[Epsilon] Subscript[\[Beta], j]) Subscript[\[Xi], i])/(1+\[Gamma] \[Epsilon] Subscript[\[Eta], j] Subscript[\[Xi], i])+Subscript[\[Xi], j])Subscript[x, k];
Define[Subscript[cm, i,j->k]=\!\(\*SubscriptBox[\(\[DoubleStruckCapitalE]\), \({i, j} \[Rule] {k}\)]\)[c\[CapitalLambda]]]


(* ::Input::Initialization:: *)
Define[Subscript[c\[Sigma], i->j]=Subscript[s\[Sigma], i,j]/.Subscript[\[Tau], i]->0,Subscript[c\[Epsilon], i]=Subscript[s\[Epsilon], i], Subscript[c\[Eta], i]=Subscript[s\[Eta], i],Subscript[c\[CapitalDelta], i->j,k]=Subscript[s\[CapitalDelta], i->j,k],
Subscript[cS, i]=Subscript[sS, i]//Subscript[s\[CapitalUpsilon], i->1,2,3,4]//Subscript[cm, 4,3->i]//Subscript[cm, i,2->i]//Subscript[cm, i,1->i]];


(* ::Input::Initialization:: *)
$k=1; (*\[HBar]=\[Gamma]=1;*)


(* ::Input::Initialization:: *)
Define[Subscript[a\[Sigma], i->j]=\!\(\*SubscriptBox[\(\[DoubleStruckCapitalE]\), \({i} \[Rule] {j}\)]\)[Subscript[a, j] Subscript[\[Alpha], i]+Subscript[x, j] Subscript[\[Xi], i]],Subscript[b\[Sigma], i->j]=\!\(\*SubscriptBox[\(\[DoubleStruckCapitalE]\), \({i} \[Rule] {j}\)]\)[Subscript[b, j] Subscript[\[Beta], i]+Subscript[y, j] Subscript[\[Eta], i]]]


(* ::Input::Initialization:: *)
Define[Subscript[am, i,j->k]=\!\(\*SubscriptBox[\(\[DoubleStruckCapitalE]\), \({i, j} \[Rule] {k}\)]\)[(Subscript[\[Alpha], i]+Subscript[\[Alpha], j])Subscript[a, k]+(\!\(
\*SubsuperscriptBox[\(\[ScriptCapitalA]\), \(j\), \(-1\)] 
\*SubscriptBox[\(\[Xi]\), \(i\)]\)+Subscript[\[Xi], j])Subscript[x, k]],
Subscript[bm, i,j->k]=\!\(\*SubscriptBox[\(\[DoubleStruckCapitalE]\), \({i, j} \[Rule] {k}\)]\)[(Subscript[\[Beta], i]+Subscript[\[Beta], j])Subscript[b, k]+(Subscript[\[Eta], i]+E^(- \[Epsilon] Subscript[\[Beta], i]) Subscript[\[Eta], j])Subscript[y, k]]]


(* ::Input::Initialization:: *)
Subscript[Invert[R_,k_], i_,j_]:=\!\(\*SubscriptBox[\(\[DoubleStruckCapitalE]\), \({i, j} \[Rule] {}\)]\)[Subscript[\[Beta], i]Subscript[\[Alpha], j]/\[HBar],Subscript[\[Eta], i]Subscript[\[Xi], j]/\[HBar],1+If[k==0,0,Subscript[(Subscript[Invert[R,k-1], i,j]), k][3]-
(Subscript[R, 1,2]//(Subscript[(Subscript[Invert[R,0], 1,j]), k] Subscript[(Subscript[Invert[R,k-1], i,2]), k]))[3]]]


(* ::Input::Initialization:: *)
Subscript[RR[0], i_,j_]:=\!\(\*SubscriptBox[\(\[DoubleStruckCapitalE]\), \({} \[Rule] {i, j}\)]\)[\[HBar] Subscript[a, j] Subscript[b, i],\[HBar] Subscript[x, j] Subscript[y, i],1];
Subscript[PP[0], i_,j_]:=Subscript[Invert[RR[0],0], i,j];



