On a matrix problem in the field $\mathbb F_2$ Given $M$ a symmetric matrix in $\mathbb F_2^{n\times n}$ having $\mathsf{det}_\mathbb R(M)\neq0$ (non-singular in reals) and satisfying $PMP'=(M+J+I)$ or $P(M+J+I)P'=M$ where $P$ is a permutation matrix in $\mathbb F_2^{n\times n}$ and where $J$ is all $1$s and $I$ is identity matrix in $\mathbb F_2^{n\times n}$ ($'$ is transpose and so $P'=P^{-1}$ holds).
$\mathsf{Det}(M)=\mathsf{Det}(M+J+I)$ and $\mathsf{Det}(M+I)=\mathsf{Det}(M+J)$ are satisfied as $\mathsf{Det}(P)\equiv1\bmod2$.

Can $M,M+I\not\in\mathsf{SL}(n,\mathbb F_2)$ be simultaneously impossible?


Is there an example of $\mathsf{det}(M)+\mathsf{det}(M+I)\equiv1\bmod2$?

Update Antoine Labelle's comments below suggests either $M,M+I\in\mathsf{SL}(n,\mathbb F_2)$ or $M,M+I\not\in\mathsf{SL}(n,\mathbb F_2)$ holds and he has no situation $\mathsf{det}(M)+\mathsf{det}(M+I)\equiv1\bmod2$.
 A: Some computation in sage yielded the following example, with $n=8$ and $P$ the cyclic permutation $(12345678)$:
$$M=\left(
\begin{array}{cc}       
0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 \\
0 & 0 & 1 & 1 & 1 & 1 & 0 & 1 \\
0 & 1 & 0 & 0 & 0 & 0 & 0 & 1 \\
0 & 1 & 0 & 0 & 1 & 1 & 1 & 1 \\
0 & 1 & 0 & 1 & 0 & 0 & 0 & 0 \\
1 & 1 & 0 & 1 & 0 & 0 & 1 & 1 \\
0 & 0 & 0 & 1 & 0 & 1 & 0 & 0 \\
1 & 1 & 1 & 1 & 0 & 1 & 0 & 0 \\  
\end{array}   
\right)$$
Interesting observation: Computation seems to show, however, that we always have $\text{det}(M)= \text{det}(M+I)$ (at least for cyclic permutations, which are the ones I tested). In other words, $M$ cannot have one of $0,1$ as an eigenvalue without the other. I wonder if this could be proven.
EDIT: Here is an example (still for a cyclic permutation) with nonzero determinant in characteristic $0$ if we replace the elements of $\mathbb{F}_2$ by their representative in $\{0,1\}$. The characteristic $0$ determinant is $16$.
$$M=\left(
\begin{array}{cc}       
0 & 0 & 0 & 0 & 1 & 1 & 0 & 1 \\
0 & 0 & 1 & 1 & 1 & 0 & 0 & 1 \\
0 & 1 & 0 & 0 & 0 & 0 & 1 & 1 \\
0 & 1 & 0 & 0 & 1 & 1 & 1 & 0 \\
1 & 1 & 0 & 1 & 0 & 0 & 0 & 0 \\
1 & 0 & 0 & 1 & 0 & 0 & 1 & 1 \\
0 & 0 & 1 & 1 & 0 & 1 & 0 & 0 \\
1 & 1 & 1 & 0 & 0 & 1 & 0 & 0 \\  
\end{array}   
\right)$$
A: Most of the question has already been addressed. As regards the last part, I just poit out that if ${\rm det} M = 0$ and ${\rm det}(M+I) = 1$, then we must have ${\rm rank}(M) = n-1$ ( I mean here the $\mathbb{F}_{2}$ rank). This follows since $M + I + J$ is (by assumption) similar to $M$, and hence has the same rank. If that rank is $n-2$ or less, then the null space of $M+I+J$ is at least two-dimensional, and the null space of $J$ is $n-1$ dimensional. Hence there is a non-zero column vector $v$ with $(M+I+J)v = 0$ and $Jv = 0.$ Hence $(M+I)v = 0,$ so that ${\rm det}(M+I) = 0.$
