Let $M$ be a projection matrix. We know that $$ v'Mv=(Mv)'(Mv)=\sum^n_{i=1}\sum^n_{j=1}v_iM_{ij}v_j\leq \sum^n_{i=1}v_i^2 $$ where $v$ is a column vector with dimension compatible to $M$.
Can we conclcude the same thing with following? $$ v'M'PMv=(Mv)'(PMv)=\sum^n_{i=1}\sum^n_{j=1}v_i[\sum_{k}M_{ik}(PM)_{kj}]v_j\leq \sum^n_{i=1}v_i^2 $$ where $P$ is a permutation matrix.
If the answer is no, can we put addition restriction on $P$ to make it true? For example, if $$ P= \begin{pmatrix} 0 & 1 & 0 & 0 &\cdots\\ 1 & 0 & 0 & 0&\vdots\\ \vdots & \vdots & \ddots& \ddots &\vdots\\ 0 & 0 & \cdots & 0&1\\ 0 & 0 & \cdots & 1&0 \end{pmatrix} $$
The result you're looking for holds as a consequence of the Cauchy Schwarz inequality. I will use $\|x\|$ to refer to the norm $\|x\| = \sqrt{x'x}$. We note that $\|Px\| = \|x\|$ for all $x$. Thus, we can apply the CS inequality to get $$ v'M'PMv = (Mv)'(PMv) \leq \|Mv\| \cdot \|PMv\| = \|Mv\|^2 \leq \|v\|^2. $$