Solution (source code)

= Solution

Here is <Witt's lemma> with the hypotheses appropriate to the <classical groups>. Let $V$ be finite-dimensional with a nonsingular <alternating bilinear form>, a nonsingular <symmetric bilinear form> in <characteristic> different from two, or a nonsingular <Hermitian form> with nontrivial involution. Every <isometry of a space with a form> $\phi:U\to U'$ between <vector subspaces> extends to a form-preserving <automorphism> of $V$. For <quadratic forms>, the same statement holds in every <characteristic> when the <polar bilinear form of a quadratic form> is nonsingular and the <isometry of a space with a form> preserves the <quadratic form> itself. \b[The restricted forms on $U,U'$ may be degenerate.] We prove these versions, including the characteristic-two quadratic case needed later.

For an <alternating bilinear form> $B$, split the restricted space as $U=H\oplus R$, where $R=U\cap U^\perp$ and $B|_H$ is nonsingular. Choose a <symplectic basis> for $H$ and a <basis> $r_1,\ldots,r_t$ of $R$. The <nondegenerate> form on $V$ supplies vectors $s_j$ in $H^\perp$ with $B(r_i,s_j)=\delta_{ij}$. Adding linear combinations of the $r_i$ to the $s_j$ makes $B(s_i,s_j)=0$: for each pair $i<j$ one may cancel its pairing by adding an appropriate multiple of $r_i$ to $s_j$, without disturbing the dual pairings or previously treated pairs. This uses no division by two. Thus $H$ together with the pairs $(r_i,s_i)$ is nonsingular and its <orthogonal complement for a sesquilinear form> has a <symplectic basis>.

Apply the same construction to $\phi(H),\phi(r_i)$, choosing partners $s_i'$ there. The two completed <bases> have identical alternating <Gram matrices> and equal remaining <dimensions>. The <linear map> matching these <bases> preserves $B$ and agrees with $\phi$ on $H\oplus R=U$. This proves the alternating version over an arbitrary <field>, including <characteristic> two.

For a <quadratic form> $Q$, define its <polar bilinear form of a quadratic form> by $B(x,y)=Q(x+y)-Q(x)-Q(y)$. Its symmetry
$$
s_a(x)=x-\frac{B(x,a)}{Q(a)}a\qquad(Q(a)\ne0)
$$
preserves $Q$. The zero-dimensional case is immediate. Induct on $\dim U$: choose $Q(t)\ne0$ and a <hyperplane> $K\subseteq U\cap t^\perp$. Extending $\phi|_K$ first reduces to $\phi|_K=I$. Put $U=K\oplus Fu$, $v=\phi(u)$, $d=u-v\in S=K^\perp$. If $Q(d)\ne0$, $s_d$ completes the extension. Otherwise $B(u,d)=B(v,d)=0$. The <hyperplanes> $H=S\cap u^\perp$, $H'=S\cap v^\perp$ are proper because $S^\perp=K$.

For $a\in S\setminus(H\cup H')$ with $Q(a)\ne0$, set $c=u-s_a(v)$. Then
$$
Q(c)=\frac{B(u,a)B(v,a)}{Q(a)}\ne0,
$$
and $s_as_c$ fixes $K$ and sends $u$ to $v$. If no such $a$ exists and $|F|>2$, the identity
$$
0=Q(a+\lambda z)=\lambda^2Q(z)+\lambda B(a,z),\qquad z\in H\cap H',\quad\lambda\in F
$$
forces $Q(z)=B(a,z)=0$. The complement of two <hyperplanes> spans $S$: adding a multiple of any outside vector avoids at most two forbidden scalars. Hence $d\perp S$, so $H=H'$, forcing $Q|_S=0$, contrary to $t\in S$.

Over $\mathbb F_2$, choose $a$ outside both <hyperplanes>. In the remaining case $Q(a)=Q(d)=B(a,d)=0$, and $B(a,u)=B(a,v)=1$. The explicit map
$$
g(x)=x+B(d,x)a+B(a,x)d
$$
has $g^2=I$, preserves $Q$ by cancellation of its two cross terms, fixes $K$ and sends $u$ to $v$. This closes the induction. The characteristic-independent symmetry argument and its binary exceptional step are also treated in https://www.math.ubc.ca/~cass/research/pdf/QForms.pdf[Casselman's quadratic-form notes] and https://www.math.ucla.edu/~rse/book/Kniga.pdf[Elman, Karpenko and Merkurjev, section 8].

In odd <characteristic> a <symmetric bilinear form> is recovered by the <polarization identity> for $Q(x)=B(x,x)/2$, so the quadratic proof also proves its extension theorem. For completeness, the <Hermitian form> case has a similarly explicit induction. Take $h$ linear in the first variable, with conjugation $a\mapsto\bar a$. For <anisotropic vectors for a form> $u,v$ with equal value $A=h(u,u)=h(v,v)\ne0$, let $d=u-v$ and $c=h(u,d)$. When $c\ne0$, the rank-one map
$$
g(x)=x-\frac{h(x,d)}c\,d
$$
sends $u$ to $v$ and preserves $h$, since $h(d,d)=c+\bar c$ and the extra coefficient in $h(gx,gy)$ is
$$
-\frac1c-\frac1{\bar c}+\frac{c+\bar c}{c\bar c}=0.
$$
When $c=0$, insert $\lambda u$ with $\lambda\bar\lambda=1$, $\lambda\ne1$, and use two such maps. Such a scalar exists for a nontrivial involution: $\lambda=a/\bar a$ with $a\ne\bar a$ works. If the source <vector subspace> contains an <anisotropic vector for a form>, align it this way and induct in its nonsingular <orthogonal complement for a sesquilinear form>.

If instead every source vector is isotropic, the Hermitian <polarization identity> makes its whole restricted form zero. Choose $e$ in its <basis> and a partner $f$ pairing to one with $e$ and to zero with the remaining source <basis>. Make $h(f,f)=0$ by replacing $f$ by $f-te$, where $t+\bar t=h(f,f)$. The trace map is onto the fixed <field>: in odd <characteristic> divide by two; in <characteristic> two scale a nonzero trace. Choose $a+\bar a\ne0$. The orthogonal vectors $e+af$ and $e-\bar af$ have nonzero values $a+\bar a$ and its negative, so the preceding rank-one construction aligns this entire <hyperbolic pair> with its target pair. The remaining source <basis> lies in the pair's <orthogonal complement for a sesquilinear form>; induction finishes the Hermitian proof.

The hypotheses matter. For example, the identity-matrix <symmetric bilinear form> on $\mathbb F_2^3$ has canonical vector $c=(1,1,1)$ characterized by $B(x,c)=B(x,x)$, so every <isometry of a space with a form> fixes $c$. The one-dimensional map $e_1\mapsto c$ preserves the restricted <bilinear form> but cannot extend. Thus “all symmetric forms in <characteristic> two” is not a correct replacement for the quadratic or alternating versions proved above.