\documentclass{lecture}

\begin{document}

\chapter{Real algebra}

\section{Ordered fields and real fields}

\begin{definition}[]
    An \emph{ordered field} is a pair $(k, \le)$ consisting of a field $k$ and
    an order relation $\le$ such that
    \begin{enumerate}[(i)]
        \item $\le $ is a total order: if $x, y \in k$, then $x \le y$ or $y \le x$.
        \item $\le $ is compatible with addition in $k$:
            if $x, y, z \in k$, then $x \le y$ implies $x + z \le y + z$.
        \item $\le $ is compatible with multiplication in $k$:
            if $x, y\in k$, then $0 \le x$ and $0 \le y$ implies $0 \le xy$.
    \end{enumerate}
    A morphism between two ordered fields $(k, \le)$ and $(L, \le)$ is a field homomorphism
    $\varphi\colon k \to L$ such that $x \le y$ in $k$ implies $\varphi(x) \le \varphi(y)$ in $L$.
\end{definition}

\begin{bsp}[]
    \begin{enumerate}[(1)]
        \item The fields $\Q$ and $\R$, equipped with their usual orderings, are
            ordered fields.
        \item The field $\mathbb{C}$ can be equipped with a total ordering
            (the ,,lexicographic order``) but not with a structure of
            ordered field.
        \item The field $\R(t)$ of rational fractions with coefficients in $\R$, can
            be equipped with a structure of ordered field in multiple ways:

            Fix an $x \in \R$ and, for all polynomial $P \in \R[t]$, use
            Taylor expansion at $x$ to write
            \[
            P(t) = a_p (t - x)^{p} + \text{higher order terms}
            .\] 
            with $a_p \neq 0$, then define
            $P(t) >_{x^{+}} 0$ if $a_p > 0$, i.e. if the function
            $t \mapsto P(t)$ is positive on a small interval $(x, x + \epsilon)$. Set also
            $\frac{P(t)}{Q(t)} >_{x^{+}} 0$ if $P(t)Q(t) >_{x^{+}} 0$,
            and define $f \le_{x^{+}} g$ in $\R(t)$ if either $f = g$ or
            $g - f >_{x^{+}} 0$.
            Equivalently $f \le_{x^{+}} g$ in $\R(t)$ if
            either $f = g$ or $g - f$ is positively-valued on $(x, x + \epsilon)$ for $\epsilon > 0$ small
            enough.

            It is clear that this is a total ordering on $\R(t)$, and that this ordering is compatible
            with addition and multiplication in the sense of the definition of an ordered field.
            Moreover, the substitution homomorphism
            $h(t) \mapsto h(t - x)$ induces an isomorphism of ordered fields
            $(\R(t), \le_{0^{+}}) \xlongrightarrow{\simeq} (\R(t), \le_{x^{+}})$,
            since a function $t \mapsto h(t - x)$ is positively-valued
            on $(x, x + \epsilon)$ if and only if the function $t \mapsto h(t)$ is positively valued
            on $(0, \epsilon)$.

            Note that we can also define orderings on $\R(t)$ by setting $f \le_{x^{-}} g$
            if either $f = g$ or $g - f$ is positively-valued
            on $(x-\epsilon, x)$, for $\epsilon > 0$ small enough.
            The substitution homomorphism $h(t) \mapsto h(-t)$ induces an isomorphism
            of ordered fields
            $(\R(t), \le_{0^{-}}) \xlongrightarrow{\simeq} (\R(t), \le_{0^{+}})$.
    \end{enumerate}
\end{bsp}

\begin{bem}[]
    The ordered field $(\R(t), \le_{0^{+}})$
    is non-Archimedean: the element $t$ is
    \emph{infinitely small with respect to any real $\delta > 0$} in the sense that for all $n \in \N$,
    $nt < \delta$ (indeed $t \mapsto n t - \delta$ is negatively-valued
    on $(0, \epsilon)$ for $\epsilon > 0$ small enough). Equivalently, $\frac{1}{t}$
    is infinitely large with respect to $ 0 < \delta \in \R$ in the sense that
    $\frac{1}{t} > n \delta$ for all $n \in \N$.
\end{bem}

\begin{satz}[]
    Let $(k, \le)$ be an ordered field and $x, y, z \in k$. Then the following properties hold:
    \begin{enumerate}[(a)]
        \item $x \ge 0$ or $- x \ge 0$.
        \item $-1 < 0$ and $1 > 0$.
        \item $k$ is of characteristic $0$.
        \item if $x < y$ and $z > 0$, then $x z < y z$.
        \item if $x < y$ and $z < 0$, then $x z > y z$.
        \item $x y \ge 0$ if and only if $x$ and $y$ have the same sign.
        \item $x^2 \ge 0$ and, if $x \neq 0$, then $x$ and $\frac{1}{x}$ have the same sign.
        \item if $0 < x \le y$, then $0 < \frac{1}{y} \le \frac{1}{x}$.
    \end{enumerate}
    \label{satz:ordered-field-basics}
\end{satz}

\begin{proof}
    Elementary verifications.
\end{proof}

It turns out that it is possible to characterise ordered fields without explicitly mentioning
the order relation, using cones of positive elements.

\begin{definition}
    Let $k$ be a field. A \emph{cone} in $k$ is a subset $P \subseteq k$ such that
    for all $x, y \in P$ and $z \in k$:
    \begin{enumerate}[(i)]
        \item $x + y \in P$
        \item $xy \in P$
        \item $z^2 \in P$
    \end{enumerate}
    A cone $P \subseteq k$ is called a \emph{positive cone} if, additionally, one has:
    \begin{enumerate}[(i)]
        \setcounter{enumi}{3}
        \item $-1 \not\in P$
    \end{enumerate}
\end{definition}

\begin{satz}[]
    Let $k$ be a field. Assume that there exists a positive cone $P \subseteq k$. Then:
    \begin{enumerate}[(i)]
        \item $0 \in P$ and $1 \in P$.
        \item $k$ is of characteristic $0$.
        \item $P \cap (-P) = \{0\}$
    \end{enumerate}
\end{satz}

\begin{proof}
    \begin{enumerate}[(i)]
        \item $0 = 0^2 \in P$ and $1 = 1^2 \in P$ by axiom (iii).
        \item Since $1 \in P$, by induction and axiom (i),
            $n \cdot 1 = \underbrace{1 + \ldots + 1}_{n \text{ times}} \in P$ for all $n \in \N$.
            Assume that there exists $n \in \N$, such that $n \cdot 1 = 0$ in $k$.
            Since $1 \neq 0$ in $k$, it follows $n \ge 2$ so,
            \[
            -1 = 0 - 1 =  n \cdot 1 - 1 = (n - 1) \cdot 1 \in P
            ,\] which contradicts axiom (iv).
        \item Assume that there exists $x \in P \cap (-P) \setminus \{0\}$. In particular
            $x \neq 0$ and $-x \in P$. So
            $- x^2 = (-x) x \in P$ by axiom (ii) and $\frac{1}{x^2} = \left( \frac{1}{x} \right)^2 \in P$
            by axiom (iii). Again by axiom (ii)
            \[
            -1 = \frac{1}{x^2} (-x^2) \in P
            \] which contradicts axiom (iv).
    \end{enumerate}
\end{proof}

Given a positive cone $P$ in a field $k$, let us set $P^{+} = P \setminus \{0\} $
and $P^{-} = (-P) \setminus \{0\} = - P^{+}$. Then we have a disjoint union
\[
P^{-} \sqcup \{0\}  \sqcup P^{+} \subseteq k
.\] 
Note that $P^{+}$ satisfies axioms (i) and (ii) of the definition of a cone, as well
as the property that $x \in k \setminus \{0\} \implies x^2 \in P^{+}$.

We now prove that positive curves can be enlarged, that the resulting notion of
maximal positive cone satisfies $P \cup (-P) = k$, and that
this defines a structure of ordered field on $k$ by setting $x \le y$ if and only if $y - x \in P$.

\begin{lemma}
    Assume that $P$ is a positive cone in a field $k$. If $a \in k \setminus P \cup (-P)$, then the set
    \[
    P[a] \coloneqq \{ x + a y \in k \colon x, y \in P\}
    \]
    is a positive cone in $k$, satisfying $P \subsetneq P[a]$.
    \label{lemma:positive-cone-extend-by-one-element}
\end{lemma}

\begin{proof}
    Let $x, y, x', y' \in P$. Then
    \[
        (x + ay) + (x' + a y') = x + x' + a(y + y') \in P[a]
    \] and
    \[
        (x+ay)(x' + ay') = x x' + a^2 y y' + a (x y' + x' y) \in P[a]
    .\] Moreover $z^2 \in P \subseteq P[a]$ for all $z \in k$.

    Now assume $-1 = x + a y$ for some $x, y \in P$.
    If $y = 0$, then $-1 = x \in P$ which is a contradiction. Thus $y \neq 0$ and
    \[
    - a = \frac{1 + x}{y} = \left( \frac{1}{y} \right)^2 y (1+x) \in P
    ,\] which contradicts the assumption on $a$. Finally, we have $P \subseteq P[a]$ and,
    if $P[a] \subseteq P$ then $a \in P$, again contradicting the assumption on $a$. So
    $P \subsetneq P[a]$.
\end{proof}

\begin{satz}
    Let $\mathcal{P}$ be the set of positive cones of a field $k$ ordered
    by inclusion. If $\mathcal{P} \neq \emptyset$, then
    $\mathcal{P}$ admits a maximal element and such an element $P$ satisfies
    $P \cup (-P) = k$.
    \label{satz:existence-maximal-positive-cones}
\end{satz}

\begin{proof}
    To obtain a maximal element of $\mathcal{P}$,
    by Zorn's lemma, it suffices to show, that every
    chain $(P_i)_{i \in I}$ in $\mathcal{P}$ has an upper bound. We set
    \[
    P = \bigcup_{i \in  I} P_i \subseteq k
    .\] One verifies immediately that $P$ is a positive cone and an upper bound of the chain $(P_i)_{i \in I}$.

    Let $P$ be such a maximal element. If there exists $a \in k \setminus P \cup (-P)$, then by
    \ref{lemma:positive-cone-extend-by-one-element} $P \subsetneq P[a]$ contradicts the maximality of $P$. Thus
    $P \cup (-P) = k$.
\end{proof}

\begin{satz}
    Let $k$ be a field and denote by
    \[
    \Sigma k^{[2]} \coloneqq
    \left\{ y \in k  \mid \exists (a_x)_{x \in k} \in \{0, 1\}^{(k)}, y = \sum_{x \in k} a_x x^2 \right\} 
    \]
    the set of sums of squares in $k$. Then
    $\Sigma k^{[2]}$ is a cone and $-1 \not\in \Sigma k^{[2]}$ if and only if
    for all $x_1, \ldots, x_n \in k$:
    \[
    x_1^2 + \ldots + x_n^2 = 0 \implies x_1 = \ldots = x_n = 0
    .\] 
    \label{satz:sums-of-squares-cone}
\end{satz}

\begin{proof}
    One verifies immediately that $\Sigma k^{[2]}$ is a cone in $k$. If
    $-1 \in \Sigma k^{[2]}$, then
    $-1 = x_1^2 + \ldots + x_n^2$ for some $x_i \in k$. Thus
    \[
    0 = \sum_{i=1}^{n} x_i^2 + 1
    \] but $1 = 1^2$ and $1 \neq 0$. Conversely let
    $0 = \sum_{i=1}^{n} x_i^2$ with $x_1 \neq 0$. Then
    \[
    -1 = \frac{1}{x_1^2} \sum_{i=2}^{n} x_i^2 =
    \sum_{i=2}^{n} \left(\frac{x_i}{x_1}\right)^2
    \in \Sigma k^{[2]}
    .\]
\end{proof}

\begin{definition}
    A field $k$ is called a \emph{real field} if $-1 \not\in \Sigma k^{[2]}$, or equivalently
    if $\sum_{k=1}^{n} x_i^2 = 0$ in $k$ implies $x_k = 0$ for all $k$.
\end{definition}

\begin{korollar}
    Let $k$ be a field. $k$ is real if and only if $k$ contains
    a positive cone.
\end{korollar}

\begin{proof}
    $(\Rightarrow)$: By \ref{satz:sums-of-squares-cone} $\Sigma k^{[2]}$ is a positive
    cone.
    $(\Leftarrow)$: Let $P$ be a positive cone. Since
    $P$ is closed under addition and for all $z \in k\colon z^2 \in P$,
    $\Sigma k^{[2]} \subset P$. Since $P$ is positive, $-1 \not\in \Sigma k^{[2]}$.
\end{proof}

\begin{satz}
    Let $(k, \le)$ be an ordered field. Then the set
    \[
    P \coloneqq \{ x \in k  \mid x \ge 0\}
    \] is a maximal positive cone in $k$. In particular,
    $k$ is a real field. Conversely, if $k$ is a real field and $P$ is a maximal
    positive cone in $k$, then the relation $x \le_P y$ if $y - x \in P$ is an order
    relation and $(k, \le_P)$ is an ordered field.
\end{satz}

\begin{proof}
    $(\Rightarrow)$:
    Let $(k, \le )$ be an ordered field. Then by
    definition and \ref{satz:ordered-field-basics}, $P$ is a maximal positive cone.

    $(\Leftarrow)$: Let $P$ be a maximal positive cone in $k$. Since
    $0 \in P$, we have $x \le_P x$. Suppose that $x \le_P y$ and $y \le_P x$. Then
    $y - x \in P \cap (-P) = \{0\} $, so $x = y$. Moreover, if $x \le_P y$
    and $y \le_P z$, then $z - x = (z - y) + (y - x) \in P$. Thus $x \le_P z$, hence
    $\le_P$ is an order relation. Moreover, it is a total order, because if
    $x, y \in k$, then $y - x \in k = P \cup (-P)$, so either $x \le_P y$ or $y \le_P x$.

    Finally,
    this total order on $k$ is compatible with addition and multiplication because
    $x \le_P y$ and $z \in k$ implies $(y + z) - (x + z) = y - x \in P$, so
    $x + z \le_P y + z$, and $x \ge_P 0$, $y \ge_P 0$ means that $x \in P$ and $y \in P$, so $xy \in P$,
    hence $xy \ge_P 0$.
\end{proof}

\begin{korollar}
    Let $k$ be a field. Then $k$ admits a structure of ordered field
    if and only if $k$ is real.
\end{korollar}

\end{document}
