\section{DELETE??}
\subsection{An Illustration: Lossless Systems}

Lossless systems are systems whose frequency response function $T$ are 
{\it all-pass}, that is, the frequency response functions have values on
the $j\omega $ axis which are unitary matrices. Algebraic computations
involving such systems are ubiquitious in linear $H^\infty $ control. The
state space formulation of the all-pass property involves Riccati equations
which, for many systems, reduce to Lyapunov equations. In this section we
use the above experimental results to pick an order on the system variables
which yield a finite GB. 
In section 6.3.2,
we apply such a GB to obtain the standard frequency domain lossless formula.

\subsubsection{The Set-Up}

The following lemma is well known.

\begin{lemma}
\label{lemma:6pt1} If the system is controllable and observable, then there
exists an invertible selfadjoint $m$ such that

\begin{equation}
-m^{-1}(a-bc)m=a^{*}  
\label{eq:6pt1}
\end{equation}
\begin{equation}
b^{*}m^{-1}=c  
\label{eq:6pt2}
\end{equation}
\begin{equation}
mc^{*}=b 
\label{eq:6pt3}
\end{equation}
if and only if the frequency response function of the 
system $(a,b,c,1)$ is
unitary on the imaginary axis. This occurs if and only if 
$T(s)T(-{\bar{s}})^{*}-1=0$ for all $s\in C$.
\end{lemma}

In section 6.3.2, we prove one side
of this lemma using Gr\"{o}bner Basis techniques.

\noindent
{\bf Proof}

The statement that the frequency response function $T$ is unitary simply
says $T(j \omega)^{*} =T(j \omega)^{-1}$ for all real $\omega$, where, of
course, the frequency response function $T$ is 
given by
$T(s) = 1 + c \, (s-a)^{-1}
\, b$. The condition $T(j \omega)^{*} =T(j \omega)^{-1}$ for all real $%
\omega $ is equivalent to the conditions $T(s)T(-{\bar s})^{*}=1$ and $%
T(-{\bar s})^{*}T(s)=1$ for all complex $s$ such that $s-a$ is invertible.

$T(j\omega )^{*}$ and $T(j\omega )^{-1}$ are obtained from the formulas

\[
\begin{array}[t]{l}
T(s)^{*}=1+b^{*}({\bar{s}}-a^{*})^{-1}c^{*}\mbox{ \ \ and \ \ } \\ 
T(s)^{-1}=1-c(s-(a-bc))^{-1}b\,.
\end{array}
\]

The state space isomorphism theorem from the previous section implies that
the inverse and adjoint systems are similar if and only if these systems are
similar with an invertible selfadjoint $m$ satisfying (6.1) and (6.2).

The final statement of Lemma \ref{lemma:6pt1} is a direct consequence of
analytic continuation. \hfill\endproof

We show how the discussion in Section 6.1 applies to lossless systems. The
starting relations are: 
\[
\begin{array}{l}
{Rel[0]=m^{-1}\,m-1} \\ 
{Rel[1]=m\,m^{-1}-1} \\ 
{Rel[2]=a^{-1}\,a-1} \\ 
{Rel[3]=a\,a^{-1}-1} \\ 
{Rel[4]=a^{-1*}\,a^{*}-1} \\ 
{Rel[5]=a^{*}\,a^{-1*}-1} \\ 
{Rel[6]=m^{-1}\,b\,c\,m-m^{-1}\,a\,m-a^{*}} \\ 
{Rel[7]=b^{*}\,m^{-1}-c} \\ 
{Rel[8]=m\,c^{*}-b}
\end{array}
\]

Lyapunov equations are obtained by substituting Rel[7] and Rel[8] into
Rel[6] and gives
\begin{eqnarray*}
c^{*}\,c-a^{*}\,m^{-1}-m^{-1}\,a \\
b\,b^{*}-a\,m-m\,a^{*} \, .
\end{eqnarray*}
For most orderings, Mora's Algorithm will produce these
automatically.
So we see that a GB will include relations like 
those we examined in Section  6.2.
The affine terms are of degree 2 and so we find
that the guidelines of Section 6.2 apply
here. Indeed, Mora's Algorithm for the orders 
\begin{eqnarray*}
& &m<m^{-1}<a<a^*<a^{-1}<a^{-1 \, *}<b<b^*<c<c^*\mbox{\
\ \ and \ \ } \\
& &a<a^*<a^{-1}<a^{-1 \, *}<b<b^*<c<c^*<m<m^{-1}
\end{eqnarray*}
produces a finite and an infinite GB respectively.

Next we include resolvents
\begin{equation}
\label{eq:resolvents6}
\begin{tabular}{l}
$(r-a)^{-1}(r-a)-1$ \\ 
$(r-a)(r-a)^{-1}-1$ \\ 
$(s-a^{*})^{-1}(s-a^{*})-1$ \\ 
$(s-a^{*})(s-a^{*})^{-1}-1$%
\end{tabular}
\end{equation}
where $r$ and $s$ are scalar variables. 
Mora's Algorithm with the orders 
\begin{eqnarray*}
& &m<m^{-1}<a<a^{*}<a^{-1}<a^{-1 \, *}<b<b^{*}<c<c^*<(r-a)^{-1}<
(s-a^*)^{-1}%
\mbox{\ \ \ \ and \ \ \ } \\
& &a<a^*<a^{-1}<a^{-1 \, *}<b<b^*<c<
c^*<(r-a)^{-1}<(s-a^*)^{-1}<m<m^{-1}\,.
\end{eqnarray*}
gives a finite basis for the first order and an infinite basis for the
second. We will use the basis obtained from the first ordering and refer to
it as (LYPRESOL).

\subsubsection{An application}

We conclude with a simple example. 
%The purpose of the example is to 
We show that the GB LYPRESOL obtained above can be used 
to produce an automatic
proof of the sufficient side of Lemma \ref{lemma:6pt1}.

Let $eq(z):=T(z)T(-{\bar{z}})^{*}-1.$ Our task is to show that for any
system satisfying (6.1)-(6.3) we must have $eq(z)=0$ for any complex number $%
z$. We do this by showing that $eq(z)$ reduces to zero using the GB
LYPRESOL.
In the computation below, the basis
LYPRESOL is converted to an associated list of replacement rules. The
replacement rules are used to show that $eq(z)$ reduces to 0.

We will show how this works using NCAlgebra in the case $z=1.$ 
The implementation of Mora's Algorithm which
uses NCAlgebra
currently only handles complex numbers (rather than
complex variables such as $z$) as coefficients. Thus our computation will use LYPRESOL
computed with $r=1$ and $s=-1$. \footnote{%
A proof of the general statement can be obtained from the program. It
involves examining the sequence of reductions obtained for various values of 
$z$ to find  general formulas for the reductions. This, however, is not
automatic. We plan to extend NCAlgebra to include coefficients which are
variable complex numbers. This will allow the automation of computations
which involve variable scalar matrices and expressions involving arbitrary
complex numbers.}
\begin{verbatim}
In[1]:= EQ[z_] = NCExpand[eq[z]];
In[2] := EQ[1]
Out[2]= c ** Inv[1 - a] ** b + 
   Aj[b] ** Inv[-1 - Aj[a]] ** Aj[c] + 
   c ** Inv[1 - a] ** b ** Aj[b] ** Inv[-1 - Aj[a]] ** Aj[c]
In[3]:= ReplacementRules = NCGBConvert[{LYPRESOL}];
\end{verbatim}
The next command applies ReplacementRules to EQ[1].
\begin{verbatim}
In[4]:= Transform[EQ[1],ReplacementRules]          
Out[4]= 0
\end{verbatim}

