(* ::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:: *)
n=5;


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


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


(* ::Input::Initialization:: *)
\[Lambda][Subscript[x, i_,j_]]:=Mod[j-i,n];
Subscript[x, i_,i_]:=Subscript[b, i]/2+\[Epsilon] Subscript[a, i]/2


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

B[Subscript[x, i_,j_],Subscript[x, k_,l_]] := \[Epsilon]^Subscript[\[Chi], \[Lambda][Subscript[x, i,j]]+\[Lambda][Subscript[x, k,l]]>n] (Subscript[\[Chi], j==k] Subscript[x, i,l]-Subscript[\[Chi], l==i] Subscript[x, k,j]);

B[Subscript[a, i_],Subscript[x, j_,k_]]:=(Subscript[\[Chi], i==j]-Subscript[\[Chi], i==k])Subscript[x, j,k];
B[Subscript[b, i_],Subscript[x, j_,k_]]:=\[Epsilon](Subscript[\[Chi], i==j]-Subscript[\[Chi], i==k])Subscript[x, j,k];


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


(* ::Input::Initialization:: *)
cyc[k_Integer]:=Mod[k+1,n,1];
Cyc[\[ScriptCapitalE]_]:=\[ScriptCapitalE]/.{Subscript[x, i_,j_]:>Subscript[x, cyc@i,cyc@j], Subscript[a, i_]:>Subscript[a, cyc@i], Subscript[b, i_]:>Subscript[b, cyc@i]}


(* ::Input::Initialization:: *)
Subscript[Act, \[Sigma]_List][\[ScriptCapitalE]_]:=\[ScriptCapitalE]/.{Subscript[x, i_,j_]:>Subscript[x, \[Sigma][[i]],\[Sigma][[j]]], Subscript[a, i_]:>Subscript[a, \[Sigma][[i]]], Subscript[b, i_]:>Subscript[b, \[Sigma][[i]]]}


(* ::Input::Initialization:: *)
Subscript[\[Phi], \[Lambda]_][\[ScriptCapitalE]_] := \[ScriptCapitalE] /. {Subscript[x, i_,j_]/;i>j:>\[Lambda] Subscript[x, i,j], Subscript[b, i_]:>\[Lambda] Subscript[b, i]};


(* ::Input::Initialization:: *)
Basis[n_] := Sort@Flatten[{Table[Subscript[x, i,j],{i,n},{j,Delete[Range[n],i]}],Table[Subscript[a, i],{i,n}],Table[Subscript[b, i],{i,n}]}];



