(* ::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:: *)
Subscript[\[Chi], cond_] := If[TrueQ@cond, 1, 0];
B[0,_]=0; B[_,0]=0;
B[c_*x:Subscript[(e|f|g|h), __],y_]:=Expand[c B[x,y]];
B[y_,c_*x:Subscript[(e|f|g|h), __]]:=Expand[c B[y,x]];
B[x_Plus,y_] := B[#,y]& /@ x;
B[x_,y_Plus] := B[x,#]& /@ y;
P[0,_]=0; P[_,0]=0;
P[c_*x:Subscript[(e|f|g|h), __],y_]:=Expand[c P[x,y]];
P[y_,c_*x:Subscript[(e|f|g|h), __]]:=Expand[c P[y,x]];
P[x_Plus,y_] := P[#,y]& /@ x;
P[x_,y_Plus] := P[x,#]& /@ y;


(* ::Input::Initialization:: *)
P[Subscript[e, i_,j_], Subscript[f, k_,l_]] := Subscript[\[Chi], j==k\[And]i==l]; P[Subscript[f, k_,l_], Subscript[e, i_,j_]] := Subscript[\[Chi], j==k\[And]i==l];
P[Subscript[e, __],Subscript[h, _]]=0; P[Subscript[h, _],Subscript[e, __]]=0;
P[Subscript[g, _],Subscript[f, __]]=0; P[Subscript[f, __],Subscript[g, _]]=0;
P[Subscript[g, i_],Subscript[h, j_]]:=2Subscript[\[Chi], i==j]; P[Subscript[h, j_],Subscript[g, i_]]:=2Subscript[\[Chi], i==j];
P[Subscript[(e|g), __],Subscript[(e|g), __]]=0;
P[Subscript[(f|h), __],Subscript[(f|h), __]]=0;


(* ::Input::Initialization:: *)
B[Subscript[(h|g), _],Subscript[(h|g), _]]= 0; 

B[Subscript[e, i_,j_],Subscript[e, k_,l_]] := Subscript[\[Chi], j==k] Subscript[e, i,l]-Subscript[\[Chi], l==i] Subscript[e, k,j];
B[Subscript[f, i_,j_],Subscript[f, k_,l_]] := \[Epsilon] Subscript[\[Chi], j==k] Subscript[f, i,l]-\[Epsilon] Subscript[\[Chi], l==i] Subscript[f, k,j];
B[Subscript[e, i_,j_],Subscript[f, k_,l_]] := Expand[
Subscript[\[Chi], j==k](\[Epsilon] Subscript[\[Chi], i<l] Subscript[e, i,l]+Subscript[\[Chi], i==l](Subscript[h, i]+\[Epsilon] Subscript[g, i])/2+Subscript[\[Chi], i>l] Subscript[f, i,l]) - Subscript[\[Chi], l==i](\[Epsilon] Subscript[\[Chi], k<j] Subscript[e, k,j]+Subscript[\[Chi], k==j](Subscript[h, j]+\[Epsilon] Subscript[g, j])/2+Subscript[\[Chi], k>j] Subscript[f, k,j])];

B[Subscript[g, i_],Subscript[e, j_,k_]] := (Subscript[\[Chi], i==j]-Subscript[\[Chi], i==k])Subscript[e, j,k];
B[Subscript[h, i_],Subscript[e, j_,k_]] := \[Epsilon](Subscript[\[Chi], i==j]-Subscript[\[Chi], i==k])Subscript[e, j,k];
B[Subscript[g, i_],Subscript[f, j_,k_]] := (Subscript[\[Chi], i==j]-Subscript[\[Chi], i==k])Subscript[f, j,k];
B[Subscript[h, i_],Subscript[f, j_,k_]] := \[Epsilon](Subscript[\[Chi], i==j]-Subscript[\[Chi], i==k])Subscript[f, j,k];


(* ::Input::Initialization:: *)
B[y_,x_] := Expand[-B[x,y]];


(* ::Input::Initialization:: *)
SuperPlus[Basis][n_] := Union@Flatten@{
Table[Subscript[e, i,j], {i,n-1}, {j,i+1,n}],
Table[Subscript[g, i], {i,n}]
};
SuperMinus[Basis][n_] := Union@Flatten@{
Table[Subscript[f, i,j], {i,2,n}, {j,i-1}],
Table[Subscript[h, i], {i,n}]
};
Basis[n_] := Join[SuperPlus[Basis][n], SuperMinus[Basis][n]];


(* ::Input::Initialization:: *)
DS[n_,k_,1]:= DS[n,k,1] = Flatten[Table[\[Epsilon]^j Basis[n], {j,0,k}]];
DS[n_,k_,p_] /; p>1 := DS[n,k,p]=DeleteCases[Union@Flatten@Outer[B, DS[n,k,p-1],DS[n,k,p-1]] /. \[Epsilon]^j_./;j>k:>0,0]


(* ::Input::Initialization:: *)
LCSCA[n_,k_,1] := LCSCA[n,k,1] = DS[n,k,2];
LCSCA[n_,k_,p_] /; p>1 := LCSCA[n,k,p]=DeleteCases[Union@Flatten@Outer[B, LCSCA[n,k,p-1],LCSCA[n,k,1]] /. \[Epsilon]^j_./;j>k:>0,0];



