(* ::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:: *)
Once[<<KnotTheory`];
HL[\[ScriptCapitalE]_] := Style[\[ScriptCapitalE], Background -> If[TrueQ@\[ScriptCapitalE],RGBColor[Rational[1, 3], 1, Rational[1, 3]],RGBColor[1, 0.5, 0.5]]];
\[Chi][cond_]:=If[TrueQ[cond],1,0];


(* ::Input::Initialization:: *)
DeclareGroup[G_Symbol,Subscript[S, n_]]:=Module[{\[Alpha],\[Beta],e},
G/:Ord[G]=n!;
G/:Elements[G]=PermutationCycles/@(Permutations@Range@n);
Do[G/:g[G,\[Alpha]]=e=Elements[G][[\[Alpha]]]; G/:ind[G,e]=\[Alpha],
{\[Alpha],Ord[G]} ];
Do[G/: m[G,\[Alpha],\[Beta]]=ind[G,g[G,\[Alpha]]~PermutationProduct~g[G,\[Beta]]],
{\[Alpha],Ord[G]},{\[Beta],Ord[G]} ];
Do[G/: inv[G,\[Alpha]]=ind[G,InversePermutation[g[G,\[Alpha]]]],
{\[Alpha],Ord[G]} ] ]


(* ::Input::Initialization:: *)
g[\[Alpha]_]:=g[$G,\[Alpha]]; ind[\[Alpha]_]:=ind[$G,\[Alpha]]; m[\[Alpha]_,\[Beta]_]:=m[$G,\[Alpha],\[Beta]]; inv[\[Alpha]_]:=inv[$G,\[Alpha]];


(* ::Input::Initialization:: *)
Subscript[m, i_,j_->k_][\[ScriptCapitalE]_]:=Expand[\[ScriptCapitalE]]/.Subscript[W, i][\[Alpha]_,\[Beta]_]Subscript[W, j][\[Gamma]_,\[Delta]_]:>\[Chi][m[\[Alpha],\[Beta]]==m[\[Beta],\[Gamma]]]Subscript[W, k][\[Alpha],m[\[Beta],\[Delta]]]


(* ::Input::Initialization:: *)
Subscript[R, i_,j_]:=Sum[Subscript[W, i][\[Alpha],1]Subscript[W, j][\[Beta],\[Alpha]], {\[Alpha],Ord[$G]}, {\[Beta],Ord[$G]}];
Subscript[\!\(\*OverscriptBox[\(R\), \(_\)]\), i_,j_]:=Sum[Subscript[W, i][\[Alpha],1]Subscript[W, j][\[Beta],inv@\[Alpha]], {\[Alpha],Ord[$G]}, {\[Beta],Ord[$G]}];
Subscript[\[Eta], i_]:=Sum[Subscript[W, i][\[Alpha],1], {\[Alpha],Ord[$G]}];


(* ::Input::Initialization:: *)
DeclareGroup[$G=S3,Subscript[S, 3]];
Table[m[i,j],{i,Ord[S3]},{j,Ord[S3]}]//MatrixForm



