How to generalize symmetry for higher-dimensional arrays? @BrianM.Scott 's answer to this question Q: 3-dimensional array  suggests that there is no standard concept of symmetry for 3-, 4-, N-dimensional arrays, in constrast to the case for 2-D arrays, as in linear algebra for matrices.  Are there alternative definitions of symmetry for higher-dimensional arrays?  Are there specific definitions that are widely used in certain contexts, e.g. in tensor calculus?
(I don't have a specific need; I'm trying to help implement a symmetry test for a matrix library [core.matrix for the Clojure language].  Since the library allows higher-dimensional arrays, there's a question about whether there is a natural choice for what the symmetry test should return for higher-dimensional arrays.)
 A: I would say an $N$-way array is symmetric if an element is the same if the indices is permuted, for all permutations.
So, an array $T$ with elements $t_{i_1, i_2, \dots, i_N}$ is symmetric if for all permutations $\sigma \in S_N$, where $S_N$ is the symmetric group on $\{1, 2, \dots, N\}$, we have 
$$t_{i_1, i_2, \dots, i_N} = t_{i_{\sigma 1}, i_{\sigma 2}, \dots, i_{\sigma N}}$$
for all elements $t_{i_1, i_2, \dots, i_N}$.
For $2 \times 2$ arrays this reduces to just swapping the two indices, leading to the equation $t_{i,j} = t_{j,i}$.
So, if we have a $2 \times 2 \times 2$ array $T$, we want the following equalities to hold:
$$
\begin{align}
t_{1,1,1} \\
t_{1,1,2} = t_{1,2,1} = t_{2,1,1} \\
t_{1,2,2} = t_{2,1,2} = t_{2,2,1} \\
t_{2,2,2}
\end{align}
$$
A: When talking about symmetry for finite dimensional arrays, we usually need a symmetry group and an index set on which the group actions. If every element remain invariant when its index varies under action of symmetry group, we call it symmetry. For example, for torsion-free connection $\Gamma^i_{kj}=\Gamma^i_{jk}$, we call it symmetric because there's an index set $\{j,k\}$ such that element remains invariant when indices in the set varies under symmetry group $S_2$. 
In general, given a set of bases $e_1,\ldots,e_n$ for each dimension of array, array can be expressed as $A=A_{i_1,\ldots,i_n}e_1\otimes\cdots\otimes e_n$. This is tensor algebra $T(V)$. To give different symmetry sub-algebras, we shall specify a equivalent relation $\sim$ on bases $e_i$'s via non trivial subgroup of a symmetry group $S_n$ (say, $e_i\otimes e_j=e_j\otimes e_i$). Then the symmetry tensor algebra is precisely $S(V)=T(V)/\sim$.
