Consider a positive integer $n$ and integers $(c_i)_{1\le i \le 4}$, with $1 \le c_i \le n$. Conside the map:
$$f_n: (c_1,c_2,c_3,c_4) \mapsto \delta_{c_1,c_2}\delta_{c_3,c_4} - \# \{ |2n+1-2|x||, \ x \in \{c_1+c_2, c_3+c_4, c_1-c_2, c_3-c_4\} \},$$
where the notation $\#$ means cardinal. The problem is to show that this map is invariant by permutation, i.e. $\forall \sigma \in S_4$ $$ f_n(c_1,c_2,c_3,c_4) = f_n(c_{\sigma(1)},c_{\sigma(2)},c_{\sigma(3)},c_{\sigma(4)}). $$
I see a straightforward way to prove that by cases, but it should be quite long.
Question: Is there a short (conceptual) way to prove that?
Context: this problem poped up to prove that some rings (parametrized by $n$) are associative.
For the conveniance of the reader, here is the checking for $n<100$:
First of all, the symmetric group $S_r$ is generated by $\sigma_i = (i,i+1)$ for $i=1,\dots, r-1$. Here $r=4$ and the shape of the map provides immediately the invariance by $\sigma_1$ and $\sigma_3$. So it remains to show the invariance by $\sigma_2$:
Code
cpdef delta(int c1, int c2): if c1==c2: return 1 else: return 0 cpdef map(int c1, int c2, int c3, int c4,int n): cdef int x return delta(c1,c2)*delta(c3,c4)-len(set([abs(2*n+1-2*abs(x)) for x in [c1+c2,c3+c4,c1-c2,c3-c4]])) cpdef test(int N): cdef int n,c1,c2,c3,c4 for n in range(1,N): for c1 in range(1,n+1): for c2 in range(1,n+1): for c3 in range(1,n+1): for c4 in range(1,n+1): if map(c1,c2,c3,c4,n)!=map(c1,c3,c2,c4,n): print([c1,c2,c3,c4,n]) Computation
sage: test(100) sage: