Simplify the expression The below expression has three summations (sigmas) and $L$ is a real-matrix and symmetric, $X$ is a real matrix with $n$ rows and $X_{p\mathbb{.}},X_{q\mathbb{.}}$ denote the $p$ and $q$ rows of matrix $X$. 
$f(.)$ is a function acting on pairs of rows of $X$ and produces a scalar-real value. $c_p^t$ denotes the entry $t$ in a vector $c_p$ and $c_{q}^{s}$ denotes the entry $s$ in a vector $c_q$. $(L)^\dagger$ is the pseudo-inverse of $L$ and it is also a symmetric matrix in this problem. 
I want the below expression to be simplified as much as possible!
ex: There may be redundancy in the summations and may be it can be expressed using two sigma's only? etc..
$\sum_{i,j=1}^{n} L_{ij} \sum_{p,q=1}^{n} \sum_{t,s=1}^{d}f(X_{p\mathbb{.}},X_{q\mathbb{.}})(L)^{\dagger }_{it}c_{p}^{t}(L)^{\dagger }_{js}c_{q}^{s}$
 A: The best one can do here, I think is to see the matrix multiplications and rewrite them first, we have
\[ \sum_t L^\dagger_{it}c^t_p = (L^\dagger \cdot c_p)_i,\quad \sum_s L^\dagger_{js}c^s_q = (L^\dagger \cdot c_q)_j \]
giving (after some reordering)
$$ \sum_{p,q} f(X_{p\cdot}, X_{q\cdot}) \sum_{i,j} (L^\dagger \cdot c_p)_i  L_{ij} (L^\dagger \cdot c_q)_j $$
Now the sum over $j$ is again a matrix product, we have
$$ \sum_j L_{ij} (L^\dagger c_q)_j = (LL^\dagger c_q)_i $$
so we are left with
$$ \sum_{p,q} f(X_{p\cdot}, X_{q\cdot}) \sum_{i} (L^\dagger \cdot c_p)_i  (LL^\dagger \cdot c_q)_i. $$
The sum over $i$ is a scalar product, we write it as matrix product with the transposed vector, using the symmetry of $L^\dagger$:
$$\sum_{i} (L^\dagger \cdot c_p)_i  (LL^\dagger \cdot c_q)_i = c_p^\top L^\dagger L L^\dagger c_p$$
Now, by definition of the pseudoinverse, $L^\dagger L L^\dagger = L^\dagger$, giving
$$ \sum_{p,q} f(X_{p\cdot}, X_{q\cdot}) \cdot c_p^\top L^\dagger c_q $$
As we don't know anything more about $f$ or the $c_\cdot$s, I don't think we can do more in general.
