Just to emphasize the similarity between QR and shift, we can use QR
to provide insight into the tree task that mystified us earlier.
+<!--
\tree (. (a)((S)((d)((S)(e)))))
+-->
<pre>
.
First we QR the lower shift operator
+<!--
\tree (. (S) ((\\x) ((a)((S)((d)((x)(e)))))))
+-->
<pre>
.
Next, we QR the upper shift operator
+<!--
\tree (. (S) ((\\y) ((S) ((\\x) ((a)((y)((d)((x)(e)))))))))
+-->
<pre>
.
a(y(d(""(e)))), and k(k "") is a(y(d((a(y(d(""(e)))))(e)))). In tree
form:
+<!--
\tree (. (S) ((\\y) ((a)((y)((d)(((a)((y)((d)(("")(e)))))(e)))))))
+-->
<pre>
.
Repeating the process for the upper shift operator replaces each
occurrence of y with a copy of the whole tree.
+<!--
\tree (. ((a)((((a)(("")((d)(((a)(("")((d)(("")(e)))))(e))))))((d)(((a)((((a)(("")((d)(((a)(("")((d)(("")(e)))))(e))))))((d)(("")(e)))))(e))))))
+-->
<pre>
.