Proof that the Hotelling T$^2$ statistic is invariant under the choice of contrast matrices Consider an one-way repeated measures design with $n$ subjects and $q$ measurements.  
It is assumed that $\mathbf{x}_{i}$ are $iid$ q x 1 random vectors that follow multivariate normal distribution,
where $i$ is the index of subjects.
Using the multivariate approach, the null hypothesis for the time effect is $H_{0}:\mu_{1}=\mu_{2}=...=\mu_{q},$ where $\mu_{j}$ is the population mean for the $j$th measurement.  
By letting $\boldsymbol{\mu}=[\mu_{1},...,\mu_{q}]^\top,$ the null hypothesis is equivalent to
$H_{0}:\boldsymbol{\mu}=k\mathbf1,$where $k$ is some constant and $1$ is the q x 1 vector of ones.  
By picking any (q-1) x q contrast matrix $\mathbf{C}$ such that $\mathbf{C}\mathbf1=\mathbf{0}$ (i.e., each row sum to zero),
the null hypothesis can again be restated as
$H_{0}:\mathbf{C}\boldsymbol{\mu}=\mathbf{0}$  
The most natural choice of $\mathbf{C}$ is perhaps something like $\begin{bmatrix} 1 & -1 & 0 & 0 & \dots \\ 0 & 1 & -1 & 0 & \dots \\ 0 & 0 & 1 & -1 & \dots \\\vdots & \vdots & \vdots & \vdots & \vdots &\\ \end{bmatrix},$  
which simply contrasts time 1 with time 2, time 2 and time 3, etc., but I can intuitively understand why an arbitrary $\mathbf{C}$ (s.t.$\mathbf{C}\mathbf1=\mathbf{0}$) will do the same job.  
Now, the one-sample Hotelling $T^{2}$ statistic is computed as $n(\mathbf{C}\bar{\mathbf{x}})^\top(\mathbf{C}\mathbf{S}\mathbf{C}^\top)^{-1}(\mathbf{C}\bar{\mathbf{x}}), $ where
$\bar{\mathbf{x}}=\frac{1}{n}\sum_{i=1}^{n}\mathbf{x}_{i}, $ and $\mathbf{S}=\frac{1}{n-1}\sum_{i=1}^{n}(\mathbf{x}_{i}-\bar{\mathbf{x}})(\mathbf{x}_{i}-\bar{\mathbf{x}})^\top$  
My question is that:
Although it is reasonable to think that this $T^{2}$ quantity will not change with the choice of $\mathbf{C}$
as long as $\mathbf{C}\mathbf1=\mathbf{0}$ (I have tried many different $\mathbf{C}$ and this seems to be indeed the case),
what is the mathematical proof for this result?
 A: To test the null hypothesis $H_{0}\!:\mu_{1}=\mu_{2}=\ldots=\mu_{q}$ via Hotelling's one-sample $T^2$ statistic, $\mathbf{C} \in \mathbb R^{(q-1) \times q}$ can't be an arbitrary matrix with $\mathbf{C}\mathbf1=\mathbf{0}$. It certainly must have $q-1$ linearly independent rows and can be a matrix $\mathbf{C}=\mathbf{A}\tilde{\mathbf{C}}$ obtained by transforming
$$
\tilde{\mathbf{C}}=
\begin{pmatrix} 
1 & -1 \\ 
& 1 & -1 \\
& & \; \ddots & \ddots \\
& & & 1 & -1
\end{pmatrix} 
\in \mathbb R^{(q-1) \times q}
$$
by some invertible matrix $\mathbf{A} \in \mathbb R^{(q-1) \times (q-1)}$ since
$$
\mathbf{C}\boldsymbol{\mu} = \mathbf{0} \iff \tilde{\mathbf{C}}\boldsymbol{\mu} = \mathbf{0}
$$
and
$$
\begin{align}
\left(\mathbf{C}\bar{\mathbf{x}}\right)^\top\left(\mathbf{C}\mathbf{S}\mathbf{C}^\top\right)^{-1}\left(\mathbf{C}\bar{\mathbf{x}}\right)
=\,&\left(\left(\mathbf{A}\tilde{\mathbf{C}}\right)\bar{\mathbf{x}}\right)^\top\left(\left(\mathbf{A}\tilde{\mathbf{C}}\right)\mathbf{S}\left(\mathbf{A}\tilde{\mathbf{C}}\right)^\top\right)^{-1}\left(\left(\mathbf{A}\tilde{\mathbf{C}}\right)\bar{\mathbf{x}}\right)\\
=\,&\bar{\mathbf{x}}^\top\tilde{\mathbf{C}}^\top\mathbf{A}^\top\left(\mathbf{A}\left(\tilde{\mathbf{C}}\mathbf{S}\tilde{\mathbf{C}}^\top\right)\mathbf{A}^\top\right)^{-1}\mathbf{A}\tilde{\mathbf{C}}\bar{\mathbf{x}}\\
=\,&\bar{\mathbf{x}}^\top\tilde{\mathbf{C}}^\top\mathbf{A}^\top\left(\mathbf{A}^\top\right)^{-1}\left(\tilde{\mathbf{C}}\mathbf{S}\tilde{\mathbf{C}}^\top\right)^{-1}\mathbf{A}^{-1}\mathbf{A}\tilde{\mathbf{C}}\bar{\mathbf{x}}\\
=\,&\left(\tilde{\mathbf{C}}\bar{\mathbf{x}}\right)^\top\left(\tilde{\mathbf{C}}\mathbf{S}\tilde{\mathbf{C}}^\top\right)^{-1}\left(\tilde{\mathbf{C}}\bar{\mathbf{x}}\right).
\end{align}
$$
