Since \(\hat{N}\)  is an open dense subset of \( by Lemma~\ref {lem_properties_of_f}, we may choose \) gG\( such that \)\(g\cdot \lbrace \hat{W}_1^i\rbrace _{0\le i\le 4})=\lbrace g\cdot \hat{W}_1^i\rbrace _{0\le i\le 4})\)\( lies in \) N\(. Then we may let \) W1i:=(ng)W1i\( for \) 0i4\(, where \) nN\( satisfies \) n(g(W13,span(W13,W12)))=(W1-,W2-)\(.\)

By Lemma REF (2) and the connectedness of \(U\) , it suffices to show that \(f\)  locally agrees with some element of \(\operatorname{PGL}(3,\mathbb {R})\)  near \(x\) . Therefore after shrinking \(U\)  we may assume that \(f\)  is fibration-preserving, not just locally fibration-preserving.
After pre/postcomposing with elements of \(\operatorname{PGL}(3,\mathbb {R})\) , we assume without loss of generality that \(x=(W_1^-,W_2^-)\in U\) , \(f(x)=x\) , and \(D_Pf(x)\)  is defined and an isomorphism.
Let \(\lbrace \tilde{W}_1^i\rbrace _{0\le i\le 4}\subset \hat{N}\)  be the augmented projective frame from Lemma REF . For \(r>0\)  let \(\lbrace W_1^i\rbrace _{0\le i\le 4}\)  be the image of \(\lbrace \tilde{W}_1^i\rbrace _{0\le i\le 4}\)  under \(\hat{\delta }_r\) ; we may assume \(r\)  is small enough that \(\lbrace W_1^i\rbrace _{0\le i\le 4})\in U\) .
Claim If \(r\)  is sufficiently small, then \(\lbrace f_1(W_1^i)\rbrace _{0\le i\le 3}\)  is a projective frame.

 
Since \(f\)  is Pansu differentiable at \(x\)  and \(D_Pf(x)\)  is an isomorphism
\(\hat{\delta }_{r^{-1}}\circ f\circ \hat{\delta }_r\rightarrow D_Pf(x)\) 
uniformly on compact sets as \(r\rightarrow 0\) , where \(D_Pf:\hat{N}\rightarrow \hat{N}\)  is a graded automorphism; here we identify \(N\)  with \(\hat{N}\) .
Note that \(D_Pf(x):\hat{N}\rightarrow \hat{N}\)  is fibration-preserving because it is a limit of fibration-preserving maps. By Lemma REF (3) there exist \(\lambda _1,\lambda _2,\lambda _3\ne 0\)  such that \(\hat{\Phi }=\operatorname{diag}(\lambda _1,\lambda _2,\lambda _3) \in \operatorname{PGL}(3,\mathbb {R})\)  agrees with \(D_Pf(x)\)  on \(\hat{N}\) . Therefore \((\hat{\Phi })_1\)  maps \(\lbrace \tilde{W}_1^i\rbrace _{0\le i\le 3}\)  to a projective frame.
It follows that for \(r\)  small both \(\lbrace (\hat{\delta }_{r^{-1}}\circ f\circ \hat{\delta }_r)_1(\tilde{W}_1^i)\rbrace _{0\le i\le 3}\)  and \(\lbrace f_1(W_1^i)=(f\circ \hat{\delta }_r)_1(\tilde{W}_1^i)\rbrace _{0\le i\le 3}\)  are projective frames.
Let \(\lbrace \hat{W}_1^i\rbrace _{0\le i\le 4}\)  be the standard augmented projective frame, and let \(\hat{W}_2^{ij}:=\operatorname{span}(\hat{W}_1^i,\hat{W}_1^j)\)  for \(0\le i\ne j\le 4\) .
Since \(\lbrace W_1^i\rbrace _{0\le i\le 3}\)  and \(\lbrace f_1(W_1^i)\rbrace _{0\le i\le 3}\)  are both projective frames, there are elements \(g_1,g_2\in \operatorname{PGL}(3,\mathbb {R})\)  such that \(g_1(\hat{W}_1^i)=W_1^i\)  and \(g_2(f_1(W_1^i))=\hat{W}_1^i\)  for \(0\le i\le 3\) . We let \(\hat{U}:=g_1^{-1}(U)\subset  and \) f:=g2fg1:U.
Then \(\lbrace \hat{W}_1^i\rbrace _{0\le i\le 4})\subset \hat{U}\) , the map \(\hat{f}\)  is fibration-preserving, and \((\hat{f})_1(\hat{W}_1^i)=\hat{W}_1^i\)  for all \(0\le i\le 3\) . Since two distinct lines lie in a unique plane, and two distinct planes intersect in a line, the fact that \(\hat{f}\)  is fibration-preserving implies that:

\(\hat{f}_2(\hat{W}_2^{ij})=\hat{W}_2^{ij}\)  for \(0\le i\ne j\le 3\) .

\(\hat{f}_1(\hat{W}_1^4)=(\hat{f})_1(\hat{W}_2^{30}\cap \hat{W}_2^{12})=\hat{W}_1^4\) .

\(\hat{f}_2(\hat{W}_2^{ij})=\hat{W}_2^{ij}\)  for \(0\le i\ne j\le 4\) .

\(\hat{f}(\hat{W}_1^i,\hat{W}_2^{ij})=(\hat{W}_1^i,\hat{W}_2^{ij})\)  for \(0\le i\ne j\le 4\) .

Since \(\hat{f}_1([e_3])=[e_3]\) ,
for small \(r>0\)  we may define \(\phi :\mathbb {R}^2\supset B(0,r)\rightarrow \mathbb {R}^2\)  by \(\operatorname{span}(\phi (x_1,x_2),1)=\hat{f}_1(\operatorname{span}(x_1,x_2,1))\) .
The map \(\hat{f}\)  is fibration-preserving and it fixes the standard augmented projective frame, so the hypotheses of Lemma REF  hold for \(\phi \) . Applying Lemma REF  to \(\phi \) , we get that for some \(m\in \mathbb {R}\)  we have \(\hat{f}_1([x_1,x_2,1])=[mx_1,mx_2,1]\)  for \(x_1,x_2\in \mathbb {R}\)  small.
Suppose \(m=0\) . Then \(\hat{f}\) , and hence also \(f\) , takes values in a single fiber of \(\pi _1\)  near \(x=(W_1^-,W_2^-)\) . It follows that the Pansu differential \(D_Pf(x)=\lim _{r\rightarrow 0}\hat{\delta }_{r^{-1}}\circ f\circ \delta _r\)  takes values in a single fiber of \(\pi _1\) ; this contradicts the nondegeneracy of the Pansu differential. Hence \(m\ne 0\) .
Let \(\hat{g}:=\operatorname{diag}(m,m,1)\in \operatorname{PGL}(3,\mathbb {R})\) . Then \(\hat{g}_1:1\rightarrow 1\)  agrees with \(\hat{f}_1\)  near \([e_3]\) . Since \(\hat{g}\)  and \(\hat{f}\)  are both fibration-preserving, they agree near \(x=(W_1^-,W_2^-)\) .

Proof of Proposition REF , general case
The \(n\ge 4\)  case is similar to the \(n=3\)  case. The replacement for Lemma REF  is:
Lemma 4.12 
Suppose \(V\subset \mathbb {R}^n\)  is a connected open subset, and
\(\phi =(\phi _1,\ldots ,\phi _n):V\rightarrow \mathbb {R}^n\) 
is a continuous map such for every \(v\in \lbrace e_1,\ldots ,e_n,e_1+\ldots +e_n\rbrace \)  and every line \(L\)  parallel to \(v\) , the image \(\phi (L\cap V)\)  is contained in a line parallel to \(v\) .
Then \(\phi \)  is of the form
\(\phi (x_1,\ldots ,x_n)=(mx_1+b_1,\ldots ,mx_n+b_n)\) 
for some \(m,b_1,\ldots ,b_n\in \mathbb {R}\) .

We omit the proof as it is similar to the proof of Lemma REF .
The \(n\ge 4\)  version of Lemma REF  is:
Lemma 4.14 
Suppose \(U\subset  is open and \) f:U is fibration preserving.

Suppose \(f\)  agrees with \(g\in \operatorname{PGL}(n,\mathbb {R})\)  near \((\bar{W}_1,\ldots ,\bar{W}_{n-1})\in U\) . For \(i\in \lbrace 1, \cdots , n-1\rbrace \) , let \(V_i\)  be the connected component of \(\pi _i^{-1}(\bar{W}_i)\cap U\)  containing \((\bar{W}_1,\ldots ,\bar{W}_{n-1})\) . Then \(f\)  agrees with \(g\)  near \(V_i\) .

For every \(g\in \operatorname{PGL}(n,\mathbb {R})\) , the set where \(f\)  locally agrees with \(g\)  is a connected component of \(U\) .


We prove the lemma by induction on the dimension \(n\ge 3\) . Lemma REF  covers the case \(n=3\) , so we may assume inductively that the lemma holds for dimensions strictly smaller than \(n\) .
(1). We may assume without loss of generality that \(g=\operatorname{id}\) . Suppose \(f\equiv \operatorname{id}\)  on an open subset \(V\subset U\)  containing \((\bar{W}_1,\ldots ,\bar{W}_{n-1})\) . Arguing by contradiction, suppose \(i\in \lbrace 1, \cdots , n-1\rbrace \) , and for some \((W_1,\ldots ,W_{n-1})\in V_i\) , there is a sequence \( \lbrace (W_1^j,\ldots ,W_{n-1}^j)\rbrace \subset U\)  which converges to \((W_1,\ldots ,W_{n-1})\)  as \(j\rightarrow \infty \) , but
\(f(W_1^j,\ldots ,W_{n-1}^j)\ne (W_1^j,\ldots ,W_{n-1}^j)\) 
for all \(j\) . After passing to a subsequence, we may assume that for all \(j\)  the connected component of \(\pi _i^{-1}(W_i^j)\cap U\)  containing \((W_1^j,\ldots ,W_{n-1}^j)\)  intersects \(V\) . Since \(f\)  is fibration preserving and \(f\equiv \operatorname{id}\)  on \(V\) , it follows that \(f\)  maps \(\pi _i^{-1}(W_i^j)\cap U\)  into \(\pi _i^{-1}(W_i^j)\) . Identifying \(\pi _i^{-1}(W_i^j)\)  with the flag manifold in \(\mathbb {R}^{n-1}\) , the restriction \(f\)  to \(\pi _i^{-1}(W_i^j)\)  induces a fibration-preserving mapping; by the induction assumption, since \(f\)  fixes \(V\)  it will also fix \((W_1^j,\ldots ,W_{n-1}^j)\) . This is a contradiction. Hence (1) holds.
(2). Note that each element of the basis \(X_{1,2},\ldots ,X_{n-1,n}\)  for \(V_1\subset \mathfrak {n}\)  is tangent to one of the subgroups \(K_j\)  for \(1\le j\le n-1\) . Hence we may use Lemma REF (4) and argue as in Lemma REF (2).
Definition 4.15 An indexed tuple \(\lbrace W_1^i\rbrace _{0\le i\le n}\subset 1\)  is a projective frame if any subset of \(n\)  elements spans \(\mathbb {R}^n\) . The standard projective frame \(\lbrace \hat{W}_1^i\rbrace _{0\le i\le n}\)  is given by \(\hat{W}_1^i=e_i\)  for \(1\le i\le n\) 
and \(\hat{W}_1^0=e_1+\ldots +e_n\) .
An indexed tuple \(\lbrace W_1^i\rbrace _{0\le i\le n+1}\subset 1\)  is an augmented projective frame if \(\lbrace W_1^i\rbrace _{0\le i\le n}\)  is a projective frame and \(W_1^{n+1}=\operatorname{span}(W_1^n,W_1^0)\cap \operatorname{span}(W_1^1,\ldots ,W_1^{n-1})\) . The standard augmented projective frame is \(\lbrace \hat{W}_1^i\rbrace _{0\le i\le n+1}\)  with \(\hat{W}_1^{n+1}=e_1+\ldots +e_{n-1}\) .

Given a subset \(\Sigma \subset 1\) , we obtain (possibly empty) subsets of \(j\)  and \(:{\begin{@align*}{1}{-1}j(\Sigma )&:=\lbrace \operatorname{span}(\Sigma ^{\prime })\mid \; \Sigma ^{\prime }\subset \Sigma ,\; |\Sigma ^{\prime }|=j,\; \dim \operatorname{span}(\Sigma ^{\prime })=j\rbrace \,.\\&\Sigma ):=\lbrace (W_1,\ldots ,W_{n-1})\in W_j\in j(\Sigma )\rbrace \,.\end{@align*}}\)
Lemma 4.16 There is an augmented projective frame \(\lbrace \tilde{W}_1^i\rbrace _{0\le i\le n+1}\subset 1\)  such that:

\(\lbrace \tilde{W}_1^i\rbrace _{0\le i\le n+1})\)  is contained in \(\hat{N}\) .

\(\operatorname{span}(\tilde{W}_1^n,\ldots ,\tilde{W}_1^{n-j+1}) =\operatorname{span}(e_n,\ldots ,e_{n-j+1})\)  for all \(1\le j\le n-1\) .


This follows as in the proof of Lemma REF .

The proof parallels the \(n=3\)  case closely, so we will be brief.
It suffices to show that \(f\)  locally agrees with some element of \(\operatorname{PGL}(n,\mathbb {R})\)  near \(x\) . Also, we may assume without loss of generality that \(f\)  is fibration-preserving, \(x=(W_1^-,\ldots ,W_{n-1}^-)\in U\) , \(f(x)=x\) , and that \(D_Pf(x)\)  is well-defined and an isomorphism.
For \(r>0\)  let \(W_1^i:=\hat{\delta }_r(\tilde{W}_1^i)\)  for \(0\le i\le n+1\) ; we take \(r\)  small enough that \(\lbrace W_1^i\rbrace _{0\le i\le n+1})\subset U\) .
Claim For \(r\)  small \(\lbrace f_1(W_1^i)\rbrace _{0\le i\le n}\subset 1\)  is a projective frame.

We omit the proof, as it is similar to claim in the proof of the \(n=3\)  case.
Let \(g_1,g_2\in \operatorname{PGL}(n,\mathbb {R})\)  be such that \(g_1(\hat{W}_1^i)=W_1^i\) , \(g_2(f_1(W_1^i))=\hat{W}_1^i\)  for \(0\le i\le n\) . We now define \(\hat{U}=g_1^{-1}(U)\)  and \(\hat{f}:=g_2\circ f\circ g_1:\hat{U}\rightarrow .\) Arguing as in the \(n=3\)  case, one obtains that \(\hat{f}\)  is fibration-preserving, \( \lbrace \hat{W}_1^i\rbrace _{0\le i\le n+1})\subset \hat{U}\) ,
\(f_j\)  fixes \(j(\lbrace \hat{W}_1^i\rbrace _{0\le i\le n+1})\)  elementwise and \(f\)  fixes \( \lbrace \hat{W}_1^i\rbrace _{0\le i\le n+1})\)  elementwise.
For \(r>0\)  small we define \(\phi :\mathbb {R}^n\supset B(0,r)\rightarrow \mathbb {R}^n\)  by
\(\operatorname{span}(\phi (x_1,\ldots ,n),1)=f_1(\operatorname{span}(x_1,\ldots ,x_n,1))\,.\) 
Applying Lemma REF , for some \(m\in \mathbb {R}\)  we get
\(\phi (x_1,\ldots ,x_n)=(mx_1,\ldots ,mx_n)\,.\) 
As in the \(m=3\)  case we see that \(m\ne 0\) , and that \(f_1\)  agrees with \(g:=\operatorname{diag}(m,\ldots ,m,1)\)  near \(e_n\) . This implies that \(f\)  agrees with \(g\)  near \(x=(W_1^-,\ldots ,W_{n-1}^-)\) .


The proof of Theorem  REF
For every \(x\in U\)  choose a connected open set \(U_x\subset U\)  containing \(x\)  and group elements \(\bar{g}_x,\bar{g}_x^{\prime }\in \operatorname{PGL}(n,\mathbb {R})\)  such that \(\bar{g}_x(U_x),\bar{g}_x^{\prime }(f(U_x))\subset \hat{N}\) , and let \(\hat{f}_x:=\bar{g}_x^{\prime }\circ f\circ \bar{g}_x^{-1}:\hat{N}\supset \hat{V}_x \rightarrow \hat{V}_x^{\prime }\subset \hat{N}\) , where \(\hat{V}_x:=\bar{g}_x(U_x)\) , \(\hat{V}_x^{\prime }:=\bar{g}_x^{\prime }(f(U_x))\) . Let \(f_x:=\alpha ^{-1}\circ \hat{f}_x\circ \alpha :N\supset V_x\rightarrow V_x^{\prime }\subset N\)  where \(V_x:=\alpha ^{-1}(\hat{V}_x)\) , \(V_x^{\prime }:=\alpha ^{-1}(\hat{V}_x^{\prime })\) .
By Corollary REF , for some \(\varepsilon _x\in \lbrace 0,1\rbrace \) , the map \(\tau ^{\varepsilon _x}\circ f_x\)  locally preserves the coset foliation of \(K_j\)  for all \(1\le j\le n-1\) . Now Lemma REF (4) gives that the map
\(\alpha \circ (\tau ^{\varepsilon _x}\circ f_x)\circ \alpha ^{-1}=(\alpha \circ \tau ^{\varepsilon _x}\circ \alpha ^{-1})\circ \hat{f}_x=\rho (\tau ^{\varepsilon _x})\circ \hat{f}_x\) 
locally preserves the fibration \(\pi _j\)  for \(1\le j\le n-1\) ; here we have used the fact that \(\rho (\tau )\circ \alpha =\alpha \circ \tau \) . Applying Proposition REF , we see that \(\rho (\tau ^{\varepsilon _x})\circ \hat{f}_x\)  agrees with some element of \(G\)  and therefore \(f=\rho (\Phi _x)\mbox{\Large $|$\normalsize }_{U_x}\)  for some \(\Phi _x\in \operatorname{Aut}(G)\) . Since \(\Phi _x\)  is locally constant as a function of \(x\) , by the connectedness of \(U\) , the automorphism \(\Phi _x\)  is independent of \(x\) , and so \(f=\rho (\Phi )\mbox{\Large $|$\normalsize }_U\)  for some \(\Phi \in \operatorname{Aut}(G)\) . By Lemma REF (1) we have \(\Phi =\Phi _0^{\varepsilon }\circ I_g\)  for some \(\varepsilon \in \lbrace 0,1\rbrace \) , \(g\in G\) , where \(\Phi _0\)  denotes transpose-inverse; then \(\rho (\Phi )=(\rho (\Phi _0))^{\varepsilon }\circ \rho (I_g)=\psi ^\varepsilon \circ g\)  using Lemma REF (5).


The complex and quaternionic cases
 
The arguments from the previous sections are also valid in the complex and quaternion cases, with some straightforward modifications. In this section we indicate what modifications are needed in these cases. The necessity for these modifications are due to the presence of nontrivial automorphisms of \(\mathbb {C}\)  and \(\mathbb {H}\)  and the non-commutativity of the quaternions.
We first recall some facts about quaternions. Given any quaternion
\(x=x_0+x_1i+x_2j+x_3k\in \mathbb {H}\)  (\(x_i\in \mathbb {R}\) ), the conjugation of \(x\)  is
\(\bar{x}=x_0-x_1i-x_2j-x_3k\) . It is easy to check that \(\overline{xy}=\bar{y}\bar{x}\)  for any \(x,y\in \mathbb {H}\) .
Let \(\lambda , \mu \)  be unit quaternions
satisfying \(\lambda ^2=\mu ^2=(\lambda \mu )^2=-1\) . Set \(\nu =\lambda \mu \) . Then we have
\(\mu =\nu \lambda \)  and \(\lambda =\mu \nu \) . Define a map
\(h=h_{\lambda , \mu , \nu }: \mathbb {H}\rightarrow \mathbb {H}\)  by
\(h(a_0+ia_1+ja_2+ka_3)=a_0+\lambda a_1+\mu a_2+\nu a_3.\) 
Then it is easy to check that \(h\)  is an automorphism of \(\mathbb {H}\) : it is a real linear isomorphism and \(h(xy)=h(x)h(y)\)  for any \(x, y\in \mathbb {H}\) . Conversely, for any automorphism \(h: \mathbb {H}\rightarrow \mathbb {H}\) , if we set
\(\lambda :=h(i)\) , \(\mu :=h(j)\) , \(\nu :=h(k)\) , then \(\lambda ^2=\mu ^2=\nu ^2=-1\) , \(\nu =\lambda \mu \)  and \(h=h_{\lambda , \mu , \nu }\) .
By the Skolem-Noether theorem, every automorphism of \(\mathbb {H}\)  is inner.

Changes needed for Section 2
Let \(F=\mathbb {C}, \mathbb {H}\) .
Let \(\operatorname{GL}(n,F)\)  be the group of invertible elements in the ring \(M_n(F)\)  of \(n\times n\)  matrices with entries in \(F\) .
The objects \(P_F^+, P_F^-\)  and \(N_F\)  are defined as before with \(\mathbb {R}\)  replaced by \(F\) . The group \(G_F\)  is defined as before in the complex case with \(\mathbb {R}\)  replaced with \(\mathbb {C}\) :
\(G_{\mathbb {C}}=\text{GL}(n, \mathbb {C})/{\lbrace \lambda \,\text{id}|0\ne \lambda \in \mathbb {C}\rbrace }.\) 
In the quarternion case it is defined by
\(G_{\mathbb {H}}=\text{GL}(n, \mathbb {H})/{\lbrace \lambda \,\text{id}\mid 0\ne \lambda \in \mathbb {R}\rbrace }.\) 
Note that
\(\lbrace aI\mid a\in \mathbb {H}\backslash \lbrace 0\rbrace \rbrace \)  is not normal in \(GL(n, \mathbb {H})\)  and so we cannot quotient out by this subgroup.
Similarly,
\(P_{\mathbb {C}}=P_{\mathbb {C}}^-/{\lbrace \lambda \,\text{id}\mid 0\ne \lambda \in \mathbb {C}\rbrace } \)  and
\(P_{\mathbb {H}}=P_{\mathbb {H}}^-/{\lbrace \lambda \,\text{id}\mid 0\ne \lambda \in \mathbb {R}\rbrace } . \)


The flag manifold
We view \(F^n\)  as a right \(F\)  module.
The flag manifold \({F}\)  is the set of (complete) flags in \(F^n\) , i.e. the collection of nested families of submodules of \(F^n\)
\(W_1\subset \ldots \subset W_{n-1}\) 
where \(W_j\)  has dimension (rank) \(j\) .
Matrix multiplication yields an action \(\operatorname{GL}(n,F)\operatorname{\curvearrowright }F^n\)  by \(F\) -module automorphisms in the usual way, which induces actions \(\operatorname{GL}(n,F)\operatorname{\curvearrowright }{k,F}\) ,
where \( {k,F}\)  is the Grassmannian of submodules of dimension (rank) \(k\) .
Lemma REF 
holds without changes.


Automorphisms
The map \(A\mapsto (A^*)^{-1}\)  is a Lie group automorphism of \(\operatorname{GL}(n,F)\) , where \(A^*\)  denotes the conjugate transpose of \(A\) .
So the map \(\tau : GL(n, F) \rightarrow GL(n, F)\)  given by \(\tau (A)=\Pi (A^*)^{-1}\Pi ^{-1}\)  is also an automorphism and
induces an automorphism (still denoted by \(\tau \) ) of \(\mathfrak {gl}(n, F)\)  which is given by
\((\tau (A))_{ij}=-\overline{A}_{n-j+1, n-i+1}.\) 
For any automorphism \(h\)  of \(F\) , the automorphism
\( GL(n, F) \rightarrow GL(n, F)\) , \((a_{ij})\mapsto (h(a_{ij}))\) 
of \(GL(n, F)\)  induces an automorphism of \(G\) , which we denote by
\(\hat{h}\) .
Theorem 6.1 ([1]}) 
Every automorphism of \(G_F\)  is induced by an automorphism of \(GL(n, F)\) .
The group
\(\text{Aut}(G_F)\)  is generated by \(\tau \) , maps of the form \(\hat{h}\)  (with
\(h\in Aut(F)\) ) and the inner automorphisms.

Notice that the automorphisms \(h\)  associated with
Lie group automorphisms are continuous.
We recall that there are only two continuous automorphism of \(\mathbb {C}\) : the identity map and the complex conjugation. On the other hand,
by the Skolem-Noether theorem, every automorphism \(h: \mathbb {H}\rightarrow \mathbb {H}\)  is inner.
It follows that the automorphism \(\hat{h}\)  of \(G_{\mathbb {H}}\) 
is also inner: if \(h=I_a\)  for some \(a\in \mathbb {H}\) , then \(\hat{h}=I_g\)  with
\(g=\text{diag}(a, \cdots , a)\) .
The following is the counterpart of
Lemma REF 
in the quaternion and complex cases.
Lemma 6.2 
Let \(F=\mathbb {C}, \mathbb {H}\) . Let \(n\ge 3\)  if \(F=\mathbb {H}\)  and \(n\ge 4\)  if \(F=\mathbb {C}\) .

If \(\Phi \in \operatorname{Aut}(G_F)\)  and \(\Phi (N_F)=N_F\) , then \(\Phi \)  induces a graded automorphism of \(N_F\)  if and only if \(\Phi \mbox{\Large $|$\normalsize }_{N_F}=\tau ^\varepsilon \circ \hat{h}\circ I_g\mbox{\Large $|$\normalsize }_{N_F}\)  for some \(\varepsilon \in \lbrace 0,1\rbrace \) , some continuous automorphism \(h\)  of \(F\)  and \(g=\operatorname{diag}(\lambda _1,\ldots ,\lambda _n)\in G_F\) .

Every graded automorphism of \(N_F\)  arises as in (1).

For \(1\le j\le n-1\)  let \(\mathfrak {k}_j\subset \mathfrak {n}_F\)  be the Lie subalgebra generated by \(\lbrace a X_{i,i+1}|a\in F, i\ne n-j\rbrace \) , and \(K_j\subset N_F\)  be the Lie subgroup with Lie algebra \(\mathfrak {k}_j\) . A graded automorphism \(N_F\rightarrow N_F\)  is induced by conjugation by some \(g=\operatorname{diag}(\lambda _1,\ldots ,\lambda _n)\)  if and only if it preserves the subgroups \(K_j\)  for \(1\le j\le n-1\) .


We remark that Lemma REF  (2) implies that every graded automorphism of \({\mathfrak {n}}_{n, \mathbb {C}}\)  is either complex linear or complex antilinear.
Let \(n\ge 3\) .
The proof of (1) and (3) are the same (by using Theorem REF )
as that of (1) and (3) in Lemma REF . Here we prove (2).
The proof is by induction on \(n\) . We first consider the case \(n=3\) .
Denote \(X=X_{12}\) , \(Y=X_{23}\)  and \(Z=X_{13}\) .
We have \([aX, bY]=abZ\)  for \(a, b\in \mathbb {H}\) . Note that the Lie bracket is not linear over \(\mathbb {H}\) .
Let \(\mathbb {H} X=\lbrace aX\mid a\in \mathbb {H}\rbrace \)  be the subspace spanned by \(X\) . It has dimension 4 over \(\mathbb {R}\) . Similarly we have \(\mathbb {H} Y\)  and \(\mathbb {H} Z\) .
The grading \(\mathfrak {n}_{3,\mathbb {H}}=V_1\oplus V_2\)  is given by
\(V_1=\mathbb {H} X\oplus \mathbb {H} Y\)  and \(V_2=\mathbb {H} Z\) .
Let \(A:\mathfrak {n}_{3,\mathbb {H}}\rightarrow \mathfrak {n}_{3,\mathbb {H}}\)  be a graded automorphism.
We claim that \(A\)  satisfies either \(A(\mathbb {H} X)= \mathbb {H} X\) ,
\(A(\mathbb {H} Y)= \mathbb {H} Y\)  or \(A(\mathbb {H} X)= \mathbb {H} Y\) ,
\(A(\mathbb {H} Y)= \mathbb {H} X\) . There are \(a, b\in \mathbb {H}\)  such that
\(A(X)=aX+bY\) . To prove the claim it suffices to show that \(a=0\)  or \(b=0\) . Suppose \(a, b\ne 0\)  we shall get a contradiction.
There are \(c, d\in \mathbb {H}\)  such that \(A(iX)=cX+dY\) .
As \([X, iX]=0\)  we have \(0=[A(X), A(iX)]=(ad-cb)Z\)  (being careful about the order in \(cb\) ), which yields \(a^{-1}c=db^{-1}\) .
Set \(\lambda =a^{-1}c\) . We have \(c=a\lambda \)  and \(d=\lambda b\)  and so
\(A(iX)=a\lambda X+\lambda b Y\) . Similarly there are \(\mu , \nu \in \mathbb {H}\)  such that
\(A(jX)=a\mu X+\mu b Y\)  and \(A(kX)=a\nu X+\nu b Y\) . By further considering
the brackets between \(A(iX)\) , \(A(jX)\) , \(A(kX)\)  we get
\(a\lambda \mu b=a\mu \lambda b\) , \(a\lambda \nu b=a\nu \lambda b\)  and
\(a \mu \nu b=a\nu \mu b\) . It follows that \(\lambda \) , \(\mu \)  and \(\nu \)  commute with each other. Recall the fact that two quaternions commute with each other if and only if their imaginary parts are real multiples of each other. Hence there are real numbers
\(r_i, t_i\)  (\(i=1, 2,3\) ) and a purely imaginary quaternion \(h\)  such that
\(\lambda =r_1+t_1 h\) , \(\mu =r_2+t_2 h\) , \(\nu =r_3+t_3 h\) . We then have
\(A(iX)=r_1(aX+bY)+t_1(ahX+hbY)\)  and so \(A(iX)\)  lies in the 2-dimensional real vector subspace spanned by \(aX+bY\)  and \(ahX+hbY\) . Similarly \(A(jX)\)  and \(A(kX)\)  also lie in this subspace, contradicting the fact that \(A\)  is an isomorphism. This finishes the proof of the claim.
After possibly composing \(A\)  with \(\tau \)  we may assume that \(A(\mathbb {H} X)=\mathbb {H} X\)  and
\(A(\mathbb {H} Y)=\mathbb {H} Y\) .
There are \(a_0, a_1, a_2, a_3, b_0, b_1, b_2, b_3\in \mathbb {H}\)  such that
\(A(X)=a_0X\) , \(A(iX)=a_1X\) , \(A(jX)=a_2X\) , \(A(kX)=a_3X\)  and
\(A(Y)=b_0Y\) , \(A(iY)=b_1Y\) , \(A(jY)=b_2Y\) , \(A(kY)=b_3Y\) . By applying \(A\)  to
\([X, iY]=[iX, Y]=[jX, kY]=-[kX, jY]\) ,
\([X, jY]=[jX, Y]=[kX, iY]=-[iX, kY]\)  and \([X, kY]=[kX, Y]=[iX, jY]=-[jX, iY]\)  we obtain
\(a_0b_1=a_1b_0=a_2b_3=-a_3b_2,\) 

\(a_0b_2=a_2b_0=a_3b_1=-a_1b_3,\) 

\(a_0b_3=a_3b_0=a_1b_2=-a_2b_1.\) 
From these we get
\(a_0^{-1}a_1=b_1b_0^{-1}=-b_2b_3^{-1}=b_3b_2^{-1},\) 

\(a_0^{-1}a_2=b_1b_3^{-1}=b_2b_0^{-1}=-b_3b_1^{-1},\) 

\(a_0^{-1}a_3=-b_1b_2^{-1}=b_2b_1^{-1}=b_3b_0^{-1}.\) 
Set \(\lambda =a_0^{-1}a_1\) , \(\mu =a_0^{-1}a_2\)  and \(\nu =a_0^{-1}a_3\) .
From \(\lambda =-b_2b_3^{-1}=b_3b_2^{-1},\)  we get \(\lambda ^2=-1\) . Similarly from \(\mu =b_1b_3^{-1}=-b_3b_1^{-1},\)  we get \(\mu ^2=-1\) . Finally
\(\nu =b_3b_0^{-1}=b_3b_2^{-1} b_2b_0^{-1}=\lambda \mu \) .
Also notice \(a_1=a_0\lambda \) , \(a_2=a_0\mu \) , \(a_3=a_0\nu \)  and
\(b_1=\lambda b_0\) , \(b_2=\mu b_0\) , \(b_3=\nu b_0\) . So the automorphism \(A\)  is given by \(A(X)=a_0X\) , \(A(iX)=a_0\lambda X\) , \(A(jX)=a_0\mu X\) , \(A(kX)=a_0\nu X\)  and
\(A(Y)=b_0Y\) , \(A(iY)=\lambda b_0Y\) , \(A(jY)=\mu b_0 Y\) , \(A(kY)=\nu b_0 Y\) .
Now it is easy to check that \(A=\text{Ad}_g\mbox{\Large $|$\normalsize }_{\mathfrak {n}_\mathbb {H}}\circ \hat{h}_{\lambda , \mu ,\nu }\) , where \(g=\text{diag}(a_0, 1, b_0^{-1})\) .
Now assume \(n\ge 4\) . By an argument similar to the real case (using rank and the induction hypothesis), we get (after possibly composing with \(\tau \) ) \(A(\mathbb {H} X_{i, i+1})=\mathbb {H} X_{i, i+1}\)  for each \(1\le i\le n-1\) . Then there are nonzero quaternions \(a_1, \cdots , a_{n-1}\)  such that
\(A(X_{i, i+1})=a_iX_{i, i+1}\) . Set \(b_n=1\)  and \(b_i=(a_i\cdots a_{n-1})^{-1}\)  for \(1\le i\le n-1\) , and let
\(g=\text{diag}(b_1, \cdots , b_n)\) .
By composing \(A\)  with \(\text{Ad}_g\mbox{\Large $|$\normalsize }_{\mathfrak {n}_\mathbb {H}}\)  we may assume that
\(A(X_{i,i+1})=X_{i, i+1}\)  for each \(1\le i\le n-1\) .
Now for each \(1\le i\le n-2\) , \(\mathbb {H} X_{i, i+1}\)  and \(\mathbb {H} X_{i+1, i+2}\)  generate a Lie subalgebra isomorphic to \(\mathfrak {n}_3\) . By the previous paragraph we see that there are \(\lambda _i, \mu _i\)  satisfying \(\lambda _i^2=\mu _i^2=(\lambda _i\mu _i)^2=-1\)  such that
\(A((a_0+a_1i+a_2j+a_3k)X)=(a_0+a_1\lambda _i+a_2\mu _i+a_3\nu _i)X\)  for \(X=X_{i,i+1}, X_{i+1, i+2}, X_{i, i+2}\) , where \(\nu _i=\lambda _i\mu _i\)  and \(a_0, a_1, a_2, a_3\in \mathbb {R}\) . By considering the Lie subalgebra generated by \(X_{i+1, i+2}\)  and
\(X_{i+2, i+3}\)  and comparing the values for
\(A((a_0+a_1i+a_2j+a_3k)X_{i+1, i+2})\) 
we get \(\lambda _i=\lambda _{i+1}\) , \(\mu _i=\mu _{i+1}\)  and \(\nu _i=\nu _{i+1}\) . It follows that
\(A=\hat{h}_{\lambda , \mu , \nu }\)  with \(\lambda =\lambda _1\) , \(\mu =\mu _1\)  and \(\nu =\lambda \mu \) .

Let \(n\ge 4\) .
The proofs of (1) and (3) are the same as in the real case by using Theoem REF . As remarked above, the automorphism \(\hat{h}\)  is either the identity map or the complex conjugation.
(2) The proof is by induction on \(n\) . We first consider the case \(n=4\) .
Let \(A: {\mathfrak {n}}_{4, \mathbb {C}} \rightarrow {\mathfrak {n}}_{4, \mathbb {C}}\)  be a
graded automorphism. We observe that \({\mathfrak {n}}_{n, \mathbb {C}}\)  is the complexification of \(\mathfrak {n}_n\) . An easy calculation shows
\(\text{rank}(\text{ad}\, x)=\dim (\text{ad}\, x( {\mathfrak {n}}_{4, \mathbb {C}}))\ge 4\)  for any nonzero element \(x\)  in the first layer of \( {\mathfrak {n}}_{4, \mathbb {C}} \) . Clearly,
\(\text{rank}(\text{ad}\, x)\le 6\) . So the condition
\(\max \lbrace \text{rank}(\text{ad}\, x)|x\in V_1\rbrace <2 \min \lbrace \text{rank}(\text{ad}\, x)|0\ne x\in V_1\rbrace \) 
in [2]} is satisfied and we conclude that
every graded automorphism of \({\mathfrak {n}}_{4, \mathbb {C}}\)  is either complex linear or complex antilinear. So after possibly composing \(A\)  with the complex conjugation we may assume \(A\)  is complex linear. The rest of the arguemnt in the case \(n=4\)  is the same as in the real case.
Now let \(n\ge 5\)  and assume the statement holds for all integers less than \(n\) .
Let \(A: {\mathfrak {n}}_{n, \mathbb {C}} \rightarrow {\mathfrak {n}}_{n, \mathbb {C}}\)  be a
graded automorphism.
Arguing as in the real case using rank, we see that after possibly composing
\(A\)  with \(\tau \)  we have \(A(\mathbb {C} X_{i, i+1})=\mathbb {C} X_{i, i+1}\)  for each \(i\) .
So \(A (\mathfrak {n}_+)=\mathfrak {n}_+\)  and \(A (\mathfrak {n}_-)=\mathfrak {n}_-\) ,
where \(\mathfrak {n}_+\)  is the Lie sub-algebra of \( {\mathfrak {n}}_{n, \mathbb {C}}\)  generated by \(\lbrace X_{i, i+1}, 1\le i\le n-2\rbrace \)  and
\(\mathfrak {n}_-\)  is the Lie sub-algebra of \( {\mathfrak {n}}_{n, \mathbb {C}}\)  generated by \(\lbrace X_{i, i+1}, 2\le i\le n-1\rbrace \) . Since
\(\mathfrak {n}_+\)  and \(\mathfrak {n}_-\)  are isomorphic to
\({\mathfrak {n}}_{n-1, \mathbb {C}} \) , the induction hypothesis implies that each of
\(A|_{\mathfrak {n}_+}\) , \(A|_{\mathfrak {n}_+}\)  is either complex linear or complex antilinear. Since \(\mathfrak {n}_+\)  and \(\mathfrak {n}_-\)  have nontrivial intersection,
either both \(A|_{\mathfrak {n}_+}\) , \(A|_{\mathfrak {n}_+}\)  are complex linear or both are complex antilinear. Hence after possibly composing \(A\)  with the complex conjugation we may assume \(A\)  is complex linear. As \(A\)  also satisfies
\(A(\mathbb {C} X_{i, i+1})=\mathbb {C} X_{i, i+1}\)  for all \(i\) , we see that \(A=\text{Ad}_g\)  for some \(g=\text{diag}(\lambda _1, \cdots , \lambda _n)\in G_{\mathbb {C}}\) .
This finishes the proof of (2).
The “Hermitian product” on \(\mathbb {H}^n\)  is defined by
\(<z,w>=\sum _i\bar{z_i}w_i\)  for \(z=(z_i), w=(w_i)\in \mathbb {H}^n\) .
Then one can check by direct calculation that \(\overline{<z,w>}=<w,z>\)  and \(<A^*z, w>=<z, Aw>\)  for \(z,w\in \mathbb {H}^n\)  and \(A\in M_n(\mathbb {H})\) .
For any \(\mathbb {H}\) -linear subspace (submodule) \(W\)  of \(\mathbb {H}^n\) , the “orthogonal complement” \(W^\perp \)  is defined by \(W^\perp =\lbrace z\in \mathbb {H}^n| <z,w>=0\; \forall w\in W\rbrace \) .
Lemma REF  holds for \(F=\mathbb {C}, \mathbb {H}\)  where in (5) the automorphism
\(\Phi _0\)  is induced by the map \(A\mapsto (A^*)^{-1}\) .
The proof of Lemma REF  (5) goes through in the quaternion case since
\(<(g^{-1})^*W^+_j, gW^-_{n-j}>=<W^+_j, g^{-1}gW^-_{n-j}>=0.\) 
Of course, the proof is also valid in the complex case if we use the standard Hermitian product in \(\mathbb {C}^n\) .
Lemmas REF  and REF  hold in the complex and quaternion cases without change.


Changes needed for Section 3
Lemma REF  and
Corollary REF 
hold in the complex case for \(n\ge 4\)  and in the quaternion case for \(n\ge 3\) . Note that the analog of Lemma REF  in the \(F= case fails when \) n=3\(, as in the real \) n=3\( case. We indicate the changes needed in the quaternion case below. We skip the complex case since it is similar. Alternatively the complex case also follows from Corollary 8.2 of \cite {KMX1} as by Lemma\ref {graded-quaternion} (2)every graded automorphism of \) nn, C\( is either complex linear or complex antilinear.\)
Lemma 6.3 
Let \(n\ge 3\) .
Let \(U\subset N_{\mathbb {H}}\)  be a connected open subset, and for some \(p>\nu \)  let \(f:N_{\mathbb {H}}\supset U\rightarrow N_{\mathbb {H}}\)  be a \(W^{1,p}_{\operatorname{loc}}\) -mapping whose Pansu differential is an isomorphism almost everywhere. Then after possibly composing with \(\tau \) , if necessary,
for a.e. \(x\in U\)  the Pansu differential \(D_Pf(x)\)  preserves the subspace \(\mathbb {H}X_{i,i+1}\subset V_1\)  for every \(1\le i\le n-1\) .

Here we indicate the differential forms used in the calculations, the rest of the argument being the same.
For \(1\le s<t\le n\) , denote \(Y_{st}=iX_{st}\) , \(Z_{st}=jX_{st}\) ,
\(W_{st}=kX_{st}\) . Then \(\lbrace X_{st}, Y_{st}, Z_{st}, W_{st} |1\le s< t\le n\rbrace \)  form a basis of left invariant vector fields on \(N\) . The only nontrivial bracket relations between the basis elements are given by (for \(1\le s_1<s_2<s_3\le n\) ):
\(-[X_{s_1 s_2}, X_{s_2 s_3}]=[Y_{s_1 s_2}, Y_{s_2 s_3}]=[Z_{s_1 s_2}, Z_{s_2 s_3}]=[W_{s_1 s_2}, W_{s_2 s_3}]=-X_{s_1s_3}\) 

\([X_{s_1 s_2}, Y_{s_2 s_3}]=[Y_{s_1 s_2}, X_{s_2 s_3}]=[Z_{s_1 s_2}, W_{s_2 s_3}]=-[W_{s_1 s_2}, Z_{s_2 s_3}]=Y_{s_1s_3}\) 

\([X_{s_1 s_2}, Z_{s_2 s_3}]=[Z_{s_1 s_2}, X_{s_2 s_3}]=[W_{s_1 s_2}, Y_{s_2 s_3}]=-[Y_{s_1 s_2}, W_{s_2 s_3}]=Z_{s_1s_3}\) 

\([X_{s_1 s_2}, W_{s_2 s_3}]=[W_{s_1 s_2}, X_{s_2 s_3}]=[Y_{s_1 s_2}, Z_{s_2 s_3}]=-[Z_{s_1 s_2}, Y_{s_2 s_3}]=W_{s_1s_3}. \) 
Let \(\alpha _{st}\) , \(\beta _{st}\) , \(\gamma _{st}\) , \(\eta _{st}\)  be the dual basis of left invariant 1-forms. We have
\(d\alpha _{s_1s_3}=\sum _{s_1<s_2<s_3} (-\alpha _{s_1s_2}\wedge \alpha _{s_2s_3}+\beta _{s_1s_2}\wedge \beta _{s_2s_3}+\gamma _{s_1s_2}\wedge \gamma _{s_2s_3}+\eta _{s_1s_2}\wedge \eta _{s_2s_3} ) \) 

\(d\beta _{s_1s_3}=\sum _{s_1<s_2<s_3} (-\alpha _{s_1s_2}\wedge \beta _{s_2s_3}-\beta _{s_1s_2}\wedge \alpha _{s_2s_3}-\gamma _{s_1s_2}\wedge \eta _{s_2s_3}+\eta _{s_1s_2}\wedge \gamma _{s_2s_3} ) \) 

\(d\gamma _{s_1s_3}=\sum _{s_1<s_2<s_3} (-\alpha _{s_1s_2}\wedge \gamma _{s_2s_3}-\gamma _{s_1s_2}\wedge \alpha _{s_2s_3}-\eta _{s_1s_2}\wedge \beta _{s_2s_3}+\beta _{s_1s_2}\wedge \eta _{s_2s_3} ) \) 

\(d\eta _{s_1s_3}=\sum _{s_1<s_2<s_3} (-\alpha _{s_1s_2}\wedge \eta _{s_2s_3}-\eta _{s_1s_2}\wedge \alpha _{s_2s_3}-\beta _{s_1s_2}\wedge \gamma _{s_2s_3}+\gamma _{s_1s_2}\wedge \beta _{s_2s_3} ). \) 
We pull back the following closed left invariant forms
\(\omega _+=\bigwedge _{2\le s\le n} (\alpha _{1s}\wedge \beta _{1s}\wedge \gamma _{1s}\wedge \eta _{1s})\) 

\(\omega _-=\bigwedge _{1\le s\le n-1} (\alpha _{sn}\wedge \beta _{sn}\wedge \gamma _{sn}\wedge \eta _{sn}).\) 
By Lemma REF  on graded automorphisms, the pull-back has the form \(f_P^*\omega _+=u_+\omega _++u_-\omega _-\)  as before.
Let
\(\eta _-=\bigwedge _{2\le s<t\le n} (\alpha _{st}\wedge \beta _{st}\wedge \gamma _{st}\wedge \eta _{st})\) 

\(\eta _+=\bigwedge _{1\le s<t\le n-1} (\alpha _{st}\wedge \beta _{st}\wedge \gamma _{st}\wedge \eta _{st}).\) 
We apply the pull-back theorem to
\(f_P^*\omega _+\)  and \(\eta =i_X\eta _-\) , \(i_X\eta _+\) , where
\(X\in \lbrace X_{s (s+1)}, Y_{s(s+1)}, Z_{s(s+1)}, W_{s(s+1)}\rbrace \)  and \(i_X\)  denotes the interior product with respect to \(X\) .
As before, this yields \(Xu_+=0\)  for
\(X\in \lbrace X_{s (s+1)}, Y_{s(s+1)}, Z_{s(s+1)}, W_{s(s+1)}\rbrace \)  with \(2\le s\le n-1\)  and \(Xu_-=0\)  for
\(X\in \lbrace X_{s (s+1)}, Y_{s(s+1)}, Z_{s(s+1)}, W_{s(s+1)}\rbrace \)  with \(1\le s\le n-2\) . The rest of the argument is the same as in the real case.


Changes needed for Section 4
In the quaternion case, we note that the action of \(PGL(n, \mathbb {H})\)  on the projective frames is still transitive, but is no longer free. The reason is that \(a I_n\)  defines a nontrivial element in
\(PGL(n, \mathbb {H})\)  for \(a\in \mathbb {H}\setminus \mathbb {R}\) , but fixes the standard projective frame.
Below is a version of Lemma REF  for the quaternion case.
A similar statement holds for the complex case. A line in \(\mathbb {H}^2\)  is a subset of the form \(\lbrace (a_1, a_2)x+(b_1, b_2)|x\in \mathbb {H}\rbrace \)  for some \((b_1, b_2)\in \mathbb {H}^2\) ,
\((0,0)\ne (a_1, a_2)\in \mathbb {H}^2\) . This line is said to be parallel to \((a_1, a_2)=a_1e_1+a_2e_2\) .
Lemma 6.4 
Suppose \(U\subset \mathbb {H}^2\)  is a connected open subset, and
\(\phi =(\phi _1,\phi _2):\mathbb {H}^2\supset U\rightarrow \mathbb {H}^2\) 
is a continuous map such that for every \(v\in \lbrace e_1,e_2,e_1+e_2\rbrace \)  and every line \(L\)  parallel to \(v\) , the image of \(L\cap U\)  is contained in a line parallel to \(v\) . Assume further that for each \(q\in \lbrace i, j, k\rbrace \) , lines parallel to
\(e_1+qe_2\)  are mapped into lines (not necessarily parallel to \(e_1+qe_2\) ).
Then \(\phi \)  is of the form
\(\phi (x,y)=(a h(x)+b_1, a h(y)+b_2)\) 
where \(a, b_1,b_2\in \mathbb {H}\)  and \(h: \mathbb {H}\rightarrow \mathbb {H}\)  is either an automorphism of \(\mathbb {H}\)  or the zero map.

The argument of Lemma REF  yields that
\(\phi \)  is of the form
\(\phi (x,y)=(m(x)+b_1, m(y)+b_2)\) , where
\(b_1,b_2\in \mathbb {H}\)  and \(m:\mathbb {H}\rightarrow \mathbb {H}\)  is a real linear map.
We shall show that either \(m\)  is the zero map or there is some automorphism \(h\)  of \(\mathbb {H}\)  and some
\(a\in \mathbb {H}\)  such that \(m(x)=a h(x)\) . We may assume \(b_1=b_2=0\)  after possibly composing \(\phi \)  with a translation. Then the assumption implies that the line \((1,i)\mathbb {H}\)  is mapped
by \(\phi \)  into a line \((a_1, a_2)\mathbb {H}\)  (at least one of \(a_1, a_2\)  is nonzero) through the origin. There are \(t_1, t_2\in \mathbb {H}\)  such that
\((m(1), m(i))=\phi (1,i)=(a_1t_1, a_2t_1)\)  and \((m(i), m(-1))=\phi (i, -1)=(a_1t_2, a_2t_2)\) . By comparing the components we get \(m(i)=a_2t_1=a_1t_2\) , \(m(1)=a_1t_1=-a_2t_2\) . Suppose \(m(1)=0\) . As at least one of \(a_1, a_2\)  is nonzero we have \(t_1=0\)  or \(t_2=0\) , which implies \(m(i)=0\) . Similarly \(m(j)=m(k)=0\) . In this case \(m\)  is the zero map.
Now we assume \(m(1)\ne 0\) .
Then there is some \(\lambda \in \mathbb {H}\)  such that
\(\phi (i, -1)=\phi (1,i)\lambda \) . By comparing the two components of both sides we get
\(m(i)=m(1)\lambda \)  and \(-m(1)=m(-1)=m(i)\lambda \) , which yields
\(\lambda ^2=-1\) . Similarly by considering the lines \((1,j)\mathbb {H}\)  and
\((1,k)\mathbb {H}\)  we see that there are \(\mu \)  and \(\nu \)  satisfying \(\mu ^2=\nu ^2=-1\)  such that \(m(j)=m(1)\mu \) , \(-m(1)=m(-1)=m(j)\mu \) ,
\(m(k)=m(1)\nu \)  and \(-m(1)=m(-1)=m(k)\nu \) .
Since \((j,k)=(1,i)j\in (1,i)\mathbb {H}\) , there is some \(c\in \mathbb {H}\)  such that
\(\phi (j,k)=\phi (1,i) c\) . This gives us \(m(j)= m(1) c\)  and \(m(k)=m(i)c\) . As we also have \(m(i)=m(1)\lambda \) ,
\(m(j)=m(1)\mu \)  and \(m(k)=m(1)\nu \) , we conclude \(c=\mu \)  and \(\nu =\lambda \mu \) . The three numbers \(\lambda , \mu ,\nu \)  satisfy \(\lambda ^2=\mu ^2=\nu ^2=-1\)  and \(\nu =\lambda \mu \) .
As \(m\)  is \(\mathbb {R}\) -linear, for any \(x=x_0+ix_1+jx_2+kx_3\)  (\(x_i\in \mathbb {R}\) ) we get \(m(x)=m(1) h_{\lambda , \mu , \nu }(x)\) .
The arguments in Section  show that we may assume the map \(\phi \)  sends
lines parallel to \(v\in \lbrace e_1, e_2, e_1+e_2\rbrace \) 
into lines parallel to \(v\) . We claim that for any \(q\in \lbrace i,j,k\rbrace \) , lines parallel to \(e_1+qe_2\)  are mapped by \(\phi \)  into a family of parallel lines (not necessarily parallel to \(e_1+qe_2\) ). To see this, we notice that for a suitable diagonal matrix \(g=\text{diag}(a_1, a_2, 1)\in GL(3, \mathbb {H})\) , \(g\circ \hat{f}_1\)  satisfy \(g\circ \hat{f}_1(\text{span}(e_1+qe_2+e_3))=\text{span}(e_1+qe_2+e_3)\) 
and \(g\circ \hat{f}_1(\hat{W}^i_1)=\hat{W}^i_1\)  for \(i=1,2,3\) .
Since \(\mathbb {H}^3\)  is a right \(\mathbb {H}\)  module, here
for any \((x_1, x_2, x_3)\in \mathbb {H}^3\) , \(\operatorname{span}(x_1,x_2, x_3)=\lbrace (x_1x, x_2x, x_3x)|x\in \mathbb {H}\rbrace \) .
Then it follows that
\(\bar{g}\circ \phi \)  sends lines parallel to \(e_1+qe_2\)  to lines parallel to
\(e_1+qe_2\) , where \(\bar{g}:\mathbb {H}^2\rightarrow \mathbb {H}^2\)  is the linear map given by the diagonal matrix \(\text{diag}(a_1, a_2)\) .
Consequently \(\phi \)  sends lines parallel to \(e_1+qe_2\)  into a family of parallel lines.

.
Only the last paragraph and the third last paragraph of the proof of Lemma REF 
need some changes.
As before we have \(\hat{f}_1([e_3])=[e_3]\) . Hence
for small \(r>0\)  we may define \(\phi :\mathbb {H}^2\supset B(0,r)\rightarrow \mathbb {H}^2\)  by \(\operatorname{span}(\phi (x_1,x_2),1)=\hat{f}_1(\operatorname{span}(x_1,x_2,1))\) . The fact
\(\hat{f}_1([e_3])=[e_3]\)  implies \(\phi (0,0)=(0,0)\) .
By Lemma REF 
the map \(\phi : \mathbb {H}^2\supset B(0,r) \rightarrow \mathbb {H}^2\)  in this case has the form
\(\phi (x_1, x_2)=(a h(x_1)+b_1, a h(x_2)+b_2)\) 
where \(a, b_1,b_2\in \mathbb {H}\)  and \(h: \mathbb {H}\rightarrow \mathbb {H}\)  is either an automorphism of \(\mathbb {H}\)  or the zero map.
As \(\phi (0,0)=(0,0)\) , we have \(b_1=b_2=0\)  and so
\(\phi (x_1, x_2)=(a h(x_1), a h(x_2))\) .
The argument for \(m\ne 0\)  applies here and shows that \(h\)  is an automorphism. Since any automorphism of \(H\)  is inner,
\(h(x)=bxb^{-1}\)  for some \(0\ne  b\in \mathbb {H}\)  and so
\(\phi (x_1, x_2)=(a bx_1b^{-1}, a bx_2b^{-1})\) .
Let \(\hat{g}:=\operatorname{diag}(ab, ab, b)\in \operatorname{PGL}(3,\mathbb {H})\) . Then \(\hat{g}_1:1\rightarrow 1\)  agrees with \(\hat{f}_1\)  near \([e_3]\) . Since \(\hat{g}\)  and \(\hat{f}\)  are both fibration-preserving, they agree near \(x=(W_1^-,W_2^-)\) .


Changes needed for Section 5
The counterpart of Theorem REF  for the complex and quaternion cases is:
Theorem 6.6 
Let \(U\subset F\)  be a connected open subset, and \(f:U\rightarrow F\)  be a \(W^{1,p}_{\operatorname{loc}}\) -mapping for \(p>\nu \) , such that the Pansu differential is an isomorphism almost everywhere.

If \(F=\mathbb {C}\)  and \(n\ge 4\) , then \(f\)  is the restriction of a diffeomorphism \( of the form \) 1C2 g\( where \) gPGL(n,\(, \) i{0,1}\( and \) C\( is complex conjugation. \newline \item If \) F=H\( and \) n3\(, then \) f\( is the restriction of a diffeomorphism \)  of the form \(\psi ^{\varepsilon } \circ g\)  where \(g\in \operatorname{PGL}(n,\mathbb {H})\) , \(\varepsilon \in \lbrace 0,1\rbrace \) .


The proof of Theorem REF  is the same as that of Theorem REF  except in the complex case where we may need to compose \(f\)  with the complex conjugation if necessary.


Global quasiconformal homeomorphisms
In this section we identify all global nondegenerate Sobolev maps \(N\rightarrow N\) . These are exactly the graded affine maps of \(N\) . This result is an immediate consequence of
Theorem REF .
An affine map of a Lie group \(G\)  is a map of the form \(L_g\circ \phi \) , where \(\phi \)  is an automorphism of \(G\)  and \(L_g\)  is left translation by \(g\in G\) . A graded affine map of a Carnot group \(N\)  is an affine map where the automorphism is a graded automorphism of \(N\) .
The following result applies to global quasiconformal homeomorphisms since quasiconformal maps are nondegenerate Sobolev maps.
Theorem 7.1  
Let \(N\)  be the Iwasawa group of \(\text{GL}(n, F)\) , with \(n\ge 4\)  for \(F=\mathbb {R}, \mathbb {C}\)  and \(n\ge 3\)  for \(F=\mathbb {H}\) .
Suppose \(f:N\rightarrow N\)  is a \(W^{1,p}_{\operatorname{loc}}\) -mapping for \(p>\nu \) , such that the Pansu differential is an isomorphism almost everywhere. Then \(f\)  is a graded affine map of \(N\) .

Let \(f\)  be as above. We shall show that there is a graded affine map \(f_0\)  such that
\(f_0^{-1}\circ f\)  is the identity map.
After replacing \(f\)  with \(L_{f(0)^{-1}}\circ f\)  we may assume \(f(0)=0\) .
We identify \(N\)  with \(\hat{N}\)  and view \(f\)  as a map \(\mathcal {F}\supset \hat{N}\rightarrow \hat{N}\subset \mathcal {F}\) .
We first consider the case \(F=\mathbb {R}\) .
By Theorem REF , \(f\)  is the restriction to \(\hat{N}\)  of a map of the form
\(\psi ^{\varepsilon }\circ g\)  where \(g\in \operatorname{GL}(n,\mathbb {R})\) , \(\varepsilon \in \lbrace 0,1\rbrace \) .
Recall that the automorphism \(\tau =I_{\Pi }\circ \Phi _0\)  of \(\text{GL}(n, \mathbb {R})\) 
induces a graded automorphism (again denoted by \(\tau \) ) of \(N=\hat{N}\)  and acts on \(\mathcal {F}\)  as \(\Pi \circ \psi \) . By replacing \(f\)  with \(\tau \circ f\)  if necessary (when \(\epsilon =1\) ),
we may assume \(\varepsilon =0\)  and so \(f=g|_{\hat{N}}\) . This implies \(g\in P^-\)  as the stabilizer of 0 is \(P^-\) . So \(g=(g_{ij})\) 
is a lower triangular matrix. Now we can further assume that the entries on the diagonal of \(g\)  are 1, after replacing \(g\)  with \(D^{-1}g\) , where \(D=\text{diag}(g_{11}, \cdots , g_{nn})\) .
So now \(g\)  is a lower triangular matrix with 1s on the diagonal and such that
\(g(\hat{N})=\hat{N}\) . We next show that \(g=I_n\) .
Suppose \(g\ne I_n\) . We shall find a flag \(F\in \hat{N}\)  such that \(g(F)\notin \hat{N}\) ,
contradicting \(g(\hat{N})=\hat{N}\) . Let \(1\le k\le n-1\)  be the integer such that
\(g_{ij}=0\)  for all \(i>j>k\)  and \(g_{jk}\ne 0\)  for some \(j>k\) . Let \(j_0>k\)  be such that \(g_{j_0k}\ne 0\)  and \(g_{jk}=0\)  for all \(j>j_0\) . Denote
\(v_{j_0}=e_k-\sum _{j=k+1}^{j_0} g_{jk} e_j\) .
Let \(F=\lbrace W_j\rbrace \)  be the flag defined by \(W_j=W^-_j\)  for \(1\le j\le n-j_0\)  and \(n-k<j\le n\) , \(W_{n-j_0+1}=\text{span}\lbrace e_n, \cdots , e_{j_0+1}, v_{j_0}\rbrace \)  and \(W_j=\text{span}\lbrace e_n, \cdots , e_{j_0+1}, v_{j_0}, e_{j_0-1}, \cdots , e_{n-j+1}\rbrace \)  for \(n-j_0+2\le j\le n-k\) .
It is straightforward to check that \(F\in \hat{N}\) . However,
\(g(v_{j_0})=e_k\) 
and
\(g(W_{n-j_0+1})\cap W^+_{j_0-1}\)  contains the nontrivial element \(e_k\)  and so \(g(F)\notin \hat{N}\) .
The proof in the complex and quaternion cases are the same except we use Theorem REF  and in the complex case we may need to compose \(f\)  with the complex conjugation.
