Can we construct the following matrix groups in Magma? If so, how and is there a uniform method?
\begin{pmatrix}
SO_7(2) & *_{7 \times 1}\\
0 & 1\\
\end{pmatrix}
and
\begin{pmatrix}
SL_2(2) & *_{3 \times 2} & * _{2\times 2}\\
0 & SL_3(2) & 0\\
0 & 0 & SL_2(2)
\end{pmatrix}
where * denotes a matrix with arbitrary entries in the field of $2$ elements.
Letting the group act on the left, I'm aware the second group stabilizes the subspace spanned by the first two standard basis elements but the last two basis elements will be sent to a space spanned by the first two and the last two.
So I suppose it should look like:
X := SL(7,2);
V := VectorSpace(X);
G := Stabilizer(X, sub<V|V.1,V.2> );
I'm sure there is more to it but not sure how to proceed.
And for the first group, not familiar with special orthogonal group so no clue so far. Should I construct the group in $SO^{+}(8,2)$?
It is probably better to construct generators of the groups directly rather than using $\mathtt{Stabilizer}$. You can do the first one as follows:
which gives:
(Note that ${\rm SO}(7,2) \cong {\rm Sp}(6,2)$.)