dimension=2;

pointList=Tuples[{-1,1},dimension]

o=Ordering[pointList]

r[θ_]:={{Cos[θ],-Sin[θ]},{Sin[θ],Cos[θ]}}

MatrixForm[r[π/2]]

xy=r[π/2].#&/@pointList

oxy=Ordering[xy]

a[list_]:=list[[oxy]]

result[n_]:=Union@@Table[(Composition@@#)[o]&/@Tuples[{a},i],{i,0,n}]

Table[Length[result[n]],{n,0,10}]

dimension=3;

pointList=Tuples[{-1,1},dimension]

o=Ordering[pointList]

rxy[θ_]:={{Cos[θ],-Sin[θ],0},{Sin[θ],Cos[θ],0},{0,0,1}}

MatrixForm[rxy[θ]]

ryz[θ_]:={{1,0,0},{0,Cos[θ],-Sin[θ]},{0,Sin[θ],Cos[θ]}}

MatrixForm[ryz[θ]]

rzx[θ_]:={{Cos[θ],0,Sin[θ]},{0,1,0},{-Sin[θ],0,Cos[θ]}}

MatrixForm[rzx[θ]]

xy=rxy[π/2].#&/@pointList

oxy=Ordering[xy]

yz=ryz[π/2].#&/@pointList

oyz=Ordering[yz]

zx=rzx[π/2].#&/@pointList

ozx=Ordering[zx]

a[list_]:=list[[oxy]]
b[list_]:=list[[oyz]]
c[list_]:=list[[ozx]]

result[n_]:=Union@@Table[(Composition@@#)[o]&/@Tuples[{a,b,c},i],{i,0,n}]

Table[Length[result[n]],{n,0,10}]

result2[0]={o}

Union[Union@@({a[#],b[#],c[#]}&/@result2[0]),result2[0]]

result2[n_]:=Union[Union@@({a[#],b[#],c[#]}&/@result2[n-1]),result2[n-1]]

result2[n_]:=Union[Join@@({a[#],b[#],c[#]}&/@result2[n-1]),result2[n-1]]

result2[n_]:=Union[testUnion[n]=(Union@@({a[#],b[#],c[#]}&/@result2[n-1])),result2[n-1]]

result2[n_]:=Union[testJoin[n]=(Join@@({a[#],b[#],c[#]}&/@result2[n-1])),result2[n-1]]

Table[result2[n]==result[n],{n,0,10}]//AbsoluteTiming

testUnion[1]

testJoin[1]

testUnion[2]

testJoin[2]

Length[testUnion[2]]

Length[testJoin[2]]

Table[Length[result2[n]],{n,0,10}]

dimension=4;

pointList=Tuples[{-1,1},dimension]

o=Ordering[pointList]

rwx[θ_]:={{Cos[θ],-Sin[θ],0,0},{Sin[θ],Cos[θ],0,0},{0,0,1,0},{0,0,0,1}}

MatrixForm[rwx[θ]]

rwy[θ_]:={{Cos[θ],0,-Sin[θ],0},{0,1,0,0},{Sin[θ],0,Cos[θ],0},{0,0,0,1}}

MatrixForm[rwy[θ]]

rwz[θ_]:={{Cos[θ],0,0,-Sin[θ]},{0,1,0,0},{0,0,1,0},{Sin[θ],0,0,Cos[θ]}}

MatrixForm[rwz[θ]]

rxy[θ_]:={{1,0,0,0},{0,Cos[θ],-Sin[θ],0},{0,Sin[θ],Cos[θ],0},{0,0,0,1}}

MatrixForm[rxy[θ]]

rxz[θ_]:={{1,0,0,0},{0,Cos[θ],0,-Sin[θ]},{0,0,1,0},{0,Sin[θ],0,Cos[θ]}}

MatrixForm[rxz[θ]]

ryz[θ_]:={{1,0,0,0},{0,1,0,0},{0,0,Cos[θ],-Sin[θ]},{0,0,Sin[θ],Cos[θ]}}

MatrixForm[ryz[θ]]

wx=rwx[π/2].#&/@pointList

owx=Ordering[wx]

wy=rwy[π/2].#&/@pointList

owy=Ordering[wy]

wz=rwz[π/2].#&/@pointList

owz=Ordering[wz]

xy=rxy[π/2].#&/@pointList

oxy=Ordering[xy]

xz=rxz[π/2].#&/@pointList

oxz=Ordering[xz]

yz=ryz[π/2].#&/@pointList

oyz=Ordering[yz]

a[list_]:=list[[owx]]
b[list_]:=list[[owy]]
c[list_]:=list[[owz]]
d[list_]:=list[[oxy]]
e[list_]:=list[[oxz]]
f[list_]:=list[[oyz]]

result[n_]:=Union@@Table[(Composition@@#)[o]&/@Tuples[{a,b,c,d,e,f},i],{i,0,n}]

result2[0]={o};
result2[n_]:=Union[Union@@({a[#],b[#],c[#],d[#],e[#],f[#]}&/@result2[n-1]),result2[n-1]]

result3[0]={o};
result3[n_]:=Union[Join@@({a[#],b[#],c[#],d[#],e[#],f[#]}&/@result3[n-1]),result3[n-1]]

result4[0]={o};
result4[n_]:=result4[n]=Union[Join@@({a[#],b[#],c[#],d[#],e[#],f[#]}&/@result4[n-1]),result4[n-1]]

Table[Length[result4[n]],{n,0,20}]//AbsoluteTiming

Table[result4[n]==result4[n+1],{n,0,30}]

result4[7]

(*バグ修正*)

dimension=4;

pointList=Tuples[{-1,1},dimension]

o=Ordering[Ordering[pointList]]

rwx[θ_]:={{Cos[θ],-Sin[θ],0,0},{Sin[θ],Cos[θ],0,0},{0,0,1,0},{0,0,0,1}}

MatrixForm[rwx[θ]]

rwy[θ_]:={{Cos[θ],0,-Sin[θ],0},{0,1,0,0},{Sin[θ],0,Cos[θ],0},{0,0,0,1}}

MatrixForm[rwy[θ]]

rwz[θ_]:={{Cos[θ],0,0,-Sin[θ]},{0,1,0,0},{0,0,1,0},{Sin[θ],0,0,Cos[θ]}}

MatrixForm[rwz[θ]]

rxy[θ_]:={{1,0,0,0},{0,Cos[θ],-Sin[θ],0},{0,Sin[θ],Cos[θ],0},{0,0,0,1}}

MatrixForm[rxy[θ]]

rxz[θ_]:={{1,0,0,0},{0,Cos[θ],0,-Sin[θ]},{0,0,1,0},{0,Sin[θ],0,Cos[θ]}}

MatrixForm[rxz[θ]]

ryz[θ_]:={{1,0,0,0},{0,1,0,0},{0,0,Cos[θ],-Sin[θ]},{0,0,Sin[θ],Cos[θ]}}

MatrixForm[ryz[θ]]

wx=rwx[π/2].#&/@pointList

owx=Ordering[Ordering[wx]]

wy=rwy[π/2].#&/@pointList

owy=Ordering[Ordering[wy]]

wz=rwz[π/2].#&/@pointList

owz=Ordering[Ordering[wz]]

xy=rxy[π/2].#&/@pointList

oxy=Ordering[Ordering[xy]]

xz=rxz[π/2].#&/@pointList

oxz=Ordering[Ordering[xz]]

yz=ryz[π/2].#&/@pointList

oyz=Ordering[Ordering[yz]]

a[list_]:=list[[owx]]
b[list_]:=list[[owy]]
c[list_]:=list[[owz]]
d[list_]:=list[[oxy]]
e[list_]:=list[[oxz]]
f[list_]:=list[[oyz]]

result5[0]={o};
result5[n_]:=result5[n]=Union[Join@@({a[#],b[#],c[#],d[#],e[#],f[#]}&/@result5[n-1]),result5[n-1]]

Table[Length[result5[n]],{n,0,20}]//AbsoluteTiming

Table[result5[n]==result5[n+1],{n,0,30}]

result5[7]

Table[result5[n]==result4[n],{n,0,30}]

result5[7]==result4[7]