Let $f, g\in \RR^{\RR_\infty}$ with $f(x) \asymp g(x) \ (x \to \infty)$, and let $n$ be a nonnegative integer.  If $g$ has exact logexponential degree to order $n$, then so does $f$, and one has $\dege_k f = \dege_k g$ for all $k \leq n$.
\end{proposition}

\begin{proof}
Let $\underline{g} =  g|_{\dom f \cap \dom g}$.
By  Proposition \ref{aspropexoexp}(3), one has $f_{(k)}(x) \asymp \underline{g}_{(k)}(x) \ (x \to \infty)$ for all $k$.  Moreover, by Proposition \ref{arithbridge2}, the function $\underline{g}_{(k)} = g_{(k)}|_{\dom f_{(k)} \cap \dom g_{(k)}}$ has exact degree, whence, by Proposition  \ref{firstprop1}(3), the function $f_{(k)}$ also has exact degree, for all $k \leq n$.  Finally, again by Propositions
\ref{arithbridge2} and   \ref{firstprop1}(3), one has $\dege_k f = \dege_k \underline{g} = \dege_k g$  for all $k \leq n$.
\end{proof}

Let $f \in \RR^{\RR_\infty}$,  and define $f_{\{k\}}$ and $\underline{\dege}_k f =\underline{ \deg } \, f_{\{k\}} \in \overline{\RR}$ for all nonnegative integers $k$, recursively, as follows.    Let $f_{\{0\}} = f$.  Suppose that $f_{\{k\}}$ is defined, and set $d_k = \underline{\dege}_k f =\underline{\deg} \, f_{\{k\}}.$  We then let
$$f_{\{k+1\}}(x) =   \left.
\begin{cases}
f_{\{k\}}(e^x) e^{-d_k x}& \text{if } d_k \neq \pm \infty \\
\log |f_{\{k\}}(x)| & \text{if } d_k = \infty \\
\displaystyle   -\frac{1}{\min(\log |f_{\{k\}}(x)|,0)} & \text{if } d_k =- \infty.
\end{cases}
\right.$$
We also set $$\underline{\dege}\, f = (\underline{\dege}_0 f, \underline{\dege}_1 f, \underline{\dege}_2 f, \ldots) \in \prod_{n = 0}^\infty \overline{\RR}.$$   We call $\underline{\dege}\, f$ the {\bf lower logexponential degree of $f$}\index{lower logexponential degree $\underline{\dege}$}\index{lower exponential degree $\underline{\dege}$}\index[symbols]{.g g@$\underline{\dege}\, f$}  and $\underline{\dege}_k f$ the {\bf lower logexponential degree of $f$ of order $k$}.

For all $f \in \RR^{\RR_\infty}$, one has
$$\limsup_{x \to \infty}\, (- f(x)) = -\liminf_{x \to \infty} f(x)$$
$$\liminf_{x \to \infty}\, (- f(x)) = -\limsup_{x \to \infty} f(x),$$
and  $\lim_{x \to \infty} f(x)$ exists or is $\pm \infty$ if and only if $\limsup_{x \to \infty} f(x) = \liminf_{x \to \infty} f(x)$.   From these basic facts, and from the definitions of degree, lower degree,  $f_{(k)}$, and $f_{\{k\}}$, one readily deduces the following.

\begin{proposition}
Let $f \in \RR^{\RR_\infty}$.  If $f$ is not eventually nonzero, then $\underline{\dege}\, f = (-\infty, -\infty, -\infty,\ldots)$.   Suppose, on the other hand,  that $f$ is eventually nonzero.   Then one has the following.
\begin{enumerate}
\item $f_{\{k\}} = 1/(1/f)_{(k)}$ for all $k$.
\item $\underline{\dege}\, f = - \dege(1/f)$.
\item $\underline{\dege}\, f \leq \dege f$, and equality holds if and only if $f$ has exact logexponential degree.
\item $f$ has exact logexponential degree to order $n \geq 0$ if and only if $\dege_k f = \underline{\dege}_k f$ for all $k \leq n$.
\end{enumerate}
\end{proposition}

\begin{corollary}\label{exactloginverse}
Let $r \in \RR^{\RR_{\infty}}$, and let $n$ be a nonnegative integer.
\begin{enumerate}
\item If $r$ has exact logexponential degree to order $n$ and is eventually nonzero, then, for all nonnegative integers $k \leq n$, one has
$$r_{(k+1)}(x) =   \left.
\begin{cases}
r_{(k)}(e^x) e^{-(\deg r_{(k)}) x}& \text{if } \deg r_{(k)} \neq \pm \infty \\
\log r_{(k)}(x)  & \text{if } \deg r_{(k)} = \infty \\
\displaystyle   -\frac{1}{\log r_{(k)}(x)} & \text{if } \deg r_{(k)} =- \infty
\end{cases}
\right.$$ and $(1/r)_{(k)} = 1/r_{(k)}$, and therefore $\dege_k (1/r) = -\dege_k r$.
\item $r$ has exact logexponential degree to order $n$  if and only if  $\dege_k r = -\infty$ for all $k \leq n$ or  $r$ is eventually nonzero and  $\dege_k (1/r) = -\dege_k r$ for all $k \leq n$.
\item $r$ has exact logexponential degree if and only if $\dege r = (-\infty, -\infty,-\infty, \ldots)$ or $r$ is eventually nonzero and  $\dege(1/r) = -\dege r$.
\end{enumerate}
\end{corollary}

\begin{corollary}\label{aspropexoexpunder}
Let $f, g \in \RR^{\RR_\infty}$, and let $\underline{g} = g|_{\dom f \cap \dom g}$.
\begin{enumerate}
\item If $f(x) \gg g(x) \ (x \to \infty)$, then $\underline{\dege} \,  f \geq  \underline{\dege} \,  \underline{g} \geq  \underline{\dege} \,  g$.
\item If $f(x) = O(g(x)) \ (x \to \infty)$, then $\underline{\dege} \,  f \leq \underline{\dege} \,  \underline{g}$.
\item If $f(x) \asymp g(x) \ (x \to \infty)$, then $f_{\{k\}}(x) \asymp \underline{g}_{\{k\}}(x) \ (x \to \infty)$ for all $k$ and $\underline{\dege} \,  f = \underline{\dege} \,  \underline{g}$.
\item If $f$ is eventually bounded away from $0$,  then  $\underline{\dege} \,  f \geq (0,0,0,\ldots)$.
\item If $\underline{\dege} \,  f > (0,0,0,\ldots)$, then $\displaystyle \lim_{x \to \infty} |f(x) | = \infty$.
\end{enumerate}
\end{corollary}

\begin{example}
By \cite[Theorem 328]{har}, one has
$$ \liminf_{n \to\infty} \frac{\phi(n) \log \log n}{n} =e^{-\gamma },$$
where $\phi(n)$ is Euler's totient.  It follows that
$$\underline{\dege} \, \phi(n) = (1,0,-1,0,0,0,\ldots).$$
Moreover, it is easy to check that
$$ \limsup_{n \to\infty} \frac{\phi(n)}{n} =1,$$
and therefore
$$\dege \phi(n) = (1,0,0,0,\ldots).$$
\end{example}

The following proposition yields, in the subsequent corollary,  a useful property of functions of exact logexponential degree.

\begin{proposition}\label{oexpprop}
Let $f,g \in \RR^{\RR_\infty}$,  where  $\dom g$ contains the intersection of $\dom f$ with some neighborhood of $\infty$,  and let $n$ be a nonnegative integer.
\begin{enumerate}
\item If the smallest nonnegative integer $N$ such that $\dege_N f \neq \underline{\dege}_N g$ exists and is at most $n$,  where also $\dege_N f < \underline{\dege}_N g$,  then $f(x) = o(g(x)) \ (x \to \infty)$.
\item  $\dege f <\underline{\dege}\, g$, then $f(x) = o(g(x)) \ (x \to \infty)$.
\end{enumerate}
\end{proposition}

\begin{proof}
It suffices to prove statement (1).   Note that the  function  $g_{(k)}$ is eventually nonzero, for each $k \leq n$.  For all $k < N$, one has $d_k := \dege_k f = \underline{\dege}_k g$.  Moreover, one has $\deg f_{(N)} < \underline{\deg}\, g_{\{N\}}$, so that $f_{(N)}(x) = o(g_{\{N\}}(x)) \ (x \to \infty)$, by Proposition \ref{firstprop2}(7).    Let $m$ be least such that $f_{(m)}(x) = o(g_{\{m\}}(x)) \ (x \to \infty)$, so that $m \leq N$.
We claim that $m = 0$ and therefore  $f(x) = o(g(x)) \ (x \to \infty)$.  Suppose to obtain a contradiction that $m \geq 1$.  Suppose first that $d_{m-1} \neq \pm \infty$.  Then  $g_{\{m-1\}}(x) = x^{d_{m-1}}g_{\{m\}}(\log x)$ and therefore
$$f_{(m-1)}(x)= x^{d_{m-1}}f_{(m)}(\log x) = o( g_{\{m-1\}}(x)) \ (x \to \infty).$$  Suppose, on the other hand, that $d_{m-1} = -\infty$.  Then $\lim_{x \to \infty} \frac{\log |f_{(m-1)}(x)|}{\log x} = -\infty$ and thus
$$\lim_{x \to \infty} \frac{1}{ f_{(m)}(x)} = - \lim_{x \to \infty} \log |f_{(m-1)}(x)| = \infty,$$
so that
\begin{align*}
\frac{|f_{(m-1)}(x)|}{|g_{\{m-1\}}(x)|} \leq |f_{(m-1)}(x)|\max\left(\left| \frac{1}{g_{\{m-1\}}(x)} \right |,1\right) & =  \exp\left(-\frac{1}{f_{(m)}(x)}+\frac{1}{g_{\{m\}}(x)} \right) \\
& =  \exp\left(\left(\frac{f_{(m)}(x)}{g_{\{m\}}(x)}-1 \right) \frac{1}{f_{(m)}(x)}\right) \\ & \to \exp(-1 \cdot \infty) = 0 \\
\end{align*}
as $x \to \infty$, and therefore   $f_{(m-1)}(x)= o( g_{\{m-1\}}(x)) \ (x \to \infty)$.
Finally, suppose that $d_{m-1}= \infty$.  Then $\lim_{x \to \infty} \frac{\log |g_{\{m-1\}}(x)|}{ \log x} = \infty$ and $g_{\{m\}}(x)  = \log |g_{\{m-1\}}(x)|$
and thus
$$\lim_{x \to \infty} g_{\{m\}}(x) =  \lim_{x \to \infty} \log |g_{\{m-1\}}(x)|= \infty,$$
so that
\begin{align*}
\frac{|f_{(m-1)}(x)|}{|g_{\{m-1\}}(x)|} \leq \frac{\max(|f_{(m-1)}(x)|,1)}{|g_{\{m-1\}}(x)|} & =  \exp\left(f_{(m)}(x)-g_{\{m\}}(x) \right) \\
& =  \exp\left(\left(\frac{f_{(m)}(x)}{g_{\{m\}}(x)}-1 \right) g_{\{m\}}(x)\right) \\ & \to \exp(-1 \cdot \infty) = 0, \\
\end{align*}
whence $f_{(m-1)}(x)= o( g_{\{m-1\}}(x)) \ (x \to \infty)$.  Thus, we have shown that $$f_{(m-1)}(x)= o( g_{\{m-1\}}(x)) \ (x \to \infty),$$ in all three cases.  This contradicts the minimality of $m$.  It follows that $m = 0$, as claimed.
\end{proof}

\begin{corollary}\label{oexp}
Let $f,g \in \RR^{\RR_\infty}$,  where  $\dom g$ contains the intersection of $\dom f$ with some neighborhood of $\infty$,  and let $n$ be a nonnegative integer.
\begin{enumerate}
\item If $g$ has exact logexponential degree to order $n$, and  if the smallest nonnegative integer $N$ such that $\dege_N f \neq \dege_N g$ exists and is at most $n$,  where also $\dege_N f < \dege_N g$,  then $f(x) = o(g(x)) \ (x \to \infty)$.
\item If  $g$ has exact logexponential degree and $\dege f < \dege g$, then $f(x) = o(g(x)) \ (x \to \infty)$.
\end{enumerate}
\end{corollary}

\begin{corollary}\label{oexpcor0}
Let $f, g \in \RR^{\RR_\infty}$, where $\dom g$ contains the intersection of $\dom f$ with some neighborhood of $\infty$, and let  $\underline{g} = g|_{\dom f \cap \dom g}$.   Suppose that $ f(x) = O(g(x)) \ (x \to \infty)$ but $ f(x) \neq o(g(x)) \ (x \to \infty)$.  Then one has
$$\underline{\dege} \, f \leq  \underline{\dege} \, \underline{g} \leq \dege f \leq \dege \, g.$$
Consequently, if $g$ has exact  logexponential degree, then $\dege f = \dege g$.  Likewise, if $f$ has exact logexponential degree, then $\dege f =  \underline{\dege} \, \underline{g}$.
\end{corollary}

\begin{corollary}\label{oexpcor}
Let $f, g \in \RR^{\RR_\infty}$, where $g$ has exact logexponential degree and $\dom g$ contains the intersection of $\dom f$ with some neighborhood of $\infty$.  One has
\begin{align*}
\degl f < \degl g  \quad & \Longrightarrow \quad \dege f  < \dege g  \\
\quad & \Longrightarrow \quad  f(x) = o(g(x)) \ (x \to \infty) & \\
\quad & \Longrightarrow \quad f(x) = O(g(x)) \ (x \to \infty)  \\
\quad & \Longrightarrow \quad \dege f  \leq \dege g \\
\quad & \Longrightarrow \quad \degl f \leq \degl g.
\end{align*}
In particular, if $ f(x) = O(g(x)) \ (x \to \infty)$ but $ f(x) \neq o(g(x)) \ (x \to \infty)$, then $\dege f = \dege g$.
\end{corollary}

Note that none of the implications in the corollary above are reversible.

\begin{remark}[Leading coefficient and logexponential degree]
Assume the notation of Remark \ref{lc}.  Let $f \in \RR^{\RR_\infty}$  with $\deg f = d \neq \pm \infty$.  If $\operatorname{lc} f < \infty$, that is, if $f(x) = O(x^{d}) \ (x \to \infty)$, then $\dege f \leq (d,0,0,0,\ldots)$.  On the other hand, if $\operatorname{lc} f > 0$, that is, if $f(x) \neq  o(x^{d}) \ (x \to \infty)$, then $\dege f \geq (d,0,0,0,\ldots)$.    Consequently, if $0< \operatorname{lc} f < \infty$, then $\dege f  = (d,0,0,0,\ldots)$.
\end{remark}

\subsection{Relationships with logarithmico-exponential functions}

The following proposition provides constraints on what sequences in $\prod_{n = 0}^\infty\overline{\RR}$ can be of the form $\dege f$ for some $f \in \RR^{\RR_\infty}$.   By Theorem \ref{degeequiv} below,  these constraints are exhaustive.

\begin{proposition}\label{degeprop}
Let  $f \in \RR^{\RR_\infty}$, and let the $f_{(k)}$ be defined recursively as in the definition of $\dege$, so that $\dege_k f = \deg f_{(k)}$ for all $k$.  For all $n \geq 0$, one has the following.
\begin{enumerate}
\item Suppose that $\dege_n f = \infty$.  Then one has $f_{(n+1)}(x) \neq O(\log x) \ (x \to \infty)$ and therefore
$$\dege_{(n+1)} f \geq (0,1,0,0,0,\ldots)$$
\begin{align*}
\dege f \geq (\dege_0 f, \ldots, \dege_{n} f, 0,1, 0,0,0,\ldots).
\end{align*}
\item Suppose that $\dege_n f = -\infty$.  Then one has $f_{(n+1)}(x) = o\left(\frac{1}{\log x}\right) \ (x \to \infty)$ and therefore
$$\dege_{n+1} f \leq (0,-1,0,0,0,\ldots)$$
\begin{align*}
\dege f \leq (\dege_0 f, \ldots, \dege_{n} f, 0,-1, 0,0,0,\ldots).
\end{align*}
\item  If $\dege_n f$ is finite and $\dege_{n+1} f= \infty$, then one has $f_{(n+2)}(x) = o(x) \ (x \to \infty)$, so that $\dege f_{n+2} \leq (1,0,0,0,\ldots)$ and therefore
\begin{align*}
(\dege_0 f, \ldots, \dege_n f, \infty, 0,1, 0,0,0\ldots)  &  \leq \dege f  \\ & \leq (\dege_0 f, \ldots, \dege_n f, \infty, 1,0,0,\ldots).
\end{align*}
\item  If $\dege_n f$ is finite and $\dege_{n+1} f= -\infty$, then one has $f_{(n+2)}(x) \neq O\left(\frac{1}{x} \right) \ (x \to \infty)$, so that $\dege_{n+2} f \geq (-1,0,0,0,\ldots)$ and therefore
\begin{align*}
(\dege_0 f, \ldots, \dege_n f, -\infty, 0,-1, 0,0,0\ldots) &  \geq \dege f  \\ & \geq (\dege_0 f, \ldots, \dege_n f,- \infty, -1,0,0,\ldots).
\end{align*}
\end{enumerate}
\end{proposition}

\begin{proof}
Suppose that $\dege_n f  =  \infty$.  Then  $$\limsup_{x \to \infty} \frac{\log |f_{(n)}(x)|}{\log x} = \infty$$ and therefore $f_{(n+1)}(x) = \max(\log |f_{(n)}(x)|,0) \neq O(\log x) \ (x \to \infty)$, so that $\dege f_{(n+1)} \geq (0,1,0,0,0,\ldots)$.  Statement (1) follows.

Suppose that $\dege_n f  = -\infty$.   Then
$\lim_{x \to \infty} \frac{-1}{\log |f_{(n)}(x)|} = 0$ and  $$\lim_{x \to \infty} \frac{\log |f_{(n)}(x)|}{\log x} = -\infty$$ and therefore
$$\lim_{x \to \infty} \frac{\frac{-1}{\log |f_{(n)}(x)|}}{\frac{1}{\log x}} = 0,$$
so that
$$f_{(n+1)}(x) =  \frac{-1}{\log |f_{(n)}(x)|} = o \left(\frac{1}{\log x} \right) \ (x \to \infty)$$
and therefore $\dege f_{(n+1)} \leq (0,-1,0,0,0,\ldots)$.  Statement (2) follows.

Suppose now that  $d = \dege_n f = \deg f_{(n)}$ is finite.  For any $t >d$, one has $|f_{(n)}(x)| \leq x^t$ for all $x\gg 0$, and one has $f_{(n+1)}(x) = f_{(n)}(e^x)e^{-dx}$.  If $\dege_{n+1} f = \infty$, then one has
\begin{align*}
0 \leq f_{(n+2)}(x) & =  \log \max (|f_{(n+1)}(x)|,1) \\
& =  \log \max( |f_{(n)}(e^x)e^{-dx}|,1) \\
& \leq \log \max (e^{(t-d)x},1) \\
& = (t-d) x
\end{align*}
for all $t >d$ and all $x \gg 0$, and therefore $0 \leq f_{(n+2)}(x) = o(x) \ (x \to \infty)$.  Statement (3) follows.  Suppose, on the other hand, that $\dege_{n+1} f = -\infty$.  Then for any $t  < d$, one has $|f_{(n)}(x)|> x^t$ on an unbounded set of $x >0$.  It follows that $$0 \leq -\log |f_{(n+1)}(x)| = -\log | f_{(n)}(e^x)| + dx < (d-t)x,$$ so that
$$f_{(n+2)}(x) = -\frac{1}{\log |f_{(n+1)}(x)|} \geq \frac{1}{(d-t)x} > 0,$$
on an unbounded set of $x> 0$, and therefore   $f_{(n+2)}(x) \neq O\left(\frac{1}{x} \right) \ (x \to \infty)$.  Statement (4) follows.
\end{proof}

Note that the various upper and lower bounds in the proposition are attained by examples (19)(e) and (19)(f) of Example \ref{degeex}.

Let $$\prod_{n = 0}^{ \infty *}\overline{\RR} \subsetneq \prod_{n = 0}^{\infty}\overline{\RR} \index[symbols]{.g h@$\prod_{n = 0}^ { \infty *} \overline{\RR}$}\index{restricted product $\prod_{n = 0}^{ \infty *}\overline{\RR}$}$$ (to be contrasted with  $\prod_{n = 0}^{* \infty}\overline{\RR}$) denote the {\bf restricted product} consisting of all sequences $\dd$ in $\prod_{n = 0}^{\infty}\overline{\RR}$ satisfying the following four conditions for all nonnegative integers $n$.
\begin{enumerate}
\item If $\dd_n = \infty$, then $\dd \geq (\dd_0, \dd_1, \ldots, \dd_n, 0,1,0,0,0,\ldots).$
\item If $\dd_n = -\infty$, then $\dd \leq (\dd_0, \dd_1, \ldots, \dd_n, 0,-1,0,0,0,\ldots).$
\item If $\dd_n$ is finite and $\dd_{n+1} = \infty$, then $\dd \leq (\dd_0, \dd_1, \ldots, \dd_{n+1},1,0,0,0,\ldots).$
\item If $\dd_n$ is finite and $\dd_{n+1} = -\infty$, then $\dd \geq (\dd_0, \dd_1, \ldots, \dd_{n+1}, -1,0,0,0,\ldots).$
\end{enumerate}
By Proposition \ref{degeprop}, if $\dd = \dege f$ for some $f \in \RR^{\RR_\infty}$, then $\dege f \in \prod_{n = 0}^{ \infty *}\overline{\RR}$.  In fact the converse holds.

The following theorem is proved in Section 7.5.  (We do not require the theorem in Parts 2 or 3.)

\begin{theorem}\label{degeequiv}
For any sequence $\dd \in \prod_{n= 0}^{\infty}\overline{\RR}$, one has $\dd = \dege f$ for some $f \in \RR^{\RR_\infty}$ if and only if $\dd \in \prod_{n = 0}^{ \infty *}\overline{\RR}$, if and only if $\dd = \dege f$ for some positive,  monotonic,  infinitely differentiable function $f$ on $\RR_{>0}$ of exact logexponential degree.
\end{theorem}

Let $$\mathbb{L} = \operatorname{Def}(\RR,\id,\exp, \log,+,\cdot,/, \circ)\index[symbols]{.i  k@$\mathbb{L}$}$$ denote the ring of all {\bf logarithmico-exponential functions}\index{logarithmico-exponential functions} [117] [118], that is, the ring of all (germs of) real functions defined on a neighborhood of $\infty$ that can be can be built from all real constants and the functions $\id$, $\exp$,  and $\log$  using the operations $+$, $\cdot$, $/$, and $\circ$.   The ring $\mathbb{L}$ contains the field  $\RR(\mathfrak{L})$ as a subfield, and, as a consequence of Theorem \ref{infpropexp} below, it is the proper analogue of the field $\RR(\mathfrak{L})$ for $\dege$.
Note that, by \cite[Theorem, p.\ 24]{har3}, any function in the ring $\mathbb{L}$ is  positive, $0$, or negative, for all $x \gg 0$, and thus $\mathbb{L}$ is a field.

\begin{proposition}\label{Kfield}
Let $r \in \mathbb{L}$.  One has the following.
\begin{enumerate}
\item $r$ is positive, $0$, or negative, for all $x \gg 0$.
\item $r$ is infinitely differentiable on its domain, and all of its derivatives lie in $\mathbb{L}$.
\item Each of the functions $r_{(k)}$ as in the definition of $\dege r$ has exact degree and is equal to some function in $\mathbb{L}$ on some neighborhood of $\infty$.
\item $r$ has exact logexponential degree.
\end{enumerate}
\end{proposition}

For any real functions $f$ and $g$ defined on a neighborhood of $\infty$, we write $f \leq_\infty g$ if $g-f$ is eventually positive or eventually $0$,  we write $f <_\infty g$ if $g-f$ is eventually positive, and we write $f =_\infty g$ if $g-f$ is eventually $0$.  Thus, for all $f, g\in \mathbb{L}$, one has either $f\leq_\infty g$ or $g \leq_\infty f$, and $f =_\infty g$ holds if and only if both $f\leq_\infty g$ and $g \leq_\infty f$.  The ordering $\leq_\infty $ makes $\mathbb{L}$ into a (totally) ordered field, provided that one identifies any two functions $f$ and $g$ that are eventually equal, i.e., that satisfy $f =_\infty g$.  This totally ordered field is a subfield of the ring of germs of real functions at $\infty$.   Let us also define $$\mathbb{L}_{> 0} = \{f \in \mathbb{L}: 0<_\infty f\}.$$
Note that, if $r \in \mathbb{L}^*$, then $|r| \in \mathbb{L}_{> 0} $ and $r_{(k)} \in \mathbb{L}^*$ for all $k$,  and, if also $\dege_n r = \pm \infty$ for some $n$, then $r_{(k)} \in \mathbb{L}_{> 0}$ for all $k > n$, where, again, one identifies functions  that are eventually equal.

For any $f,g \in \RR^{\RR_\infty}$, we let $\mathcal{E}(f,g) = \mathcal{S}(\dege f, \dege g)$, that is, we let $\mathcal{E}(f,g)$ denote the infimum of the set of all nonnegative integers $n$ such that $\dege_n f \neq \dege_n g$ (which is $\infty$ if there is no such nonnegative integer $n$).\index[symbols]{.g p@$\mathcal{E}(f,g)$}    We say that $g$  {\bf approximates $f$ to logexponential order $n$}\index{approximates $f$ to logexponential order $n$} if  $\mathcal{E}(f,g) > n$, that is, if $\dege_k f = \dege_k g$ for all $k \leq n$.  The following proposition implies that any function in $\RR^{\RR_\infty}$ can be approximated to any logexponential order by some function in $\mathbb{L}_{> 0}$.

\begin{proposition}\label{degerprop}
Let $\dd \in  \prod_{n = 0}^{ \infty}\overline{\RR}$.  Then $\dd \in  \prod_{n = 0}^{ \infty*}\overline{\RR}$ if and only if, for every nonnegative integer $n$, there exists an $r \in \mathbb{L}_{> 0}$ such that $\dege_k r = \dd_k$ for all $k \leq n$.  Consequently, for any $f \in \RR^{\RR_\infty}$ and any nonnegative integer $n$, there exists an $r \in \mathbb{L}_{> 0}$ such that $\mathcal{E}(f,r) > n$.
\end{proposition}

\begin{proof}
By Proposition \ref{degeprop} and the definition of $\prod_{n = 0}^{ \infty *}\overline{\RR}$, if for every nonnegative integer $n$ there exists an $r \in \mathbb{L}_{> 0}$ such that $\dege_k r = \dd_k$ for all $k \leq n$, then $\dd \in  \prod_{n = 0}^{ \infty*}\overline{\RR}$.   Conversely, let $\dd \in \prod_{n= 0}^{\infty*}\overline{\RR}$, and let $n$ be a nonnegative integer.  Then the shifted sequence $(\dd_1, \dd_2, \dd_3, \ldots)$ also lies in $\prod_{n= 0}^{\infty*}\overline{\RR}$.  Therefore, by induction we may assume that we have an $s \in  \mathbb{L}_{> 0}$ such that $\dege_k s = \dd_{k+1}$ for all $k$ with $1 \leq k \leq n$, so that, for example, $\deg s = \dd_1$.   We wish to find an $r \in \mathbb{L}_{> 0}$ such that $\dege_k r =  \dd_k$ for all $k \leq n$.  Equivalently, we wish to find an $r \in \mathbb{L}_{> 0}$ such that $\deg r= \dd_0$ and $\dege_k r = \dege_{k-1} s$ for all $k$ with $1 \leq k \leq n$.

Suppose first that $\dd_0 \neq \pm \infty$.    If $\dd_1 \neq \pm \infty$, then $r(x) = x^{\dd_0}s(\log x) \in \mathbb{L}_{> 0}$ satisfies  our requirement for $r$.  Indeed, in this case, one has
$$\deg s(\log x) = \lim_{x \to \infty} \frac{\log s(\log x)}{\log x} = \lim_{x \to \infty} \frac{\log s(x)}{x} = \lim_{x \to \infty} \frac{\log s(x)}{\log x} \frac{\log x}{x} = 0$$
and therefore $r_{(1)}(x) =(s(\log x))_{(1)} = s(x)$, so that $$\dege s(\log x) = (0,\dege_0 s , \dege_1 s, \dege_2 s, \ldots)$$
and thus
$$\dege r = (\dd_0, \dege_0 s , \dege_1 s, \dege_2 s, \ldots),$$
whence $r$ fulfills our requirement  that $\dege_k r = \dd_k$ for all $k \leq n$ (and in fact $\dege_k r = \dege_{k-1} s$ for all $k \geq 1$).

Suppose, instead, that $\dd_1  = \infty$, so that
$$ \dd \leq (\dd_0, \infty,1,0,0,0,\ldots).$$
Then $s(x) = e^{s_{(1)}(x)}$ for all $x \gg 0$, where $\lim_{x \to \infty} \frac{s_{(1)}(x)}{\log x} = \infty$  and
$$\dege s_{(1)} \leq (1,0,0,0,\ldots).$$   If $ \dege s_{(1)} < (1,0,0,0,\ldots)$, then $s_{(1)}(x) = o(x) \ (x \to \infty)$, so that
$$\deg s(\log x) = \lim_{x \to \infty} \frac{s_{(1)}(\log x)}{\log x}   =   \lim_{x \to \infty}  \frac{s_{(1)}(x)}{x} = 0$$
and therefore $(s(\log x))_{(1)} = s(x)$ and thus
$$\dege s(\log x) = (0,\dege_0 s, \dege_1 s, \dege_2 s, \ldots).$$ Therefore, in this case, the function
$r(x) = x^{\mathbf{d_0}} s(\log x)$ satisfies  $r_{(1)}(x) = s(x)$ and fulfills our requirement for $r$.  Suppose, on the other hand, that $\dege s_{(1)} = (1,0,0,0,\ldots)$,
so that
$$\dege s = (\infty, 1,0,0,0,\ldots).$$
Then $r(x) = x^{\mathbf{d_0}} x^{1/\log^{\circ(n+1) }x} = x^{\mathbf{d_0}} e^{\log x/\log^{\circ(n+1) }x} \in \mathbb{L}_{> 0}$ has
$$\dege r = (\mathbf{d_0},\infty,1,0,0,0,\ldots, 0,-1,0,0,0,\ldots),$$
where the $-1$ is preceded by $n-1$ zeros, and so $\dege_k  r= \dd_k$ for all $k \leq n$.

Suppose, on the other hand, that $\dd_1  = -\infty$, so that
$$\dd \geq (\dd_0, -\infty,-1,0,0,0,\ldots).$$
Then $s(x) = e^{-1/s_{(1)}(x)}$ for all $x \gg 0$, where $\lim_{x \to \infty} \frac{1/s_{(1)}(x)}{\log x} = \infty$  and
$$\dege s_{(1)} \geq (-1,0,0,0,\ldots).$$   If $ \dege s_{(1)} > (-1,0,0,0,\ldots)$, then $1/s_{(1)}(x) = o(x) \ (x \to \infty)$, so that
$$\deg s(\log x) = \lim_{x \to \infty} \frac{-1/s_{(1)}(\log x)}{\log x}   =   \lim_{x \to \infty}  \frac{-1/s_{(1)}(x)}{x} = 0$$
and therefore $(s(\log x))_{(1)} = s(x)$ and thus
$$\dege s(\log x) = (0,\dege_0 s, \dege_1 s, \dege_2 s, \ldots).$$ Therefore, in this case, the function
$r(x) = x^{\mathbf{d_0}} s(\log x)$ satisfies  $r_{(1)}(x) = s(x)$ and fulfills our requirement.  Suppose, on the other hand, that $\dege s_{(1)} = (-1,0,0,0,\ldots)$,
so that
$$\dege s = (-\infty, -1,0,0,0,\ldots).$$
Then $r(x) = x^{\mathbf{d_0}} x^{-1/\log^{\circ(n+1) }x} = x^{\mathbf{d_0}} e^{-\log x/\log^{\circ(n+1) }x} \in \mathbb{L}_{> 0}$ has
$$\dege r = (\mathbf{d_0},-\infty,-1,0,0,0,\ldots, 0,1,0,0,0,\ldots),$$
where the $1$ is preceded by $n-1$ zeros, and so $\dege_k  r= \dd_k$ for all $k \leq n$.

The proves the proposition in the case where $\dd_0 \neq \pm \infty$.  Suppose now that $\dd_0 =  \infty$, so that
$$\dd \geq (\infty,0,1,0,0,0,\ldots)$$
and therefore
$$\dege s \geq (0,1,0,0,0,\ldots).$$
Suppose that $ \dege s > (0,1,0,0,0,\ldots)$, so that  $s(x) \neq O(\log x) \ (x \to \infty)$ and therefore $\lim_{x \to \infty} \frac{s(x)}{\log x} = \infty$, since $\frac{s(x)}{\log x} \in \mathbb{L}_{> 0}$ is positive and unbounded.  Let $r(x) = e^{s(x)}$.  Then
$$\dege r = \lim_{x \to \infty} \frac{s(x)}{\log x} = \infty$$ and therefore $r_{(1)}(x) = \log e^{s(x)} =  s(x)$, so that
$$\dege r = (\infty, \dege_0 s, \dege_1 s, \dege_2 s, \ldots),$$
whence $\dege_k r = \dd_k$ for all $k\leq n$.  Suppose, on the other hand, that $\dege s = (0,1,0,0,0,\ldots)$.
Then $r(x) = x^{\log^{\circ(n+1) }x} = e^{(\log x) (\log^{\circ(n+1) }x)} \in \mathbb{L}_{> 0}$ has
$$\dege r = (\infty,0,1,0,0,0,\ldots, 0,1,0,0,0,\ldots),$$
where the second $1$ is preceded by $n-1$ zeros, and so $\dege_k  r= \dd_k$ for all $k \leq n$.

Finally,  suppose that $\dd_0 =  -\infty$, so that
$$\dd \leq (-\infty,0,-1,0,0,0,\ldots)$$
and therefore
$$\dege s \leq (0,-1,0,0,0,\ldots).$$
Suppose that $ \dege s < (0,-1,0,0,0,\ldots)$.  Then $1/s(x) \neq O(\log x) \ (x \to \infty)$ and therefore $\lim_{x \to \infty} \frac{1/s(x)}{\log x} = \infty$.  Let $r(x) = e^{-1/s(x)}$.  Then
$$\dege r = \lim_{x \to \infty} \frac{-1/s(x)}{\log x} =- \infty$$ and therefore $r_{(1)}(x) =- \frac{1}{\log e^{-1/s(x)}} =  s(x)$ for all $x \gg 0$, so that
$$\dege r = (-\infty, \dege_0 s, \dege_1 s, \dege_2 s, \ldots),$$
whence $\dege_k r = \dd_k$ for all $k\leq n$.  On the other hand, suppose that $\dege s = (0,-1,0,0,0,\ldots)$.
Then $r(x) = x^{-\log^{\circ(n+1) }x} = e^{-(\log x) (\log^{\circ(n+1) }x)} \in \mathbb{L}_{> 0}$ has
$$\dege r = (-\infty,0,-1,0,0,0,\ldots, 0,-1,0,0,0,\ldots),$$
where the second $-1$ is preceded by $n-1$ zeros, and so $\dege_k  r= \dd_k$ for all $k \leq n$.    This completes the proof.
\end{proof}

In Section 7.6, we use transseries to prove the analogue of Theorem \ref{degeequiv} for the logarithmico-exponential functions, namely, Theorem \ref{chartheorem2}, by computing the  set of all $\dd \in \prod_{n = 0}^{ \infty*}\overline{\RR}$ such that $\dd = \dege f$ for some logarithmico-exponential function $f$.

Our next theorem is an analogue of Proposition \ref{infprop} for logexponential degree.   The theorem has many applications,  both to proving various properties of logexponential degree (in Subsection  6.3.4) and to applying  logexponential degree to analytic number theory  (in Part 3).

\begin{lemma}\label{compllem}
The totally ordered set $\prod_{n = 0}^{ \infty*}\overline{\RR}$ is complete.
\end{lemma}

\begin{proof}
Let $\mathcal{S}$ be a subset of $\prod_{n = 0}^{ \infty*}\overline{\RR}$, and let  $\dd$ be the infimum of $ \mathcal{S}$ in $\prod_{n = 0}^{ \infty}\overline{\RR}$.  If $\dd$ lies in $\prod_{n = 0}^{ \infty*}\overline{\RR}$, then clearly $\dd$ is the infimum of $ \mathcal{S}$ in $\prod_{n = 0}^{ \infty*}\overline{\RR}$.  Thus, we may suppose that $\dd$ does not lie in $\prod_{n = 0}^{ \infty*}\overline{\RR}$.   Let $n$  be the smallest nonnegative integer violating conditions (1)--(4) of the definition of   $\prod_{n = 0}^{ \infty*}\overline{\RR}$.  There are four cases to consider.

Suppose first that $\dd_n = \infty$ and $ \dd < (\dd_0, \dd_1, \ldots, \dd_n, 0,1,0,0,0,\ldots)$.  Then there exists some $\dd' \in \mathcal{S}$ such that
$$\dd \leq (\dd_0, \dd_1 \ldots, \dd_{n-1},\infty, \dd_{n+1}',\dd_{n+1}',\ldots) = \dd' < (\dd_0, \dd_1, \ldots, \dd_{n-1},\infty, 0,1,0,0,0,\ldots).$$
But this contradicts $\dd' \in \prod_{n = 0}^{ \infty*}\overline{\RR}$.  Therefore this case is impossible.

Suppose now that $\dd_n = -\infty$ and $ \dd > (\dd_0, \dd_1, \ldots, \dd_n, 0,-1,0,0,0,\ldots)$.
Then one has $$\dd' > (\dd_0, \dd_1, \ldots, \dd_n, 0,-1,0,0,0,\ldots) \in \prod_{n = 0}^{ \infty*}\overline{\RR}$$
for all $\dd'  \in \mathcal{S}$.  Suppose that $\dd''$ is some lower bound of $\mathcal{S}$ in $\prod_{n = 0}^{ \infty*}\overline{\RR}$  such that $\dd'' > (\dd_0, \dd_1, \ldots, \dd_n, 0,-1,0,0,0,\ldots)$.  Then
$$(\dd_0, \dd_1 \ldots, \dd_{n-1},-\infty, \dd_{n+1},\dd_{n+1},\ldots) = \dd \geq \dd'' >(\dd_0, \dd_1, \ldots, \dd_{n-1},-\infty, 0,-1,0,0,0,\ldots),$$
which contradicts $\dd'' \in \prod_{n = 0}^{ \infty*}\overline{\RR}$.  Therefore $(\dd_0, \dd_1, \ldots, \dd_n, 0,-1,0,0,0,\ldots)$ is the greatest lower bound of $\mathcal{S}$ in $\prod_{n = 0}^{ \infty*}\overline{\RR}$.  Thus, $\mathcal{S}$ has an infimum in $\prod_{n = 0}^{ \infty*}\overline{\RR}$ in this case.

Suppose now that $\dd_n \neq \pm \infty$, $\dd_{n+1} = \infty$ and $ \dd > (\dd_0, \dd_1, \ldots, \dd_{n+1},1,0,0,0,\ldots)$.  Then one has $$\dd' > (\dd_0, \dd_1, \ldots, \dd_{n+1}, 1,0,0,0,\ldots) \in \prod_{n = 0}^{ \infty*}\overline{\RR}$$
for all $\dd'  \in \mathcal{S}$.  Suppose that $\dd''$ is some lower bound of $\mathcal{S}$  in $\prod_{n = 0}^{ \infty*}\overline{\RR}$ such that $\dd'' > (\dd_0, \dd_1, \ldots, \dd_{n+1}, 1,0,0,0,\ldots)$.  Then
$$(\dd_0, \dd_1 \ldots, \dd_{n},\infty, \dd_{n+2},\dd_{n+3},\ldots) = \dd \geq \dd'' >(\dd_0, \dd_1, \ldots, \dd_{n},\infty, 1,0,0,0,\ldots),$$
which contradicts $\dd'' \in\prod_{n = 0}^{ \infty*}\overline{\RR}$.  Therefore $(\dd_0, \dd_1, \ldots, \dd_{n+1}, \infty,1,0,0,0,\ldots)$ is the greatest lower bound of $\mathcal{S}$ in $\prod_{n = 0}^{ \infty*}\overline{\RR}$.  Thus, $\mathcal{S}$ has an infimum in $\prod_{n = 0}^{ \infty*}\overline{\RR}$ in this case.

Finally, suppose that $\dd_n \neq \pm \infty$, $\dd_{n+1} =- \infty$ and $ \dd < (\dd_0, \dd_1, \ldots, \dd_{n+1},-1,0,0,0,\ldots)$.  Then there exists some $\dd' \in \mathcal{S}$ such that
$$\dd \leq (\dd_0, \dd_1 \ldots, \dd_{n},-\infty, \dd_{n+2}',\dd_{n+3}',\ldots) = \dd' < (\dd_0, \dd_1, \ldots, \dd_{n},-\infty, -1,0,0,0,\ldots).$$
But this contradicts $\dd' \in \prod_{n = 0}^{ \infty*}\overline{\RR}$.   Therefore this case is impossible.
\end{proof}

\begin{theorem}\label{infpropexp}
Let $f \in \RR^{\RR_\infty}$.    One has
\begin{align*}
\dege f & = \inf\{\dege r:r \in \mathbb{L}_{> 0}, \, \dege f \leq \dege r \} \\
& = \inf\{\dege r:r \in \mathbb{L}_{> 0}, \, f(x) = O(r(x)) \ (x \to \infty) \} \\
& = \inf\{\dege r:r \in \mathbb{L}_{> 0}, \, \forall x \gg 0\, |f(x)|\leq r(x) \} \\
& = \inf\{\dege r:r \in \mathbb{L}_{> 0}, \, f(x) = o(r(x)) \ (x \to \infty) \} \\
& = \inf\{\dege r:r \in \mathbb{L}_{> 0}, \, \dege f < \dege r \},
\end{align*}
where the infima (exist and) are computed in  $\prod_{n = 0}^ {\infty*}\overline{\RR}$.
\end{theorem}

\begin{proof}
The given infima exist by Lemma \ref{compllem}.  By Corollary \ref{oexp}, if $\dege f < \dege r$, where $r \in \mathbb{L}_{> 0}$, then one has $f(x) = o(r(x)) \ (x \to \infty)$.  Moreover, by Proposition \ref{aspropexoexp}, if $f(x) = O(r(x)) \ (x \to \infty)$, then $\dege f \leq \dege r$.  It follows that
\begin{align*}
\dege f & \leq \inf\{\dege r:r \in \mathbb{L}_{> 0}, \, \dege f \leq \dege r \} \\
& \leq \inf\{\dege r:r \in \mathbb{L}_{> 0}, \, f(x) = O(r(x)) \ (x \to \infty) \} \\
& \leq \inf\{\dege r:r \in \mathbb{L}_{> 0}, \, \forall x \gg 0\ |f(x)|\leq r(x) \} \\
& \leq \inf\{\dege r:r \in \mathbb{L}_{> 0}, \, f(x) = o(r(x)) \ (x \to \infty) \} \\
& \leq \inf\{\dege r:r \in \mathbb{L}_{> 0}, \, \dege f < \dege r\},
\end{align*}

Suppose to obtain a contradiction that
$$\dege f < \inf\{\dege r:r \in \mathbb{L}_{> 0}, \, \dege f < \dege r\}.$$
Then one has $\dege f < \dd$ for some $\dd  \in \prod_{n = 0}^{ \infty*}\overline{\RR}$ such that $\dd  \leq \dege r$ for all $r \in \mathbb{L}_{> 0}$ such that $\dege f < \dege r$.  Let $N$ be least such that $\dege_{N} f < \dd_{N}$, so that $\dege_{k} f = \dd_k$ for all $k < N$.   Let $t \in \RR$ be such that $\dege_{N} f < t< \dd_{N}$.  We claim that there is an $r \in \mathbb{L}_{> 0}$ such that $\dege_k r = \dege_k f$ for all $k < N$ and $\dege_N r= t$.   Assume that this claim is true.   Then one has $\dege f < \dege r < \dd$, which our desired contradiction.

Thus, we must prove the claim above.  Note first that, by the definition of $\prod_{n = 0}^ {\infty*}\overline{\RR}$, one has
$$( \dd_0,  \dd_1,  \dd_2, \ldots,  \dd_{N-1}, t, 0,0,0,0,\ldots) \in \prod_{n = 0}^ {\infty*}\overline{\RR}$$
for some $t$ with $\dege_{N} f < t< \dd_{N}$ provided that it is not the case that $ \dd_{N-1} = -\infty$ and $\dege_N f = 0$ and it is not the case that
$ \dd_{N-2} \neq \pm\infty$,  $ \dd_{N-1} = \infty$, and $\dege_N f = 1$.  Thus, in this case, our claim holds by Proposition \ref{degerprop}.

We may suppose, then, that either $ \dd_{N-1} = -\infty$ and $\dege_N f = 0$, or
$ \dd_{N-2} \neq \pm\infty$,  $ \dd_{N-1} = \infty$, and $\dege_N f = 1$.   Suppose the first case.
\begin{align*}
\dege f & < \dd = (\dd_0, \dd_1, \ldots, \dd_{N-2},-\infty, \dd_{N}, \dd_{N+1},\dd_{N+2},\ldots) \\ & \leq (\dd_0, \dd_1, \ldots, \dd_{N-2}, -\infty,0,-1,0,0,0,\ldots),
\end{align*}
which implies $0 = \dege_N f  < \dd_{N} \leq 0$, a contradiction. Likewise, the second case is impossible, since
\begin{align*}
\dege f & < \dd = (\dd_0, \dd_1, \ldots, \dd_{N-2},\infty, \dd_{N}, \dd_{N+1},\dd_{N+2},\ldots) \\ & \leq (\dd_0, \dd_1, \ldots, \dd_{N-2}, \infty,1,0,0,0,\ldots),\end{align*}
which  implies $1 = \dege_N f   < \dd_{N} \leq 1$, again a contradiction.  This completes the proof.
\end{proof}

\begin{corollary}\label{infpropexplow}
Let $f \in \RR^{\RR_\infty}$.    One has
\begin{align*}
\underline{\dege}\, f & = \sup\{\dege r:r \in \mathbb{L}_{> 0}, \, \underline{\dege}\, f\geq \dege r \} \\
& = \sup\{\dege r:r \in \mathbb{L}_{> 0}, \, f(x) \gg r(x) \ (x \to \infty) \} \\
& = \sup\{\dege r:r \in \mathbb{L}_{> 0}, \, \forall x \gg 0\ |f(x)|\geq r(x) \} \\
& = \sup\{\dege r:r \in \mathbb{L}_{> 0}, \, f(x) \ggg r(x) \, (x \to \infty) \} \\
& = \sup\{\dege r:r \in \mathbb{L}_{> 0}, \, \underline{\dege}\, f > \dege r \},
\end{align*}
where the suprema (exist and) are computed in  $\prod_{n = 0}^ {\infty*}\overline{\RR}$.
\end{corollary}

\begin{corollary}
Let $f,g  \in \RR^{\RR_\infty}$.     One has $\dege f \leq \dege g$ if and only if $\dege f \leq \dege r$ for all  $r \in  \mathbb{L}_{> 0}$ such that $g(x) \ll r(x) \ (x \to \infty)$.  Likewise,  one has $\underline{\dege}\,  f \leq \underline{\dege}\,  g$ if and only if $\dege r \leq \underline{\dege}\, g$ for all  $r \in  \mathbb{L}_{> 0}$ such that $f(x) \gg r(x) \ (x \to \infty)$.
\end{corollary}

The following proposition is the analogue of Proposition \ref{fresupperlower} for logexponential degree.

\begin{proposition}
Let $f \in \RR^{\RR_\infty}$.  For all $X \subseteq \dom f$ with   $\sup X = \infty$, one has
$$\underline{\dege}\, f  \leq \underline{\dege}\, f|_X \leq \dege  f|_X \leq \dege f.$$
Moreover, one has
$$\underline{\dege}\, f = \inf\left\{\dege f|_X:  X \subseteq \dom f \text{ and }  \sup X = \infty \right\}$$
$$\dege f  = \sup\left\{\underline{\dege}\, f|_X:  X \subseteq \dom f \text{ and }  \sup X = \infty \right\}.$$
\end{proposition}

\begin{proof}
The first statement is clear, as then are the inequalities
$$\underline{\dege}\, f \leq \inf\left\{\dege f|_X:  X \subseteq \dom f \text{ and }  \sup X = \infty \right\}$$
$$\dege f  \geq \sup\left\{\underline{\dege}\, f|_X:  X \subseteq \dom f \text{ and }  \sup X = \infty \right\}.$$
We prove that the second inequality above is an equality; the proof for the other is similar.   Suppose, to obtain a contradiction, that
$$\dege f > \sup\left\{\underline{\dege}\, f|_X:  X \subseteq \dom f \text{ and }  \sup X = \infty \right\}.$$
By Proposition \ref{degerprop} (or by Proposition  \ref{oexppropstrong} of Section 7.5), there exists an $r \in \mathbb{L}_{>0}$ such that
$$\dege f > \dege r > \sup\left\{\underline{\dege}\, f|_X:  X \subseteq \dom f \text{ and }  \sup X = \infty \right\}.$$
It follows that, for every set $X \subseteq \dom f$ with  $\sup X = \infty$,  one has
$\dege r > \underline{\dege}\, f|_X$, whence it is not the case that $f|_X(x) \gg r(x) \ (x \to \infty)$,  i.e., one has $$\liminf_{x \to \infty} \frac{|f|_X(x)|}{r(x)} = 0.$$  Since this holds for every set $X \subseteq \dom f$ with  $\sup X = \infty$, one has $\limsup_{x \to \infty} \frac{|f(x)|}{r(x)} = 0$  and  therefore $\lim_{x \to \infty} \frac{|f(x)|}{r(x)} = 0$, i.e., $f(x) = o(r(x)) \ (x \to \infty)$.  However, this contradicts $\dege f > \dege r$.
\end{proof}

For any functions $f$ and $g$ on $[0,\infty)$ with $f(x) \geq g(x)$ for all $x$,  there is a function $h$ on $[0,\infty)$ with  $f(x) \geq h(x) \geq  g(x)$ for all $x$ and for which $h(x) = f(x)$ on some unbounded subset of $[0,\infty)$ and $h(x) = g(x)$ on some unbounded subset of $[0,\infty)$. From the proposition, then, it follows that $\dege h = \dege f$ and $\underline{\dege} \, h = \underline{\dege}\, g$.  Moreover, if $f$ and $g$ are continuous and  increasing (resp.,  decreasing), then one can find a corresponding $h$ with the same  properties.

\subsection{Relationships with operations on functions}

The next proposition relates $\dege$ to the operations of addition, multiplication, and division of functions.  For all $\dd, \ee \in \prod_{n = 0}^\infty\overline{\RR}$, we define
$$\dd\oplus \ee  =  \dd+ \ee\index[symbols]{.g m@$\dd \oplus \ee$}  $$
if  $\dd_k$ and $\ee_k$ are finite for all $k$, and
$$\dd\oplus \ee =  (\dd_0+\ee_0, \ldots, \dd_{n-1}+\ee_{n-1},f_{0},f_{1},f_{2},\ldots)
if $n$ is the least nonnegative integer such that $\dd_n$ and $\ee_n$ are not both finite, where
(f_0,f_1,f_2,\ldots) = \begin{cases} \max( (\dd_{n},\dd_{n+1},\ldots),(\ee_{n},\ee_{n+1},\ldots)) & \text{if }  \dd_{n} = \infty \text{ or }  \ee_{n} = \infty \\
\min( (\dd_{n},\dd_{n+1},\ldots),(\ee_{n},\ee_{n+1},\ldots)) & \text{otherwise}
\end{cases}$$
as computed in  $\prod_{n = 0}^\infty\overline{\RR}$.  The operation $\oplus$ is a binary operation on $\prod_{n = 0}^\infty\overline{\RR}$ and restricts to a binary operation on $\prod_{n = 0}^{\infty*}\overline{\RR}$.

\begin{lemma}\label{difflemexp}
Let $f,g \in \RR^{\RR_\infty}$ with $\dom f = \dom g$.  Then one has
$$\max(\dege f,\dege g) = \dege \max(|f(x)|,|g(x)|).$$
\end{lemma}

\begin{proof}
Since $0 \leq |f(x)| \leq  \max(|f(x)|,|g(x)|)$ and $0 \leq  |g(x)| \leq  \max(|f(x)|,|g(x)|)$ for all $x$ (in $\dom f = \dom g$), the inequality   $\max(\dege f,\dege g) \leq \dege \max(|f(x)|,|g(x)|)$ follows from Proposition \ref{aspropexoexp}(1).  To prove the reverse inequality, we may suppose without loss of generality that $\dege f \geq \dege g$.  Let $r \in  \mathbb{L}_{> 0}$ with $\dege r > \dege f$.  By Corollary \ref{oexp}, since $\dege f < \dege r$ and $\dege g < \dege r$, one has $|f(x)| \leq r(x)$ and $|g(x)| \leq r(x)$,  and therefore $\max(|f(x)|,|g(x)|) \leq r(x)$, for all $x \gg 0$, whence
$\dege\max(|f(x)|,|g(x)|) \leq \dege r$.  Taking the infimum over all $r$ as chosen and applying Theorem \ref{infpropexp},  we conclude that $\dege \max(|f(x)|,|g(x)|) \leq \dege f =  \max(\dege f,\dege g)$.
\end{proof}

\begin{theorem}\label{diffpropexp}
Let $f$ and $g$ be real functions such that both $\underline{f} = f|_{\dom f \cap \dom g}$ and $\underline{g} = g|_{\dom f \cap \dom g}$ are in $\RR^{\RR_\infty}$, and let $n$ be a nonnegative integer.  One has the following.
\begin{enumerate}
\item $\dege(f + g) \leq \max (\dege \underline{f},\dege \underline{g})$, with equality if $\dege \underline{f} \neq  \dege \underline{g}$.
\item If $\dege(f+g) \neq \max(\dege \underline{f}, \dege \underline{g})$, then $\dege \underline{f} = \dege \underline{g}$.
\item $\dege(fg) \leq \dege \underline{f} \oplus \dege \underline{g}$.
\item If both $\underline{f}$ and $\underline{g}$ have finite logexponential degree to order $n$, then $\dege_k (fg)  \leq \dege_k \underline{f}+ \dege_k \underline{g}$ for the smallest $k \leq n$, if any, for which equality does not hold.
\item Suppose that (a) $\underline{g}$ has finite logexponential degree to order $n-1$ and exact logexponential degree to order $n$; (b) $\underline{f}$ has finite logexponential degree to order $n-1$; (c) exactly one of $\dege_n \underline{g}$ and  $\dege_n \underline{f}$ is finite; and (d) if $\dege_n \underline{g} = \pm \infty$, then $\underline{g}$ has exact logexponential degree.   Then one has $\dege(fg) = \dege \underline{f} \oplus \dege \underline{g}$.
\item If $\underline{g}$ has exact logexponential degree to order $n$,  and if one of $\dege_k \underline{f}$ and  $\dege_k \underline{g}$ is finite for  the smallest $k \leq n$ such that  $\dege_k \underline{f}$ and  $\dege_k \underline{g}$ are not both finite,  should such a $k$ exist,  then  $\mathcal{S}(\dege(fg), \dege \underline{f} \oplus \dege \underline{g}) > n$.
\item If $\underline{g}$ has exact logexponential degree,  and if one of $\dege_k \underline{f}$ and  $\dege_k \underline{g}$ is finite for  the smallest $k$ such that  $\dege_k \underline{f}$ and  $\dege_k \underline{g}$ are not both finite,  should such a $k$ exist, then  $\dege(fg) = \dege \underline{f} \oplus \dege \underline{g}$.
\item If $\underline{g}$ has finite and exact logexponential degree, then
$\dege(fg) = \dege \underline{f} \oplus \dege \underline{g}$.
\item  $\dege (f^k) = \dege f \oplus \dege f \oplus\cdots  \oplus \dege f$ for any positive integer $k$.  More generally,  for any $a > 0$,   if $f$ has finite logexponential degree to order $n$,   then   $\dege_k (|f|^a) = a \dege_k f$ for all $k  \leq n$,  and, if one also has $\dege_{n+1} f = \pm \infty$, then $\dege_k (|f|^a) = \dege_k f$ for  all $k > n$.
\end{enumerate}
\end{theorem}

\begin{proof}
We may suppose without loss of generality that $f = \underline{f}$ and $g = \underline{g}$.   Since $$|f(x)+g(x)| \leq |f(x)|+|g(x)| \leq 2 \max(|f(x)|,|g(x)|)$$ for all $x \in \dom f = \dom g$, by  Lemma \ref{difflemexp} one has
$$\dege (f+g) \leq \dege  \max(|f(x)|,|g(x)|) = \max(\dege f,\dege g).$$  This proves statement (1), and statement (2) is an immediate consequence of (1).

We now prove statement (3).  By Proposition \ref{diffprop}, we may assume that $\dege_{k} f$ and $\dege_{k} g$ are not both finite for all $k$.
Let $n$ be least so that $\dege_{n} f$ and $\dege_{n} g$ are not both finite.  We may also suppose that $\degl_k (fg) = \degl_k f + \degl_k g$ for all $k < n$, for otherwise $\dege (fg) < \dege f\oplus \dege g$ by Proposition \ref{diffprop}.  It follows, then, that $(fg)_{(k)} = f_{(k)} g_{(k)}$ for all $k \leq n$.

First, suppose that $\deg f_{(n)} = \deg g_{(n)} = -\infty$, so that  $\deg \, (fg)_{(n)} =- \infty$.  Then $f_{(n+1)}(x) = -\frac{1}{\log |f_{(n)}(x)|}$ and $g_{(n+1)}(x) = -\frac{1}{\log|g_{(n)}(x)|}$ and
\begin{align*}
0 \leq (fg)_{(n+1)}(x) & = -\frac{1}{\log|f_{(n)}(x)g_{(n)}(x)|} \\
&  = -\frac{1}{\log|f_{(n)}(x)|+\log |g_{(n)}(x)|}  \\
&  = \frac{1}{\frac{1}{f_{(n+1)}(x)}+\frac{1}{g_{(n+1)}(x)}}  \\
&  \leq \min(f_{(n+1)}(x),g_{(n+1)}(x)).
\end{align*}
for all $x \gg 0$.  It follows, then, that
\begin{align*}
\dege \,  (fg)_{(n+1)}  \leq \dege \min(f_{(n+1)}(x),g_{(n+1)}(x)) \leq \min (\dege f_{(n+1)}, \dege g_{(n+1)}),
\end{align*}
whence statement (3) holds in this case.

Next,  suppose that $\deg f_{(n)} = -\infty$ and $-\infty < \deg g_{(n)} < \infty$, so that $\deg \, (fg)_{(n)} = \deg (f_{(n)}g_{(n)}) = -\infty$.  One has
\begin{align*}
0 \leq (fg)_{(n+1)}(x)   = -\frac{1}{\log|f_{(n)}(x)|+\log |g_{(n)}(x)|}
\end{align*}
and therefore
\begin{align*}
\limsup_{x \to \infty}  \frac{(fg)_{(n+1)}(x) }{f_{(n+1)}(x)} & = \limsup_{x \to \infty} \frac{\log|f_{(n)}(x)|}{\log|f_{(n)}(x)|+\log |g_{(n)}(x)|}   \\ & =  \limsup_{x \to \infty} \frac{1}{1+\frac{\log |g_{(n)}(x)|}{\log|f_{(n)}(x)|}}  \\
& = \frac{1}{1+ \liminf_{x \to \infty}  \frac{\log |g_{(n)}(x)|}{\log|f_{(n)}(x)|}}  \\
& = \frac{1}{1- \limsup_{x \to \infty}  \frac{\log |g_{(n)}(x)|/\log x}{-\log|f_{(n)}(x)|/\log x}} \\
& = \frac{1}{1- (\deg g_{(n)}) \left(\frac{1}{\infty} \right) }\\
& = 1,
\end{align*}
$$(fg)_{(n+1)}(x) = O(f_{(n+1)}(x)) \ (x \to \infty).$$
It follows that $$ \dege \, (fg)_{(n+1)} \leq \dege f_{(n+1)}.$$
Thus, statement (3) holds in this case.

Next, suppose that $\deg f_{(n)} = \deg g_{(n)} = \infty$.  If $\deg \, (fg)_{(n)} < \infty$, then $\dege \, (fg)_{(n)} < \max(\dege f_{(n)}, \dege g_{(n)})$.  If, on the other hand, one has $\deg \, (fg)_{(n)} = \infty$, then  $f_{(n+1)}(x) =  \max(\log |f_{(n)}(x)|,0)$ and $g_{(n+1)}(x) =  \max(\log |g_{(n)}(x)|,0)$, and thus $$0\leq (fg)_{(n+1)}(x) =  \max(\log |f_{(n)}(x)g_{(n)}(x)|,0) \leq f_{(n+1)}(x)+g_{(n+1)}(x),$$ so that $\dege \, (fg)_{(n+1)}  \leq \max (\dege f_{(n+1)}, \dege g_{(n+1)})$.  Thus, statement (3) holds in either case.

To complete the proof of (3), suppose that $\deg f_{(n)} = \infty$ and $\deg g_{(n)} < \infty$.    Let $F = f_{(n)}$ and $G = g_{(n)}$.  Note that
$$\dege(FG) = \dege((F+G)^2-F^2-G^2) \leq \max(\dege(F+G)^2, \dege(F^2),\dege( G^2)),$$
$$\dege(F^2) \leq \dege F \oplus \dege F = \dege F,$$
$$\deg(G^2) = 2 \deg G < \infty,$$
$$\dege(F+G)^2 \leq \dege (F+G) \oplus \dege (F+G) = \dege (F+G) = \dege F,$$
$$\dege(FG)  \leq \max(\dege(F+G)^2, \dege(F^2),\dege( G^2)) \leq \dege F.$$
Thus, in this case, we have $\dege \, (fg)_{(n)} \leq \dege  f_{(n)}$.  This completes the proof of (3).

Statement (4) follows from Propositions \ref{diffprop} and \ref{degeprop0}.

Assume the hypotheses of statement (5).    By Proposition \ref{mmm}(1), one has $\dege_k(fg) = \dege_k f + \dege_k g$ and $(fg)_{(k)} = f_{(k)} g_{(k)}$, where  $g_{(k)}$ has exact degree $\dege_k g$, for all $k \leq n$.   Suppose that $d:=\dege_n g$ is finite, so that $\dege_n f = \pm\infty$.   Suppose first that $\dege_n f = -\infty$.  Then one has
$$\lim_{x \to \infty} \frac{\log |g_{(n)}(x)|}{\log |f_{(n)}(x)|} = \lim_{x \to \infty} \frac{d\log x}{\log |f_{(n)}(x)|} = \frac{d}{-\infty}= 0,$$
and therefore
$$\lim_{x \to \infty} \frac{f_{(n+1)}(x)}{(fg)_{(n+1)}(x)}  =  \lim_{x \to \infty} \frac{\log |f_{(n)}(x)g_{(n)}(x)|}{\log |f_{(n)}(x)|}= \lim_{x \to \infty} \left(1+\frac{\log|g_{(n)}(x)|}{\log |f_{(n)}(x)|}\right) = 1.$$
It follows that $(fg)_{(n+1)}(x) \sim f_{(n+1)}(x) \ (x \to \infty)$, whence $\dege \, (fg)_{(n)} = \dege f_{(n)}$.
Suppose, on the other hand, that $\dege_n f = \infty$.  Let $N$ be any real number with  $N > -\deg g_{(n)}$ and $N \geq 0$, and let
\begin{align*}
F(x) & = \frac{\max(\log |f_{(n)}(x)|,2N \log x)}{\max(\log |f_{(n)}(x)g_{(n)}(x)|,2N \log x+\log|g_{(n)}(x)|)} \\
& = \frac{\max\left(\frac{\log |f_{(n)}(x)|}{\log x},2N\right)}{\max\left(\frac{\log |f_{(n)}(x)|}{\log x}+\frac{\log|g_{(n)}(x)|}{\log x},2N+\frac{\log|g_{(n)}(x)|}{\log x}\right)}.
\end{align*}
Note that $F(x) \geq 0$ for all $x \gg 0$.  If $\deg g_{(n)} > 0$, then we may let $N = 0$, and then $F(x) \leq 1$ for all $x \gg 0$.  Suppose, on the other hand, that
$\deg g_{(n)} \leq 0$, so that $N > -\deg  g_{(n)} \geq 0$.   We  claim  that $F(x) \leq 2$ for all $ x \gg 0$.  One has
$$-N< \frac{\log|g_{(n)}(x)|}{\log x}$$ for all $x \gg 0$.  If $\frac{\log |f_{(n)}(x)|}{\log x} \geq 2N$, then one has
$$F(x)  = \frac{\frac{\log |f_{(n)}(x)|}{\log x}}{\frac{\log |f_{(n)}(x)|}{\log x}+\frac{\log |g_{(n)}(x)|}{\log x}} < \frac{\frac{\log |f_{(n)}(x)|}{\log x}}{\frac{\log |f_{(n)}(x)|}{\log x}-N} \leq 2$$
for all $x \gg 0$.
On the other hand, if  $\frac{\log |f_{(n)}(x)|}{\log x} \leq 2N$, then
$$F(x) = \frac{2N}{2N+ \frac{\log |g_{(n)}(x)|}{\log x}} < \frac{2N}{2N-N} = 2$$
for all $x  \gg 0$.  Thus, we have shown that $0\leq F(x) \leq 2$ for all $x \gg 0$.  It follows that
$$\max(\log |f_{(n)}(x)|,2N \log x) = O\left(\max(\log |f_{(n)}(x)g_{(n)}(x)|,2N \log x+\log|g_{(n)}(x)|) \right) \ (x \to \infty).$$
Therefore, since $$\dege \max(\log |f_{(n)}(x)|,0) \geq (0,1,0,0,0,\ldots) =\dege (2N \log x)$$ and likewise $$\dege \max(\log |f_{(n)}(x)g_{(n)}(x)|,0) \geq  \dege(2N \log x+\log|g_{(n)}(x)|),$$
by Lemma \ref{difflemexp} and Proposition \ref{aspropexoexp}(1) one has
\begin{align*}
\dege f_{(n+1)} & =
\dege  \max(\log |f_{(n)}(x)| ,0)  \\ & = \dege \max(\log |f_{(n)}(x)|,2N \log x)
\\ & \leq  \dege \max(\log |f_{(n)}(x)g_{(n)}(x)|,2N \log x+\log|g_{(n)}(x)|) \\
& = \dege \max(\log |f_{(n)}(x)g_{(n)}(x)|,0)  \\
& = \dege \, (fg)_{(n+1)}.
\end{align*}
Since the reverse inequality was proved in the proof of statement (3), equalities hold.   This proves (5) in the case where $\dege_n g$ is finite.

Suppose,  now, that $\dege_n g = \pm \infty$, so that $\dege_n f$ is finite and $g$ has exact logexponential degree.   It follows that $\dege_n(fg) = \deg (f_{(n)} g_{(n)}) = \dege_n g$.     Suppose that $\dege_n g = -\infty$.
The proof of (3) shows that
$$\limsup_{x \to \infty}  \frac{(fg)_{(n+1)}(x) }{g_{(n+1)}(x)}  = 1,$$
whence $(fg)_{(n+1)}(x) =O( g_{(n+1)}(x)) \ (x \to \infty)$ and $(fg)_{(n+1)}(x)\neq o( g_{(n+1)}(x)) \ (x \to \infty)$.  Therefore, since $g_{(n+1)}$ has exact logexponential degree, it follows from  Corollary \ref{oexpcor} that $\dege \, (fg)_{(n+1)} = \dege g_{(n+1)}$.
Suppose, on the other hand, that $\dege_n g = \infty$, so that
$\lim_{x \to \infty} |g_{(n)}(x)| = \infty$ and $g_{(n+1)}(x) = \log  |g_{(n)}(x)|$ for all $x \gg 0$, while also
$$\limsup_{x \to \infty} \frac{\log |f_{(n)}(x)|}{\log |g_{(n)}(x)|} = \limsup_{x \to \infty} \frac{\log |f_{(n)}(x)|/\log x}{\log |g_{(n)}(x)|/\log x} = \frac{\dege_n f }{\infty}  = 0.$$ It follows that
\begin{align*}
\limsup_{x \to \infty} \frac{(fg)_{(n+1)}(x)}{g_{(n+1)}(x)} &  =  \limsup_{x \to \infty} \frac{\max(\log |f_{(n)}(x)g_{(n)}(x)|,0)}{\log |g_{(n)}(x)|} \\
\\ & = \limsup_{x \to \infty} \max\left(1+\frac{\log |f_{(n)}(x)|}{\log |g_{(n)}(x)|},0\right) \\
& = 1,
\end{align*}
whence $\dege \, (fg)_{(n+1)} = \dege g_{(n+1)}$ also in that case.  Statement (5) follows.

Note that statement (7) is an immediate consequence of statement (5) and Proposition \ref{mmm}(1), and statement (8) is an immediate consequence of statement (7).   Statement (9) is an easy consquence of the fact that $\log  |f|^a = a \log  |f|$.  Finally, to prove (6), note that the proof of (5) implies that $\dege_l (fg) = \dege_l f + \dege_l g$ and $(fg)_{(l)} = f_{(l)}g_{(l)}$ for all $l \leq k$,  while also $(fg)_{(k+1)}(x) =O( g_{(k+1)}(x)) \ (x \to \infty)$ and $(fg)_{(k+1)}(x)\neq o( g_{(k+1)}(x)) \ (x \to \infty)$, where by hypothesis $g_{(k+1)}(x)$ has exact logexponential degree to order $n-(k+1)$,  so that, by Proposition \ref{aspropexoexp}(1) and Corollary \ref{oexp}(1),  one has $$\mathcal{L}((fg)_{(k+1)},  g_{(k+1)}) > n-(k+1),$$
$$\mathcal{S}(\dege(fg), \dege \underline{f} \oplus \dege \underline{g}) > n.$$  This completes the proof.
\end{proof}

\begin{example} \
\begin{enumerate}
\item Let $f(x) = e^{x^2}$ and $g(x) = e^{-x}$, so that $\deg f = \infty$ and $\deg g = -\infty$.  Then $f$ and $g$ have exact logexponential degree,  and one has
$$\dege (fg)  = (\infty,2,0,0,0,\ldots) = \dege f \oplus \dege g.$$
\item Let $f(x) = e^x$ and $g(x) = e^{-x^2}$, so that $\deg f = \infty$ and $\deg g = -\infty$.   Then $f$ and $g$ have exact logexponential degree,  yet one has
$$\dege (fg)  = (-\infty,-2,0,0,0,\ldots) < \dege f \oplus \dege g = (\infty,1,0,0,0,\ldots).$$
\item Let $f(x)$ be defined on $\RR$ so that $f(x) = 1$ for $x \in [2N,2N+1)$ and $f(x) = 0$ for $x \in [2N-1,2N)$ for all integers $N$.   Let $g(x)  =  1-f(x)$.  Then $f(x) + g(x) = 1 = \max(f(x),g(x))$ has exact logexponential degree  $(0,0,0,0\ldots)$,  while also  $\underline{\dege} \, f = \underline{\dege} \, g = (-\infty,-\infty,\infty, \ldots)$.  This example shows that, in general,  one need not have $\underline{\dege}(f+g) \leq \max (\underline{\dege}\, f,\underline{\dege} \, g)$, and the obvious inequality  $\max(\underline{\dege}\, f , \underline{\dege}\, g) \leq \underline{\dege} \max (|f|,|g|)$ need not be an equality.    Nevertheless, since $|f+g| \leq 2\max ( |f|,|g|)$,  in general one has $\underline{\dege}(f+g) \leq \underline{\dege} \max (|f|,|g|)$.   Moreover,  one has $\min(\underline{\dege}\, f, \underline{\dege}\, g) = \underline{\dege} \min (|f|,|g|)$: the proof is similar to that of Lemma \ref{difflemexp}.
\end{enumerate}
\end{example}

\begin{problem}
Generalize statements (3)--(8) of Theorem \ref{diffpropexp} to the extent possible.
\end{problem}

Next, we relate $\dege$ to the operation of composition of functions.  The most general case possible seems to be rather complicated, so we restrict ourselves to the special cases below, which are sufficient for our purposes.

\begin{theorem}\label{fgie}
Let $f$ and $g$ be real functions defined on a neighborhood of $\infty$.  Suppose that $f$  has finite degree $d$ and exact logexponential degree, $g$ has positive degree and is eventually positive, and $g(x) \asymp  r(x) \ (x \to \infty)$ for some  $r \in \mathfrak{L}$.  Then one has
$$\dege( f  \circ g )=  \dege f \oplus d (\dege g + (-1,0,0,0,\ldots)),$$
and $f \circ g$ has exact logexponential degree.
\end{theorem}

\begin{proof}
Let $e_k = \dege_k g= \dege_k r$ for all $k$.
Note that
$$\log g(x) \sim \log r(x) \sim e_0 \log x \ (x \to \infty)$$
and therefore
$$\log g(e^x) \sim e_0 x \ (x \to \infty).$$
It follows by induction, then, that
$$\log^{\circ k} g(x) \sim \log^{\circ k } x \ (x \to \infty)$$ for all $k \geq 2$.
Thus, for any nonnegative integer $n$, one has
$$h_n(x) := \log^{\circ (n+1)} g(\exp^{\circ (n+1)}) \sim a_n x \ (x \to \infty),$$
where $a_0 = e_0$ and $a_n = 1$ if $n \geq 1$.

Replacing $f$ with $|f|$, we may assume that $f$ is nonnegative and eventually positive.  Since $f$ has finite degree $d$, we may suppose that $f$ has finite logarithmic degree to order $n \geq 0$.  Then, by Proposition \ref{fgi}, one has
$\deg (f \circ g)=  de_0$ and
$$\degl_1 (f \circ g) = \degl_1 f + d \degl_1 g= \degl_1 f + de_1,$$
and, provided that $n \geq  1$, also
$$\degl_k (f \circ g) = \degl_k f + d \degl_k g = \degl_k f, \quad \forall k = 2,3,\ldots,n.$$
Moreover,  since $f$ and $g$ have exact logexponential degree, all of the limits superior in the proof of Proposition \ref{fgi} can be replaced with limits, and thus $f \circ g$ has exact logexponential degree to order $n+1$.  Thus, the conclusion of the theorem holds if $f$ has finite logarithmic degree.  We may suppose, then, without loss of generality, that $\dege_{n+1} f = \deg f_{(n+1)} = \pm \infty$.

Let $d_k = \dege_k f$  for all $k$.
One has  $$f_{(n+1)}(\log^{\circ (n+1)} x) = f(x)x^{-d}(\log x)^{-d_1} \cdots (\log^{\circ n}x)^{-d_ {n}},$$
so that
$$f_{(n+1)}(\log^{\circ (n+1)} g(x)) = f(g(x))g(x)^{-d}(\log g(x))^{-d_1} \cdots (\log^{\circ n}g(x))^{-d_ {n}},$$
and therefore
\begin{align*}
(f\circ g)_{(n+1)}(\log^{\circ (n+1)} x) & = f(g(x))(\log x)^{-d_1} \cdots (\log^{\circ n}x)^{-d_ {n}} \cdot x^{-de_0} (\log x)^{-de_1}\cdots (\log^{\circ n} x)^{-de_n} \\
& =  f_{(n+1)}(\log^{\circ (n+1)} g(x))\left( \frac{g(x)}{r_n(x)}\right)^{d} \left( \frac{\log g(x)}{\log x}\right)^{d_1} \cdots\left( \frac{\log^{\circ n} g(x)}{\log^{\circ n}x}\right)^{d_{n}} \\
& \sim  f_{(n+1)}(\log^{\circ (n+1)} g(x))\left( \frac{g(x)}{r_n(x)}\right)^{d}e_0^{d_1} \\
& =  f_{(n+1)}(\log^{\circ (n+1)} g(x)) k_n(x),
\end{align*}
$$r_n(x) = x^{e_0}(\log x)^{e_1} \cdots (\log^{\circ n} x)^{e_n}$$
$$k_n(x) = \left( \frac{g(x)}{r_n(x)}\right)^{d}e_0^{d_1}.$$
It follows that
$$(f\circ g)_{(n+1)}(x) \sim   f_{(n+1)}(h_n(x))\,  k_n(\exp^{\circ(n+1)}x) \ (x \to \infty),$$
where, as before,
$$h_n(x) = \log^{\circ (n+1)} g(\exp^{\circ (n+1)}) \sim a_n x \ (x \to \infty).$$
Note that, since $g(x) \asymp  r(x) \ (x \to \infty)$, one has
$$k_n(x) \asymp \prod_{k > n}(\log^{\circ k} x)^{de_k} \ (x \to \infty),$$
and therefore
$$\log k_n(x) = O( \log^{\circ (n+2)} x) \ (x \to \infty),$$ whence
$$\log k_n(\exp^{\circ(n+1)}x) = O(\log x) \ (x \to \infty).$$
Since $\overline{\underline{\deg}} \, f_{(n+1)}  = \pm \infty$, one has
$$\lim_{x \to \infty} \frac{\log x}{  \log  f_{(n+1)}(h_n(x))  } = \lim_{x \to \infty} \frac{\log h_n(x)}{  \log  f_{(n+1)}(h_n(x))  }  =  0$$
and therefore
$$\log k_n(\exp^{\circ(n+1)}x)  = O(\log x) = o( \log  f_{(n+1)}(h_n(x)) ) \ (x \to \infty)$$
If $\deg f_{(n+1)} = \infty$, then also $\deg \, (f\circ g)_{(n+1)}  = \infty$ and therefore
\begin{align*}
(f\circ g)_{(n+2)}(x) & = \log \, (f\circ g)_{(n+1)}(x) \\
& \sim   \log  f_{(n+1)}(h_n(x))  + \log  k_n(\exp^{\circ(n+1)}x) \\
& \sim   \log  f_{(n+1)}(h_n(x))  \\
& = f_{(n+2)}(h_n(x))\ (x \to \infty),
\end{align*}
where $f_{(n+2)}$ has finite degree (by Proposition \ref{degeprop}(3)).  On the other hand, if $\deg f_{(n+1)} = -\infty$, then also $\deg \, (f\circ g)_{(n+1)}  = -\infty$ and therefore
\begin{align*}
(f\circ g)_{(n+2)}(x) & = -\frac{1}{\log \, (f\circ g)_{(n+1)}(x)} \\
& \sim  -\frac{1}{  \log  f_{(n+1)}(h_n(x))  + \log  k_n(\exp^{\circ(n+1)}x) }   \\
& \sim  -\frac{1}{  \log  f_{(n+1)}(h_n(x))  }   \\
& =  f_{(n+2)}(h_n(x))\ (x \to \infty),
\end{align*}
where $f_{(n+2)}$ has finite degree (by Proposition \ref{degeprop}(4)).
Thus, we have shown that
$$(f\circ g)_{(n+2)}(x)  \sim (f_{(n+2)} \circ h_n)(x) \ (x \to \infty),$$
and therefore
$$\dege \, (f\circ g)_{(n+2)}  =  \dege (f_{(n+2)} \circ h_n)$$
for some function $h_n$ with $h_n(x) \sim a_n x \ (x \to \infty)$ for some $a_n > 0$, where $f_{(n+2)}$ has finite degree and exact logexponential degree.   The argument may then be repeated {\it ad infinitum} to show that
$$\dege (f_{(n+2)} \circ h_n) = \dege f_{(n+2)}.$$
Therefore, since
$$\dege \, (f\circ g)_{(n+2)}  =  \dege f_{(n+2)},$$
the identity for $\dege \, (f\circ g)$ stated in the theorem follows from the definition of the operation $\oplus$, and the claim that $f \circ g$ has exact logexponential degree follows by repeated application of Proposition \ref{exactas}.
\end{proof}

\begin{lemma}\label{fgie00lemma}
Let $\dd,\dd',\ee \in \prod_{n = 0}^{ \infty*}\overline{\RR}$ with $\ee_n \neq \pm \infty$ for all $n$, and let
$\mathcal{S}$  be a subset of $\prod_{n = 0}^{ \infty*}\overline{\RR}$.  One has the following.
\begin{enumerate}
\item If $\dd \leq \dd'$, then $\dd \oplus \ee \leq \dd' \oplus \ee$.
\item $(\dd\oplus \ee) \oplus (-\ee) = \dd$.
\item $(\inf \mathcal{S}) \oplus \ee = \inf\{\dd\oplus\ee:  \dd \in  \mathcal{S}\}.$
\end{enumerate}
\end{lemma}

\begin{proof}
Statements (1) and (2) are clear, and statement  (3) is an easy consequence of statements  (1) and (2).
\end{proof}

\begin{theorem}\label{fgie00}
Let $f$ and $g$ be real functions defined on a neighborhood of $\infty$.  Suppose that $f$  has finite degree $d$, that $g$ has positive degree and is eventually positive,  continuous, and increasing, and  that $g(x) \asymp  r(x) \ (x \to \infty)$ for some  $r \in \mathfrak{L}$.  Then one has
$$\dege( f  \circ g )=  \dege f \oplus d (\dege g + (-1,0,0,0,\ldots)).$$
\end{theorem}

\begin{proof}
Let $e_k = \dege_k g= \dege_k r$ for all $k$.  Note that $g$ has exact logexponential degree, by Proposition \ref{exactas}.  Thus, by Proposition \ref{circle1}(2), one has $\deg(f \circ g) = \deg f \deg g$.  Note also that the compositional inverse $g^{-1}$ of $g$ is eventually continuous and increasing, and one has
$$g^{-1}(x) \asymp  x^{1/e_0} (\log x)^{-e_1/e_0}(\log^{ \circ 2} x)^{-e_2/e_0} \cdots (\log^{ \circ n} x)^{-e_n/e_0}  \ (x \to \infty).$$

Suppose first that $\dege f < (d,\infty,1,0,0,0,\ldots)$.
Then there exists an $s \in \mathbb{L}_{> 0}$ with $f(x) = O(s(x)) \ (x \to \infty)$ and $\deg s = d$.   For any such $s$, one has
$f(g(x)) = O(s(g(x))) \ (x \to \infty)$, and therefore
$$\dege (f \circ g) \leq \dege(s \circ g) =  \dege s \oplus d (\dege g + (-1,0,0,0,\ldots)),$$
by Theorem \ref{fgie}.  Taking the infimum over all  $s$ as chosen,  by Theorem \ref{infpropexp} and Lemma \ref{fgie00lemma} we have
$$\dege (f \circ g) \leq \dege f \oplus d ( \dege g + (-1,0,0,0,\ldots)) < (de_0,\infty,1,0,0,0,\ldots).$$
From the inequality above,  it follows that  $(f \circ g)(x) = O(t(x)) \ (x \to \infty)$ for some  $t \in \mathbb{L}_{> 0}$ with $\deg t = \deg(f \circ g) = de_0$. For any such $t$, one has  $f(x) = O(t(g^{-1}(x))) \ (x \to \infty)$, and therefore
\begin{align*}
\dege f & \leq \dege t(g^{-1}(x))  \\ & = \dege t\oplus de_0(1/e_0-1,-e_1/e_0, -e_2/e_0,-e_3/e_0,\ldots) \\
& = \dege t\oplus (d-de_0,-de_1, -de_2,-de_3,\ldots) \\
& = \dege t \oplus -d(\dege g+ (-1,0,0,0,\ldots)),
\end{align*}
again by Theorem \ref{fgie}.  Taking the infimum over all $t$ as chosen, we see that
\begin{align*}
\dege f \leq \dege(f \circ g)\oplus -d(\dege g + (-1,0,0,0,\ldots)).
\end{align*}
Thus, by Lemma \ref{fgie00lemma}, we have
\begin{align*}
\dege (f \circ g)  & \leq  \dege f \oplus d (\dege g + (-1,0,0,0,\ldots)) \\
& \leq (\dege(f \circ g)\oplus -d(\dege g + (-1,0,0,0,\ldots)))\oplus d (\dege g + (-1,0,0,0,\ldots)) \\
& = \dege(f \circ g).
\end{align*}
This proves the theorem in the case where $\dege f < (d,\infty,1,0,0,0,\ldots)$.

Suppose now that $\dege f = (d,\infty,1,0,0,0,\ldots)$.  Then, since $\deg(f \circ g) = de_0$, one has
$$\dege (f \circ g)   \leq (de_0,\infty,1,0,0,0,\ldots).$$
On the other hand, if $\dege (f \circ g)  < (de_0,\infty,1,0,0,0,\ldots)$, then
\begin{align*}
\dege f & = \dege((f \circ g)\circ g^{-1}) \\ &
= \dege (f \circ g) \oplus de_0(\dege g^{-1} + (-1,0,0,0,\ldots)) \\
& < (d, \infty,1,0,0,0,\ldots),
\end{align*}
which is a contradiction.   It follows that
$$\dege (f \circ g)   = (de_0,\infty,1,0,0,0,\ldots)  = \dege f \oplus d(\dege g + (-1,0,0,0,\ldots)).$$
This completes the proof.
\end{proof}

Theorems  \ref{fgie} and \ref{fgie00} combine as follows.

\begin{theorem}\label{fgieth}
Let $f$ and $g$ be real functions defined on a neighborhood of $\infty$.  Suppose that the following conditions hold.
\begin{enumerate}
\item $f$  has finite degree $d$.
\item $g$ has positive degree and is eventually positive.
\item Either $f$ has exact logexponential degree or $g$ is
eventually continuous and increasing.
\item  $g(x) \asymp  r(x) \ (x \to \infty)$ for some  $r \in \mathfrak{L}$.
\end{enumerate}
Then one has
$$\dege( f  \circ g )=  \dege f \oplus d (\dege g + (-1,0,0,0,\ldots)).$$
\end{theorem}

\begin{corollary}\label{fgie2}
Let $f$ and $g$ be real functions defined on a neighborhood of $\infty$.  Suppose that $g$ is eventually positive,    $g(x) \asymp x \ (x \to \infty)$, and either $f$ has exact logexponential degree or $g$ is eventually continuous and increasing.
Then one has
$$\dege( f  \circ g )=  \dege f.$$
\end{corollary}

\begin{proof}
Let $h = f \circ g$.
If $d \neq \pm \infty$, then by Theorem \ref{fgieth} one has
$$\dege h  = \dege f.$$
On the other hand, if $d = \pm \infty$, then $\deg h = \deg f$ and $h_{(1)} = f_{(1)} \circ g$,  by Proposition \ref{circle1}(2).
An obvious inductive argument, then, yields $$\dege_k h = \deg h_{(k)} = \deg f_{(k)} = \dege_k f$$ for all  nonnegative integers $k$.
\end{proof}

\begin{problem}
Generalize  Theorem \ref{fgieth} to the extent possible.
\end{problem}

\begin{remark}[Base independence of logexponential degree]\label{altbase}
Let $f \in \RR^{\RR_{\infty}}$, and let $b> 1$ and $d \in \RR$.  Then $$f(b^x)b^{-dx} = f(e^x)e^{-dx} \circ  (x \log b)$$
$$\max( \log_{b} |f(x)|, 0) = \frac{1}{\log b} \max( \log |f(x)|, 0)$$
$$-\frac{1}{\log_{b} |f(x)|}  = (\log b) \left(-\frac{1 }{\log |f(x)|}\right).$$
Let $b_k > 1$ for all nonnegative integers $k$.  Let $f_0 = f$, and supposing that $f_k$ is defined for some nonnegative integer $k$, let $d_k = \deg f_k$ and
$$f_{k+1}(x) =   \left.
\begin{cases}
f_{k}(b_k^x) b_k^{-d_k x}  & \text{if } d_k \neq \pm \infty \\
\max( \log_{b_k} |f_{k}(x)|, 0)  & \text{if } d_k = \infty \\
\displaystyle   -\frac{1}{\log_{b_k} |f_{k}(x)|}  & \text{if } d_k =- \infty.
\end{cases}
\right.$$
By Corollary \ref{fgie2}, Proposition \ref{aspropexoexp}(3), and induction, one has
$$ \dege_k f = d_k = \deg f_k$$
for all $k$.   This shows that $\dege$ is independent of choice of bases.   Our convention to use $b_k = e$ for all $k$  is the most natural choice for functions arising in analytic number theory.
\end{remark}

\section{Further results on degree and logexponential degree}

The following proposition can be useful for studying the logexponential degree of an arithmetic function.  (For example, it is used in the proof of Proposition \ref{lipiprop}.)

\begin{proposition}\label{arithb}
Let $f$ be a real-valued arithmetic function.   One has
$$\dege f = \dege f(\lfloor x \rfloor) = \dege f(\lceil x \rceil).$$
\end{proposition}

\begin{proof}
By Lemma \ref{reslemma}, one has
$$\dege f  \leq  \dege f(\lfloor x \rfloor)$$
$$\dege f  \leq  \dege f(\lceil x \rceil).$$
Let $r \in \mathbb{L}_{>0}$ with $f(n) = O(r(n)) \ (n \to \infty)$.  Then one has
$$f(\lfloor x \rfloor) = O(r(\lfloor x \rfloor)) \ (x \to \infty),$$  whence by Corollary \ref{fgie2} one has
$$\dege f(\lfloor x \rfloor) \leq \dege r(\lfloor x \rfloor) = \dege r(x).$$
Taking the infimum over all $r$ as chosen and applying Theorem \ref{infpropexp}, we find that
$$\dege f(\lfloor x \rfloor) \leq \dege f.$$
Similarly, one has
$$\dege f(\lceil x \rceil) \leq \dege f.$$
This completes the proof.
\end{proof}

Next, we show that all functions of finite degree in $\mathbb{L}$ are regularly varying.  This is quite useful in combination with Theorem \ref{infpropexp} and Karamata's integral theorem: for example, see the proofs of Theorem \ref{lithetapsi} in Section 9.3 and Theorem \ref{mertenssecond} in Section 10.1.

\begin{proposition}\label{kregvar}
A function $r \in \mathbb{L}$ is regularly varying if and only if it is of finite degree, and, if those equivalent conditions hold, then $r$ is regularly varying of index $$\overline{\underline{\deg}} \, r = \lim_{x \to \infty}\frac{xr'(x)}{r(x)}.$$
\end{proposition}

\begin{proof}
Let  $r \in \mathbb{L}^*$ with $\deg r \neq \pm \infty$.  Then $r$ is continuously differentiable on $[N,\infty)$ for some real number $N$.  Since $\frac{xr'(x)}{r(x)} \in \mathbb{L}$, the limit $d = \lim_{x \to \infty}\frac{xr'(x)}{r(x)}$
exists or is $\pm \infty$.  But then $d = \deg r$, so that $d \neq \pm \infty$.  Therefore, by Corollary \ref{regvarcor}, the function $r$ is regularly varying of index $d$.
\end{proof}

Next, we note the following.

\begin{proposition}\label{supprop}
Let $f \in \RR^{\RR_\infty}$ with $f$ unbounded on $X = \dom f$ at $\infty$.   Let $N \geq 0$, and suppose that $f$ is bounded  on $[N,x] \cap X$ for all $x \geq N$, and let
$$\widetilde{f}(x) = \sup_{f \in [N,x] \cap X} |f(t)|, \quad \forall x \in [N,\infty) \cap X.$$  Then $\widetilde{f}$ is nonnegative and nondecreasing on $[N,\infty) \cap X$ with $\lim_{x \to \infty} \widetilde{f}(x) = \infty$, and one has
$ \dege \widetilde{f} = \dege f $.
\end{proposition}

\begin{proof}
Since $0 \leq |f(x)| \leq \widetilde{f}(x)$ for all $x \in [N,\infty) \cap X$, one has $\dege f \leq \dege \widetilde{f}$.  To prove the reverse inequality,  let $r \in \mathbb{L}_{>0}$ with $|f(x)|  \leq r(x)$ for all  $x \in [N',\infty) \cap X$.  Since $f(x)$ is unbounded on $[N',\infty) \cap X$, the function $r$ must be eventually increasing, say,  increasing for $x \geq M \geq \max(N,N')$.  Then, for all sufficiently large $x \in [M,\infty) \cap X$, one has
\begin{align*}
\widetilde{f}(x) & = \max\left(\sup_{t \in [N,M] \cap X} |f(t)|, \sup_{t \in [M,x] \cap X}| f(t) |\right)
\\ & \leq  \max\left(\sup_{t \in [N,M] \cap X} |f(t)|, \sup_{t \in [M,x] \cap X} r(t) \right) \\
& = \max\left(\sup_{t \in [N,M] \cap X} |f(t)|, r(x) \right) \\
& = r(x).
\end{align*}
Therefore, one has $\dege \widetilde{f} \leq \dege r$.
Taking the infimum over all $r$ as chosen, we find that $\dege \widetilde{f} \leq \dege f$.  This completes the proof.
\end{proof}

The corresponding result for lower logexponential degree is as follows.

\begin{proposition}\label{suppropinf}
Let $f \in \RR^{\RR_\infty}$ with $\liminf_{x \to \infty} f(x)= 0$,  and let  $X = \dom f$.   Let $N \geq 0$, and suppose that $f$ is bounded away from $0$  on $[N,x] \cap X$ for all $x \geq N$, and let
$$\widetilde{f}(x) = \inf_{f \in [N,x] \cap X} |f(t)|, \quad \forall x \in [N,\infty) \cap X.$$  Then $\widetilde{f}$ is nonnegative and nonincreasing on $[N,\infty) \cap X$ with $\lim_{x \to \infty} \widetilde{f}(x) = 0$, and one has
$ \underline{\dege}\, \widetilde{f} = \underline{\dege}\, f $.
\end{proposition}

Regarding nondecreasing nonnegative step functions, we have the following.

\begin{proposition}\label{stepdeg}
Let $f$ be a nondecreasing nonnegative step  function on $[0,\infty)$ that is continuous from the right, and whose set of points of discontinuity  is an unbounded subset of $X = \{x_1,x_2,\ldots\}$, where the sequence $x_n$ is increasing without bound.   Let $U = f|_X$, and let $L$ be defined on $X\backslash\{x_1\}$, with $L(x_n) = f(x_n^-)$, and therefore $L(x_n)= f(x_{n-1})\leq f(x_n) = U(x_n)$, for all $n \geq 1$.    Then one has
$$\underline{\dege} \, f = \underline{\dege}\, L \leq\dege U = \dege f .$$
\end{proposition}

\begin{proof}
Since $U$ is a restriction of $f$, one has $\dege U \leq \dege f$.  Let $r \in \mathbb{L}_{>0}$ with $U(x_n) \leq r(x_n)$ for all $n$.   Since $U$ is nondecreasing,  we may suppose without loss of generality that $r$ is eventually nondecreasing.  Since $r(x)$ is nondecreasing on  $[x_n,x_{n+1})$, one has $f(x) = U(x_n) \leq r(x_n) \leq r(x)$,  for all $n \gg 0$ and all $x \in[x_n,x_{n+1})$.   It follows that $f(x) \leq r(x)$ for all $x \gg 0$, whence $\dege f \leq \dege U$, and equality holds.

Now, let $r \in \mathbb{L}_{>0}$ with $L(x_n) \geq r(x_n)$ for all $n \gg 0$.  Again, we may suppose without loss of generality  that $r$ is eventually nondecreasing.   Since $r(x)$ is nondecreasing on  $[x_{n-1},x_{n})$, one has $f(x) = L(x_n) \geq r(x_n) \geq r(x)$,  for all $n \gg 0$ and all $x \in[x_{n-1},x_{n})$.    It follows that $\underline{\dege} \, f \geq \underline{\dege}\, L$.  Finally, let $r \in \mathbb{L}_{>0}$ with $f(x) \geq r(x)$ for all $x \gg 0$.    Then, by the eventual continuity of $r$, one has $L(x_n) = f(x_n^-) \geq r(x_n)$ for all $n \gg 0$, and therefore $\underline{\dege} \, f \leq \underline{\dege}\, L$.  This completes the proof.
\end{proof}

Thus, for example, if $f$ is any nonnegative arithmetic function, then $\dege S_f = \dege S_f|_{\ZZ_{>0}}$ and $\underline{\dege} \, S_f = \underline{\dege} \, (S_f-f)$.

Finally,  we note the following.

\begin{proposition}\label{strongdegg}
Let $f$ be a real function that is Riemann integrable on $[N,x]$ for all $x>N$,  where $N  >0$ and $\deg f \in \RR\backslash\{-1\}$.   Let  $F(x) = \int_N^x f(t) \, dt$ or  $F(x) = \int_x^\infty f(t) \, dt$ on $(N,\infty)$ according to whether $\deg f > -1$ or $\deg f < -1$.   Let $s \in \RR$.
\begin{enumerate}
\item One has
$$\dege F \leq \dege f + (1,0,0,0,\ldots).$$
\item If $\deg f >-1$ and $s < \deg F$, then
$$\dege \int_N^x \frac{f(t)}{t^s} \, dt \leq \dege F + (-s,0,0,0,\ldots),$$
with equality if $\deg F > 0$.
\item If $\deg f >-1$ and $s > \deg f+1$, then
$$\dege \int_x^\infty \frac{f(t)}{t^s} \, dt \leq \dege F + (-s,0,0,0,\ldots),$$
with equality if $\deg F > 0$.
\item If $\deg f  < -1$ and $s < \deg F$, then
$$\dege \int_N^x \frac{f(t)}{t^s} \, dt = \dege F + (-s,0,0,0,\ldots).$$
\item If $\deg f  < -1$ and $s > \deg f + 1$, then
$$\dege \int_x^\infty \frac{f(t)}{t^s} \, dt = \dege F + (-s,0,0,0,\ldots).$$
\end{enumerate}
\end{proposition}

\begin{proof}
To prove (1), we suppose that $\deg f > -1$.    The proof when $\deg f < -1$ is similar.
Suppose that $f(x) = O(r(x)) \ (x \to \infty)$, where $r$ is regularly varying of index $d$ and both positive and continuous on $[N,\infty)$.  Since $d \geq \deg f >-1$,   Karamata's integral theorem implies that
$$\frac{1}{x}\int_N^x f(t)\, dt \ll \frac{1}{x} \int_N^x r(t)\, dt \asymp  r(x) \ (x \to \infty),$$
and therefore
$$\dege \int_N^x f(t)\, dt + (-1,0,0,0,\ldots) \leq \dege r.$$
Statement (1) follows by taking the infimum of $\dege r$ over all $r$ as chosen.

Suppose, now, that $\deg f > -1$ and $s < \deg F$.  Let
$$F_s(x) = \int_N^x \frac{f(t)}{t^s} \, dt.$$
By Riemann--Stieltjes integration by parts \cite[Section 1.1.3]{borg} (along with \cite[Chapter I Theorem 6a]{widd}), one has
$$F_s(x) = \frac{F(x)}{x^s} +  s \int_N^x \frac{F(t)}{t^{s+1}} \, dt.$$
Let $r$ be regularly varying of index $d$ and both positive and continuous on $[N,\infty)$.  Suppose that $F(x) \ll r(x) \ (x \to \infty)$.
Then $d-s-1 \geq \deg F-s-1 > -1$, so that, by Karamata's integral theorem, one has
$$F_s(x) \ll \frac{r(x)}{x^s} +  |s| \int_N^x \frac{r(t)}{t^{s+1}} \, dt \ll  \frac{r(x)}{x^s} \ (x \to \infty),$$
and therefore
$$\dege F_s \leq \dege r+(-s,0,0,0,\ldots).$$
Taking the infimum over all $r$ as chosen,  we see that $$\dege F_s \leq \dege F+(-s,0,0,0,\ldots).$$
Again by Riemann--Stieltjes integration by parts, one has
$$F(x)  = x^s F_s(x) -  s \int_N^x t^{s-1}F_s(x) \, dt.$$
Therefore, if $\deg F_s>-s$,  that is,  if $\deg F_s+s-1 >-1$, then,  by similar reasoning as above,  one has
$$\dege F \leq \dege F_s + (s,0,0,0,\ldots).$$  On the other hand,
$\deg F_s \leq -s$ implies  $\deg F \leq 0$.    Statement (2) follows.

Suppose, now, that $\deg f > -1$ and $s > \deg f+1$, so that $s > \deg F$.  Let
$$G_s(x) = \int_x^\infty \frac{f(t)}{t^s} \, dt.$$
By Riemann--Stieltjes integration by parts,  since  $\lim_{x \to \infty} \frac{F(x)}{x^s} = 0$,  one has
$$G_s(x) = -\frac{F(x)}{x^s} +  s \int_x^\infty \frac{F(t)}{t^{s+1}} \, dt.$$
Let $r$ be regularly varying of index $d$ and both positive and continuous on $[N,\infty)$.  Suppose that $F(x) \ll r(x) \ (x \to \infty)$, with $\deg F \leq d < s$.  Then,  by Karamata's integral theorem, one has
$$G_s(x) \ll \frac{r(x)}{x^s} +  |s| \int_N^x \frac{r(t)}{t^{s+1}} \, dt \ll  \frac{r(x)}{x^s} \ (x \to \infty),$$
and therefore
$$\dege G_s \leq \dege r+(-s,0,0,0,\ldots).$$
Taking the infimum over all $r$ as chosen,  we see that $$\dege G_s \leq \dege F+(-s,0,0,0,\ldots).$$
Again by Riemann--Stieltjes integration by parts, one has
$$F(x)  = N^sG_s(N)-x^s G_s(x) + s \int_N^x t^{s-1}G_s(x) \, dt.$$
Therefore, if $\deg G_s>-s$,  that is,  if $\deg G_s+s-1 >-1$, then,  by similar reasoning as above, one has
$$\dege F \leq \dege G_s + (s,0,0,0,\ldots).$$  On the other hand,
$\deg G_s \leq -s$ implies  $\deg F \leq 0$.    Statement (3) follows.

Suppose, now, that $\deg f < -1$ and $s< \deg F$, so that $\deg  F <0$.   Let
$$F_s(x) = \int_N^x \frac{f(t)}{t^s} \, dt.$$
By Riemann--Stieltjes integration by parts, one has
$$F_s(x) = \frac{F(N)}{N^s}-\frac{F(x)}{x^s}  - s \int_N^x \frac{F(t)}{t^{s+1}} \, dt.$$
Let $r$ be regularly varying of index $d$ and both positive and continuous on $[N,\infty)$.  Suppose that $F(x) \ll r(x) \ (x \to \infty)$.
Then $d-s \geq \deg F-s > 0$ and $d-s-1>-1$, so that
$$F_s(x) \ll \left| \frac{F(N)}{N^s} \right|+\frac{r(x)}{x^s} + |s| \int_N^x \frac{r(t)}{t^{s+1}} \, dt \ll  1+\frac{r(x)}{x^s} \ (x \to \infty)$$
and therefore
$$\dege F_s \leq \max((0,0,0,\ldots), \dege r+(-s,0,0,0,\ldots)) =  \dege r+(-s,0,0,0,\ldots).$$
Taking the infimum over all $r$ as chosen,  we see that  $$\dege F_s \leq \dege F+(-s,0,0,0,\ldots).$$
Thus, one has $\deg F_s \leq \deg F-s < -s$, so that $\deg F_s+s-1 <-1$.
Again by Riemann--Stieltjes integration by parts, one has
$$F(x)  = -x^s F_s(x) + s \int_x^\infty t^{s-1}F_s(x) \, dt.$$
Therefore, by similar reasoning as above, one has
$$\dege F \leq \dege F_s + (s,0,0,0,\ldots).$$
Statement (4) follows.

Finally, suppose that $\deg f < -1$ and $s> \deg f+1$, so that $\deg f-s <-1 $ and $\deg F  \leq \deg f+1 <s$.   Let
$$G_s(x) = \int_x^\infty \frac{f(t)}{t^s} \, dt.$$
By Riemann--Stieltjes integration by parts, since  $\lim_{x \to \infty} \frac{F(x)}{x^s} = 0$,  one has
$$G_s(x) = \frac{F(x)}{x^s} -  s \int_x^\infty \frac{F(t)}{t^{s+1}} \, dt.$$
Let $r$ be regularly varying of index $d$ and both positive and continuous on $[N,\infty)$.  Suppose that $F(x) \ll r(x) \ (x \to \infty)$,
with $\deg F \leq d < s$.
Then $d-s-1< -1$, so that
$$G_s(x) \ll \frac{r(x)}{x^s} +  |s| \int_x^\infty \frac{r(t)}{t^{s+1}} \, dt \ll  \frac{r(x)}{x^s} \ (x \to \infty).$$
It follows that $$\dege G_s \leq \dege F+(-s,0,0,0,\ldots).$$
Thus, one has $\deg G_s \leq \deg F-s < -s$, so that $\deg G_s+s-1 <-1$.
Again by Riemann--Stieltjes integration by parts,  since  $\lim_{x \to \infty} x^s G_s(x) = 0$, one  has
$$F(x)  = x^s G_s(x) + s \int_x^\infty t^{s-1}G_s(x) \, dt.$$
Therefore,  by similar reasoning as above, one has
$$\dege F \leq \dege G_s + (s,0,0,0,\ldots).$$
Statement (5) follows.   This completes the proof.
\end{proof}

\chapter{Asymptotic algebra}

In this chapter, we provide applications of asymptotic differential algebra (e.g., Hardy fields) to the study of logexponential degree, and vice versa.    Nearly all of this chapter is not used in later chapters,  the only exceptions being the definitions  in Section 7.3 of a {\it Hardian} function and of the ordered field $\mathbb{H} \supsetneq \mathbb{L}$ of all  {\it universally Hardian} functions,  along with Theorem \ref{hardintth} and Propositions \ref{hardianexactlog} and \ref{oexppropstrong}.

\section{Lattice-ordered rings}

In this  section, we generalize the various asymptotic relations studied in Section 2.1 to the setting of {\it lattice-ordered rings},  providing a modest supplement to the well-developed abstract approach  to asymptotic relations taken by asymptotic differential algebra, e.g., in [11], and by the theory of ordered exponential fields, e.g., in [161].  We describe the abstract approach to asymptotic relations, with or without differentials, as {\it asymptotic algebra}.

A {\bf partially ordered abelian group}\index{partially ordered abelian group} is an abelian group $G$ (which we write additively) equipped with a partial ordering $\leq$ on $G$ such that $a \leq a'$ and $b \leq b'$ implies $a+ b \leq a'+b'$ for all $a,a',b,b' \in G$.   A {\bf (totally) ordered  abelian group}\index{ordered abelian group} is a partially ordered abelian group $G$ such that the partial ordering on $G$ is a total ordering.   A {\bf lattice-ordered abelian group}\index{lattice-ordered abelian group} is a partially ordered abelian group $G$ such that the partial ordering on $G$ is a lattice ordering, i.e., such that the least upper bound $a \vee b$ and greatest lower bound $a \wedge b$  of $a$ and $b$ exist in $G$ for all $a, b \in G$.  Note that,  if least upper bounds exists in a partially ordered abelian group $G$, then so do greatest lower bounds, since then $a \wedge b = -((-a)\vee (-b))$ for all $a, b \in G$.   The same holds with  $\wedge$ and $\vee$ interchanged.  Less  obviously,  by \cite[Chapter XIV Theorem 2]{birkh}, a partially ordered abelian group $G$ is lattice-ordered  if and only if $a \vee 0$ exists for all $a \in G$.

Let $G$ be a lattice-ordered abelian group.   For any $a \in G$,  let $|a| = a \vee (-a)$ denote the {\bf absolute value} of $a$, and  let $a^+ = a \vee 0$ and $a^- = (-a) \vee 0 = -(a \wedge 0)$ denote the {\bf positive part} and {\bf  negative part} of $a$, respectively.  One has the following elementary result.

\begin{proposition}[{\cite[Proposition 1.3]{johnson}}]
Let $G$ be a lattice-ordered abelian group, and let $a,b,c \in G$, and let $n$ be a positive integer.  One has the following.
\begin{enumerate}
\item $a+(b  \vee c) = (a+b) \vee (a+c)$ and $a+(b  \wedge c) = (a+b) \wedge (a+c)$.
\item $a+b = (a \vee b)+(a \wedge b)$.
\item $|a+b| \leq |a|+|b|$ and $|a-b| \geq ||a|-|b||$.
\item $n(a \vee b) = (na) \vee (nb)$ and $n(a \wedge b) = (na) \wedge (nb)$.
\item $|na| =n|a|$.
\item If $na \geq 0$, then $a \geq 0$.
\item $a$ has infinite order.
\item $a = a^+-a^-$.
\item $|a| = a^++a^- \geq 0$.
\item $a^+ \wedge a^- = 0$.
\item $|a| = 0$ if and only if $a= 0$.
\end{enumerate}
\end{proposition}

All rings in this chapter are assumed commutative with identity.

A {\bf partially ordered ring}\index{partially ordered ring} is a ring $R$ equipped with a partial ordering $\leq$ on $R$ with $1 \geq 0$ such that
$R$ is a partially ordered abelian group under addition and $a,b \geq 0$ implies $ab \geq 0$
for all $a,b \in R$ (or, equivalently, $a \geq b$ implies $ac \geq bc$ for all $a,b,c \in R$ with $c \geq 0$.   A {\bf totally ordered ring}\index{totally ordered ring} (resp., {\bf lattice-ordered ring})\index{lattice-ordered ring} is a partially ordered ring whose partial ordering is a total ordering (resp.,  a lattice ordering).  Note that, if $R$ is a lattice-ordered ring, then
$$|ab| \leq |a||b|$$
for all $a,b \in R$.   If $R$ is a totally ordered ring (hence also a lattice-ordered ring), then
$$|a|= \max(a,-a),$$
$$|ab| = |a||b|,$$
$$a^2 \geq 0,$$
and $a \wedge b = 0$ implies $a = 0$ or $b = 0$, for all $a, b \in R$.   Moreover, none of these four properties need hold in a lattice-ordered ring.

The theories of  {\it lattice-ordered groups}, or {\it $\ell$-groups},  and {\it lattice-ordered  rings}, or {\it $\ell$-rings}---not necessarily abelian or commutative, respectively---are quite developed.  See [273], for example.

Let $R$ be a lattice-ordered ring containing a totally ordered subfield $k$.   Let us define the following {\bf asymptotic relations on $R$},\index{asymptotic relations} all defined relative to $k$: for all $a, b \in R$, we let
\begin{enumerate}
\item $a \preceq b$ if  $|a| \leq r|b|$ for some $r \in k_{>0}$;\index[symbols]{.e hh1@$\preceq$}
\item $a \asymp b$ if  $a \preceq b$ and $b \preceq a$;\index[symbols]{.e ee@$\asymp$}
\item $a \prec b$  if  $|a| \leq r|b|$ for all $r \in k_{>0}$;\index[symbols]{.e hh2@$\prec$}
\item $a \sim b$ if $a-b \prec b$.\index[symbols]{.e hh@$\sim$}
\end{enumerate}
Note that, although these four relations depend on the choice of $k$, different choices of $k$ can yield the same relations,  e.g., any subfield of $k = \RR$ yields the same asymptotic relations as does $\RR$ itself.   Also note that, as long as $R$ contains a field, $R$ contains a unique minimal totally ordered subfield,  necessarily isomorphic to $\QQ$.   Thus,  the four relations can be defined as long as $R$ contains a field,  and then its  minimal subfield is a natural choice for $k$.  We call the four asymptotic relations on $R$ defined with respect to  its  minimal subfield the {\bf standard asymptotic relations on $R$}.  Note that,  if $k \subseteq k'$ are totally ordered subfields of $R$, then the relations $\preceq$ and $\asymp$ with respect to $k$ are finer than those with respect to $k'$, while the relations $\prec$ and $\sim$  with respect to $k$ are coarser than those  with respect to $k'$ (because of properties of the existential and universal quantifiers, respectively).

The following proposition notes several properties of these four relations on $R$ and their relationships to one another.

\begin{proposition}\label{lor1}
Let $R$ be a lattice-ordered ring containing a totally ordered subfield $k$, and let $a,b,c \in R$.   One has the following.
\begin{enumerate}
\item $a \preceq b$ if and only if $|a| \preceq |b|$, and likewise for $\prec$ and for $\asymp$.
\item $a \preceq a$, and likewise for $\prec$ and for $\asymp$.
\item If  $a \preceq b$ and  $b \preceq c$, then  $a \preceq c$.
\item If  $a \preceq b$ and  $b \prec c$, then  $a \prec c$.
\item If  $a \prec b$ and  $b \preceq c$, then  $a \prec c$.
\item  $a \asymp b$ if and only if $b \asymp a$.
\item  $a \sim b$ if and only if $b \sim a$.
\item If  $a \prec b$ or $a \asymp b$, then  $a \preceq b$.
\item If $a \sim b$, then $a \asymp b$.
\item If  $a \sim b$ and  $b \sim c$, then  $a \sim c$.
\item $0 \prec a$.
\item $a \preceq 0$ if and only if $a \prec 0$, if and only if $a \prec a$,  if and only if $a \sim 0$,  if and only if $a = 0$.
\end{enumerate}
\end{proposition}

The following proposition relates the asymptotic relations on $R$ to the ring operations on $R$.

\begin{proposition}\label{lor2} Let $R$ be a lattice-ordered ring containing a totally ordered subfield $k$,  let $a_1, a_2, b_1, b_2, a, b \in R$, and let $r_1, r_2 \in k$.  One has the following.
\begin{enumerate}
\item $|a| \vee |b| \leq |a|+|b| \leq  2( |a| \vee |b|)$, and therefore $|a|+|b| \asymp |a| \vee |b|$.
\item If $ a_{1} \preceq b_{1} $ and $a_{2}\preceq b_{2},$ then
$ a_{1}+a_{2} \preceq |b_{1}| + |b_{2}| $ and
$a_{1}a_{2} \preceq |b_{1}||b_{2}|.$
\item If
$ a_{1} \preceq b  \text{ and }  a_{2} \preceq b$,
then  $r_1 a_1 + r_2 a_2  \preceq b.$
\item If $ a_{1} \prec b_{1} $ and $a_{2}\prec b_{2}$, then
$ a_{1}+a_{2} \prec |b_{1}| + |b_{2}| $ and
$a_{1}a_{2} \prec |b_{1}||b_{2}|.$
\item If
$ a_{1} \prec b  \text{ and }  a_{2} \prec b$,
then  $r_1 a_1 + r_2 a_2  \prec b.$
\item If $ a_{1} \prec b_{1} $ and $a_{2}\preceq b_{2}$, then
$a_{1}a_{2} \prec |b_{1}||b_{2}|.$
\item If $a_{1} \sim b_{1}$, $a_{2}\sim b_{2}$ and $|b_{1} b_{2}| = |b_{1}||b_{2}|$, then
$a_{1}a_{2} \sim b_{1}b_{2}.$
\item If $a_1 \sim b$, then $a_1 + a_2 \sim b$ if and only if $a_2 \prec b$.
\end{enumerate}
\end{proposition}

Note that, by statement (1) of the proposition, one can replace $|b_{1}| + |b_{2}| $ in statements (2) and (4) with
$|b_{1}| \vee |b_{2}|$.

Assume now an additional condition on the ring $R$,  namely, that $|ab| = |a||b|$ for all $a,b \in R$.   This holds, for example, if $R$ is totally ordered, or, more generally, if  $R$ is an {\it f-ring} [145] [273].  Then we may define an addition $[a]+[b] = [ab]$ on $\asymp$-equivalence classes $[a],[b] \in  R/{\asymp}$, as well as a partial ordering $[a]\leq [b]$ on $R/{\asymp}$, defined to hold precisely when $b \preceq a$.  Then $R/{\asymp}$ is a lattice-ordered commutative monoid with identity element $0 = [1]$, that is, $R/{\asymp}$ is a commutative monoid with identity element $[1]$ and $\leq$ is a lattice ordering on $R/{\asymp}$ such that $[a_1]\leq [b_1]$ and $[a_2]\leq [b_2]$ implies $[a_1]+[a_2]\leq [b_1]+[b_2]$ for all $a_1,a_2,b_1,b_2 \in R$.   Note that $[|a| \vee |b|] = [a] \vee [b]$ for all $a,b \in R$.   Now, let
$$v: R \longrightarrow R/{\asymp}$$
act by $$v: a \longmapsto [a].$$  Then the map $v$ is surjective and satisfies the following conditions for all $a,b \in R$.
\begin{enumerate}
\item $v(1) = 0$.
\item $v(ab)  = v(a)+v(b)$.
\item $v(a+b) \geq v(a) \wedge v(b)$.
\end{enumerate}
Indeed,  (1) and (2) are obvious, and (3) follows immediately from
$$|a+b| \leq  |a|+|b| \asymp |a| \vee |b|.$$
We denote  $[0]$ by $\infty$, since $[0]+[a]=[0]$ for all $a\in R$, and we let $\Gamma_R = (R/{\asymp}) \backslash \{\infty\}$, so that $v$ restricts to a map
$$v: R\backslash\{0\} \longrightarrow \Gamma_R.$$   Note that $R$ is an integral domain if and only if $R\backslash\{0\}$ is a submonoid of $R^\times$, if and only if $0 \neq \infty$ and $[a]+[b] =  \infty$ implies $[a]= \infty$ or $[b] = \infty$ for all $a,b \in R$, if and only if $\Gamma_R$ is a submonoid of $R/{ \asymp}$.   Moreover, if $R$ is a lattice-ordered field,  or {\bf $\ell$-field} [273], then $\Gamma_R$ is an abelian group.  Likewise,  if $R$ is totally ordered, then $\Gamma_R$ is totally ordered and $$v(a+b) \geq v(a) \wedge v(b) = \min(v(a),v(b))$$ for all $a,b \in R$.

An important special case, employed to a great extent in the next section, is where $R$ is a totally ordered field.    In that case, the map $v: R \longrightarrow R/{\asymp} \ =  \Gamma_R \cup \{\infty\}$ is a {\it valuation on $R$} and the relation $\preceq$ is a {\it dominance relation on $R$} \cite[Section 3.1]{asch}.   Let $K$ be any field.  A {\bf valuation on $K$}\index{valuation on a field} is a surjective map $v: K \longrightarrow \Gamma \cup \{\infty\}$, where $\Gamma$ is a (totally) ordered abelian group,  and where one sets $\gamma <\infty = \infty+\infty = \gamma+\infty = \infty+\gamma$ for all $\gamma \in \Gamma$,  such that $v(a) = 0$ if and only if $a = \infty$,  and such that $v(ab)  = v(a)+v(b)$ and $v(a+b) \geq \min(v(a) , v(b))$ for all $a,b \in K$.  Moreover,  the {\bf dominance relation  $\preceq$  on $K$ associated to $v$},  defined by  $a \preceq b$ if $v(a) \geq v(b)$, coincides with our asymptotic relation $\preceq$  defined earlier.  The same holds of the relations $\asymp$, $\prec$, and $\sim$ associated to $v$ as defined in \cite[Section 3.1]{asch}, where, specifically, one writes $a \asymp b$ if $a \preceq b$ and $b \preceq a$,  one writes $a \prec b$ if $a \preceq b$ and $b \not \preceq a$, and one writes $a \sim b$ if $a-b \prec b$.

A {\bf valued field}\index{valued field} is a field $K$ equipped with a valuation  $v: K \longrightarrow  \Gamma \cup \{\infty\}$.   The ordered abelian group $\Gamma_v = \Gamma$ is called the {\bf value group of $v$}. \index{value group of a valuation} Let $K$ be a valued field with valuation $v$.  The subset $$K_v = \{a \in K: v(a) \geq 0\}$$ of $K$ is a subring of $K$ such that $a \in K_v$ or $1/a \in K_v$ for all $a \in K^*$ and is called the {\bf valuation ring of $v$}. \index{valuation ring of a valuation}  It follows that the  ring $K_v$ is  an integral domain with unique  maximal ideal
$$\mm_v = \{a \in K: v(a) > 0\}.$$
It is well known that there are natural one-to-one correspondences between  the valuations on $K$ up to {\it equivalence}, the valuation rings of the valuations on $K$, the {\it valuation rings of $K$}, and the dominance relations on $K$ \cite[Section 3.1]{asch}.

To summarize, we have shown that any totally ordered field  $R$ equipped with a totally ordered subfield $k$ induces  a valuation $v: R \longrightarrow \Gamma_R \cup \{\infty\} = R/{ \asymp}$ on $R$, which is canonical for  $k \cong \QQ$.   Moreover,  the map $v$ and the asymptotic relations $\preceq$, $\asymp$, $\prec$, and $\sim$ associated to $v$ as in  \cite[Section 3.1]{asch} generalize to any lattice-ordered ring $R$ containing a distinguished totally ordered subfield $k$, and they share many of the properties as they do when $R$ is a totally ordered field, e.g., those properties expressed in Propositions \ref{lor1} and \ref{lor2}.

\section{The ring of germs of real functions at $\infty$}

If $R$ is a ring  (commutative with identity) and $X$ is a set, then we denote by $R^X = \prod_{x \in X}R$ the ring of all functions from $X$ to $R$ under   pointwise addition and multiplication.  If $R$ is a partially ordered ring, then $R^X$ is a partially ordered ring  when ordered by the relation $\leq$, where $f \leq g$ if $f(x) \leq g(x)$ for all $x \in X$.      Moreover,  if $R$ is a lattice-ordered ring, then $R^X$ is also a lattice-ordered ring, with $(f \vee g)(x) = f(x) \vee g(x)$ for  all $x \in X$, and likewise for $\wedge$.  In particular, the ring $\RR^X$ is lattice-ordered.
Also when $R = \RR$, one has $f \leq g$ if and only if $g-f = h^2$ for some $h \in \RR^X$.
We extend any function $f \in \RR^{\RR_\infty}$ to a function on $\RR$ by defining it to be $0$ at all $x \in \RR\backslash \dom f$.    Thus we have a natural surjection  $ \RR^{\RR_\infty} \longrightarrow \RR^{\RR} = \prod_{x \in \RR} \RR$.

The  ring $\mathcal{R}\index[symbols]{.i  ka@$\mathcal{R}$}$ of germs at $\infty$ of all functions in $\RR^\RR$, that is, the ring $\mathcal{R} = \RR^{\RR}/{ =_\infty}$, is a lattice-ordered ring under the relation $\leq \ = \ \leq_{\infty}$.     Another way to construct $\mathcal{R}$ is as the quotient ring $(\RR^{\RR})_\infty  = \RR^{\RR}/(0)_\infty$ by the (radical) ideal $(0)_\infty$ in $\RR^\RR$ of all functions  that vanish on a  neighborhood of $\infty$.    Note that $f \leq g$ in $\mathcal{R}$ if and only if $g-f = h^2$ for some $h \in \mathcal{R}$.    The group of units $\mathcal{R}^*$ of the ring $\mathcal{R}$ is equal to the set of all germs of functions that are eventually nonzero, and it contains $\mathcal{R}_{>0}$ and $\mathcal{R}_{>0} \cup \mathcal{R}_{<0} \cong \mathcal{R}_{>0} \oplus \{1,-1\}$ as proper subgroups.   Moreover, the monoid of nonzerodivisors of $\mathcal{R}$ is equal to $\mathcal{R}^*$, that is, $\mathcal{R}$ is a total quotient ring.

A (commutative) ring $R$ is {\bf von Neumann regular}\index{von Neumann regular ring}  if $I^2 = I$ for all principal ideals (or equivalently, all ideals) $I$ of $R$ [105].   A ring $R$ is von Neumann regular  if and only if  $R$ is a reduced total quotient ring in which every prime ideal is maximal.   The von Neumann regular rings are a natural generalization of the fields to rings with zerodivisors, since, for example,  a field is equivalently a von Neumann regular ring that is an integral domain.  The class of  von Neumann regular rings is closed under arbitrary direct products and quotient rings.   Thus, the rings $\RR^\RR$ and $\mathcal{R}$ are von Neumann regular.

The absolute value on the lattice-ordered ring $\mathcal{R}$, as described in the previous section, coincides with the usual absolute value on $\mathcal{R}$ and therefore satisfies $|fg| = |f||g|$ for all $f,g \in \mathcal{R}$.   Moreover, since  $\mathcal{R}$ is a lattice-ordered ring containing the totally ordered field $\RR$,  the results of the previous section yield (standard) asymptotic relations $\preceq$,  $\asymp$,  $\prec$, and $\sim$ on $\mathcal{R}$, and it  is clear that these relations coincide with the usual  $O$, $\asymp$, $o$, and $\sim$ relations on $\mathcal{R}$.     In other words,  for all $f, g \in \mathcal{R}$,  one has $f \preceq g$ if and only if  $f(x) = O(g(x)) \ (x \to \infty)$,  and so on.
(Note that, on $\RR^X$, the former asymptotic relations must hold globally,  e.g.,  one has $f \preceq g$ in $\RR^X$ if and only if there exists an $M \in \RR_{>0}$ such that $|f(x)| \leq M |g(x)|$ for all $x \in X$.  Unfortunately,  then, one has $f \prec g$ in $\RR^X$ if and only if $f = 0$.)  Consequently,  from Propositions \ref{lor1} and \ref{lor2}, we deduce many of the the well-known properties of the asymptotic relations $O$, $\asymp$, $o$, and $\sim$ on $\mathcal{R}$  stated in Section 2.1.   Moreover, if $g \in \mathcal{R}^*$, that is, if $g$ is eventually nonzero, then $f \preceq g$ is equivalent to  $\limsup_{x \to \infty} \frac{|f(x)|}{|g(x)|} < \infty$,  while $f \prec g$ is equivalent to  $\lim_{x \to \infty} \frac{|f(x)|}{|g(x)|} = 0$ and $f \sim g$ is equivalent to  $\lim_{x \to \infty} \frac{|f(x)|}{|g(x)|} = 1$.  Likewise, if $f \in \mathcal{R}^*$, then $f \preceq g$ is equivalent to  $\liminf_{x \to \infty} \frac{|g(x)|}{|f(x)|} > 0$, and $f \prec g$  is equivalent to $\lim_{x \to \infty} \frac{|g(x)|}{|f(x)|} = \infty$.    If $R$ is any subring of $\mathcal{R}$,  then we let $\preceq$,  $\asymp$,  $\prec$ and $\sim$ denote the relations on $\mathcal{R}$ restricted to $R$.

Now, one has $e^f \in \mathcal{R}_{>0}$ if $f \in \mathcal{R}$, and $\log f \in \mathcal{R}$ if $f \in \mathcal{R}_{>0}$, and $e^f \leq e^g$ if and only if $f \leq g$, while also $e^{f+g} = e^f e^g$, for all $f, g \in \mathcal{R}$.   Thus,  the map  $$\exp \circ -: \mathcal{R}^+ \longrightarrow \mathcal{R}_{>0}$$ acting by  $f \longmapsto e^f$ is an order isomorphism from the additive partially ordered group $\mathcal{R}^+$ of $\mathcal{R}$ onto the multiplicative partially ordered group $\mathcal{R}_{>0}$, with inverse acting by $f \longmapsto \log f$.

If $R$ is a partially ordered  ring,  then an {\bf exponential on $R$}\index{exponential on a partially ordered ring} is an  isomorphism $E$  from the partially ordered  additive group $R^+$ onto the partially ordered group $R^* \cap R_{>0}$.    This condition means that $E$ is a group isomorphism and both $E$ and its inverse $E^{-1}$ are increasing.   Let us say that a {\bf (partially) ordered exponential ring}\index{ordered exponential ring} is a partially ordered ring $R$ equipped with an exponential on $R$.   Thus, the pair $(\mathcal{R}, \exp \circ -)$ is an exponential ring.    Note that, if $R$ is a partially ordered field, then $R^* \cap R_{>0} = R_{>0}$.   A {\bf (totally) ordered exponential field}\index{ordered exponential field}  is an ordered exponential ring that is a totally ordered field, that is, it is a totally ordered field $K$ equipped with an exponential $K \longrightarrow K_{>0}$ on $K$ \cite[p.\ 22]{kuhl}.

Let $(R,E)$ be an ordered exponential ring.  Then $f^\wedge a := E(aE^{-1}(f))$ behaves much like ``$f^a$'' for all $a \in R$ and all $f \in R^* \cap R_{>0}$  in that it satisfies the obvious laws of exponents:  for all $f,g \in R^* \cap R_{>0}$ and all $a,b \in R$, one has the following.
\begin{enumerate}
\item  $f^\wedge a \in R^* \cap R_{>0}$.
\item $f^\wedge 0 =1$.
\item $1^\wedge a = 1$.
\item $f^\wedge(a+b) = (f^\wedge a)(f^\wedge b)$.
\item $f^\wedge (ab) = (f^\wedge a)^\wedge b$.
\item $(fg)^\wedge a = (f^\wedge a)( g^\wedge a)$.
\item $f^\wedge a  = f^a$ if $a \in \ZZ$.
\item $(f^a)^\wedge b = f^{\wedge}  (ab)= (f^{\wedge}b )^a$ if $a \in \ZZ$.
\item If $a < b$,  then $f^\wedge a < f^\wedge b$ if $f >1$ and $f^\wedge a >  f^\wedge b$ if $f < 1$.
\item If $f <g$, then $f^\wedge a < g^\wedge a$ if $a > 0$, and $f^\wedge a > g^\wedge a$ if $a < 0$.
\end{enumerate}
It follows that, for any fixed $g \in R^* \cap R_{>0}$, the map $g^\wedge- = E( E^{-1}(g) \cdot -)$ acting by $a \longmapsto g^\wedge a$ is an exponential on $R$ with $1 \longmapsto g$.  If $F: R \longrightarrow R^* \cap R_{>0}$ is another exponential on $R$, then $$(E^{-1}\circ F)(r+s) = E^{-1}(F(r)F(s)) =  (E^{-1}\circ F)(r)+(E^{-1}\circ F)(s)$$ for all $r,s \in R$,  and therefore $E^{-1}\circ F$ is an automorphism of the ordered additive group $R^+$ of $R$.  Conversely,  if $\phi$ is any automorphism of  the ordered group $R^+$, then  $E \circ \phi$ is an exponential on $R$.  Thus,  if a partially ordered ring $R$ admits an exponential, then the set of all exponentials on $R$ is a group,  isomorphic to the group of all automorphisms of the ordered group $R^+$, and it contains (a group isomorphic to) the group $R^* \cap R_{>0} \cong R^+$ as a  subgroup, since dilation $x \longmapsto rx$ is an automorphism of the ordered group $R^+$ for some $r \in R$ if and only if $r \in R^* \cap R_{>0}$.  In particular, if $E$ is an exponential on $R$, then $E \circ (r\cdot -)$ is an exponential on $R$ for all $r \in R^* \cap R_{>0}$.

For the  ordered exponential ring $(\mathcal{R}, \exp \circ -)$,  one has $f^\wedge a = e^{a \log f} = f^a$ for all $f \in \mathcal{R}$ and all $a \in \mathcal{R}_{>0}$.   Thus,  applying the remarks in the previous paragraph to $g = \id$, and to $r = \log$, we see in two distinct ways that the map
$$E_- = \id^- = \exp \circ (\log \cdot -): \mathcal{R}^+ \longrightarrow \mathcal{R}_{>0}$$ acting by  $$f(x) \longmapsto E_f(x) = x^{f(x)} = e^{(\log x)f(x)}$$ is a ``base independent'' exponential on $\mathcal{R}$,  with  inverse $$L_- = (E_-)^{-1} = \frac{\log \circ -}{\log}: \mathcal{R}_{>0} \longrightarrow \mathcal{R}^+,$$ which is also base independent,  acting by
$$L_-: f(x) \longmapsto L_f(x) =  \frac{\log f(x)}{\log x}.$$

We extend $\mathcal{R}$ to the set $\mathcal{R}_{\pm \infty}$ of germs of  all functions from $\RR$ to $\overline{\RR}$,  and we extend the map $L_-$ to a map $\mathcal{R}_{\geq 0} \longrightarrow \mathcal{R}_{\pm \infty}$ by setting $L_f(x) = -\infty$ if $f(x) = 0$.  Note that  $\limsup$ and $\liminf$ define maps
$$\limsup_{x \to \infty}: \mathcal{R}_{\pm \infty} \longrightarrow \overline{\RR}$$
$$\liminf_{x \to \infty}: \mathcal{R}_{\pm \infty} \longrightarrow \overline{\RR},$$
and the (upper) degree $\deg$ and lower degree $\underline{\deg}$ maps on $\mathcal{R}$ are given respectively by
the composition
$$\mathcal{R} \overset{|-|}{\longrightarrow} \mathcal{R}_{\geq 0} \overset{L_-}{\longrightarrow} \mathcal{R}_{\pm \infty} \overset{\underset{x \to \infty}{\limsup}}{\longrightarrow} \overline{\RR}$$
$$\mathcal{R} \overset{|-|}{\longrightarrow} \mathcal{R}_{\geq 0} \overset{L_-}{\longrightarrow} \mathcal{R}_{\pm \infty} \overset{\underset{x \to \infty}{\liminf}}{\longrightarrow} \overline{\RR}.$$
This is our entry point into understanding the degree map from a ``universal'' perspective,  a topic that is taken up further in Section 7.4.

\section{Real asymptotic differential algebra: Hardy rings and Hardy fields}

Let $\mathcal{C}$\index[symbols]{.i  kaa@$\mathcal{C}$} be the subring of $\mathcal{R}$ consisting of the germs of continuous functions.
The group of units $\mathcal{C}^*$ of  the ring $\mathcal{C}$ is the group of all functions in $\mathcal{C}$ that are eventually positive or eventually negative, that is, that are comparable to $0$, and thus $\mathcal{C}^* = \mathcal{C}_{>0} \cup \mathcal{C}_{<0}$.

\begin{proposition}[{\cite[Section 2]{bos}}]
Let $R$ be a subring of $\mathcal{C}$ containing $\RR$.   The following conditions are equivalent.
\begin{enumerate}
\item $R$ is contained in some subfield of $\mathcal{C}$.
\item $R$ is an integral domain.
\item $R$ is contained in $\mathcal{C}^* \cup \{0\}$.
\item $R$ is contained in $\mathcal{C}_{>0} \cup \mathcal{C}_{<0} \cup \{0\}$.
\item $R$ is totally ordered with respect to the relation $\leq$ on $\mathcal{C}$.
\end{enumerate}
Suppose that these conditions hold.  Then the quotient field of $R$ is the smallest subfield of $\mathcal{C}$ containing $R$.   Suppose also that $R$ contains $\RR$.   Then, for all $f \in R$, the ring  $\RR(f)$ is the quotient field of $\RR[f]$ and is the smallest subfield of $R$ containing $\RR$ and $f$.    Moreover,  an $f \in \mathcal{C}$ belongs to some subfield of $\mathcal{C}$ if and only if $f$ is $\leq$-comparable to all $c \in \RR$, if and only if $\RR[f]$ is totally ordered by $\leq$.
\end{proposition}

\begin{corollary}
Let $K$ be a subfield of $\mathcal{C}$.   Then $$K\backslash\{0\} = K^* \subseteq  \mathcal{C}^* = \mathcal{C}_{>0} \cup \mathcal{C}_{<0}.$$
Thus, every function in $K$ is (eventually) positive,  (eventually) negative, or (eventually) $0$, whence $K$ is a totally ordered field under the ordering $\leq \ = \  \leq_\infty$.
\end{corollary}

For any nonnegative integer $n$, let $\mathcal{C}^{(n)}$ denote the ring of germs of functions from $\RR$ to $\RR$ that are $n$-times  continuously differentiable on a neighborhood of $\infty$, and let $\mathcal{D} = \mathcal{C}^{(\infty)} =  \bigcap_{n = 1}^\infty \mathcal{C}^{(n)}\index[symbols]{.i  kb@$\mathcal{D}$}$.  The group of units of $\mathcal{D}$  is given by $\mathcal{D}^* = \mathcal{D}_{>0} \cup \mathcal{D}_{<0}$.   Note that a function in $\mathcal{D}$ need not be infinitely differentiable on a neighborhood of $\infty$.   Equivalently,  one has $\mathcal{D} = \mathcal{C}^{(\infty)} \supsetneq \mathcal{C}^\infty$, where $\mathcal{C}^\infty$ is the ring of germs of all infinitely differentiable functions on $\RR$.  Differentiation $D = \frac{d}{dx} = (-)'$ is a {\it derivation} $D: \mathcal{D} \longrightarrow \mathcal{D}$ on $\mathcal{D}$ and makes the ring $\mathcal{D}$ into a {\it differential $\RR$-algebra}.     ({\it Differential algebra},  introduced by J.\ Ritt in 1950, is the study of differential rings and their  applications to the algebraic study of differential equations.)   Let us say that a {\bf Hardy ring}\index{Hardy ring} is a subring of $\mathcal{D}$ that is closed under differentiation.  In other words, a Hardy ring is a subring $R$ of $\mathcal{D}$ such that $D(R) \subseteq R$,  i.e., such that $f' \in R$ for  all $f \in R$.  Thus, $\mathcal{D}$ is the largest Hardy ring, and $\mathcal{C}^\infty$ is also a Hardy ring.   Two obvious classes of examples of Hardy rings are $C$ and $C[x] \cong C[X]$ (generated as a subring of $\mathcal{D}$),  where $C$ is any subring of $\RR$ and  where $x = \id$ is the identity function.   Every Hardy ring $R$ is a {\it differential $C_R$-algebra}, where $C_R = \ker D|_R$ is the subring $C_R = R \cap \RR$ of $\RR$ of all constants in $R$.    Note that the intersection of a collection of Hardy rings is a Hardy ring, and therefore every subring of $\mathcal{D}$ is contained in a smallest Hardy ring.  For convenience,  hereafter we assume that all  subrings $R$ of $\mathcal{R}$ contain $\RR$,  or, equivalently,  have ring of constants $R \cap \RR = \RR$.

A {\bf Hardy  field}\index{Hardy field} is a Hardy ring that is a field.   Equivalently, a Hardy field is a subfield $K$ of $\mathcal{D}$ containing $\RR$ such that $f' \in K$ for all $f \in K$.    Since every subfield of $\mathcal{C}$ is a totally ordered field ordered by $\leq$,  so is every Hardy field.   Examples of Hardy fields include the ordered fields $$\RR \subsetneq \RR(x) \subsetneq \RR(x^a: a \in \RR) \subsetneq  \RR(\mathfrak{L})\subsetneq \mathbb{L}$$ employed in Chapter 6.    Note that,  if $G$ is any subgroup of $\RR$ containing $\ZZ$,  then $\RR(x^a: r \in G) \cong \RR(G)$ is a Hardy field containing $\RR(x)$, and, if $G'$ is another such group, distinct from $G$, then $\RR(x^a: r \in G) \neq \RR(x^a: r \in G')$.

Let $K$ be a Hardy field.    If $f \in K$, then $f' \in K$, so that $f'$ is (eventually) positive, negative, or $0$,  so that $f$ is (eventually) (strictly) increasing,  (strictly) decreasing, or constant.   It follows that $f \preceq g$ is equivalent to $g \not \prec f$, as long as $f \neq 0$.   Indeed, if $g \neq 0$,  so that $f/g \in K$, then $f  \preceq g$ is equivalent to
$\lim_{x \to \infty} \frac{f(x)}{g(x)} \in \RR$,  while $f \asymp g$ is equivalent to $\lim_{x \to \infty} \frac{f(x)}{g(x)} \in \RR^*$, and $f \prec g$ is equivalent to $\lim_{x \to \infty} \frac{f(x)}{g(x)} = 0$.
Since any subfield $K$ of $\mathcal{C}$ is totally ordered with totally ordered subfield $\QQ$,  any such field $K$ is equipped with a natural valuation on $K$, as described in the previous section: the set $K^*/{\asymp}$ of all $\asymp$-equivalence classes $[f]$ of germs $f \in K^*$  is a totally ordered abelian group $\Gamma_K\index[symbols]{.i  kg@$\Gamma_K$}$ under the ordering $\leq$ on $\asymp$-equivalence classes $[f]$, where $[f] \leq [g]$  if $g \preceq f$, and the map $v: K \longrightarrow  \Gamma_K \cup \{\infty\}$ acting by $f \longmapsto v(f) = [f]$, where $0 \longmapsto \infty$, is a valuation on the field $K$.  The valuation ring $$\mathcal{O}_K = K_v =  \{f \in K: v(f) \geq 0\} = \{f \in K: f \preceq 1\}\index[symbols]{.i  kh@$\mathcal{O}_K$}$$ of the valued field $K$ is the ring of all bounded functions $f$ in $K$,  or, equivalently, all functions $f$ in $K$ such that $\lim_{x \to \infty} f(x) \in \RR$.    The unique maximal ideal $\mm_K$ of the valuation ring $\mathcal{O}_K$ is the ideal
$$\mm_K = \mm_v =  \{f \in K: v(f) > 0\} = \{f \in K: f \prec 1\}\index[symbols]{.i  ki@$\mm_K$}$$
of all functions $f$ in $K$ with  $\lim_{x \to \infty} f(x) = 0$.  Thus, one has a canonical isomorphism
$$\mathcal{O}_K \cong \RR\oplus \mm_K$$
of abelian groups,   and the map to the residue field $\mathcal{O}_K/\mm_K$ is the projection
$$\lim_{x \to \infty} : \mathcal{O}_K \longrightarrow \RR \cong \mathcal{O}_K/\mm_K$$
onto $\RR$, which has a section given by the inclusion $ \RR\longrightarrow \mathcal{O}_K$, and which extends to the map
$$\lim_{x \to \infty} : K \longrightarrow \overline{\RR}$$
with $\mathcal{O}_K$ equal to the preimage of $\RR \subsetneq \overline{\RR}$.
Moreover, the group of units of the valuation domain $\mathcal{O}_K$ is the group
$$\mathcal{O}_K^* = \mathcal{O}_K\backslash \mm_K =  \{f \in K: v(f) =  0\} = \{f \in K: f \asymp 1\}$$
of all functions $f$ in $K$ with $\lim_{x \to \infty} f(x) \in \RR^*$.  Note, then, that $v(f)= v(g)$ if and only if $f/g \in \mathcal{O}_K^*$, if and only if $(f) = (g)$ as principal fractional ideals in $\mathcal{O}_K$.  Thus, $\Gamma_K$ is order-isomorphic to the group of all nonzero principal fractional ideals of $\mathcal{O}_K$ ordered by $\supseteq$.   It follows that, as groups, one has $\Gamma_K \cong K^*/\mathcal{O}_K^*$.  Moreover, the set $K_{>0}$ of all positive elements of $K$ is a subgroup of $K^*$, and one has $K^* \cong K_{>0} \oplus \{1,-1\}$.

We say that a  subring $R$ of $\mathcal{R}$ is {\bf logexponentially closed}\index{logexponentially closed} if $e^f \in R$ for all $f \in R$ and and $\log |f| \in R$ for all $f \in R^*$, that is, if the exponential $\exp \circ -$ on $\mathcal{R}$ restricts/corestricts to an exponential on $R$.   If  a  subring $R$ of $\mathcal{R}$ is  logexponentially closed, then $R$ inherits from $\mathcal{R}$ the structure of an ordered exponential ring $(R,  \exp \circ ( a \cdot -))$ for any $a \in R$.   In this case,  $R$ also has the structure of a ``base independent''  ordered exponential ring with exponential $E_- = \id^- =  \exp\circ (\log \cdot -)$ if and only if  $R \supseteq \RR(x)$,  i.e., if and only if $\id \in R$.     Note that the  Hardy field $\mathbb{L}$ of all logarithmico-exponential functions is the smallest logexponentially closed subfield of $\mathcal{R}$ containing $\RR(x)$.     Similarly, the Hardy field $\RR(\mathfrak{L})$ is the smallest subfield $K$ of $\mathcal{R}$ containing $\RR(x^a : a \in \RR)$ such that $f \circ \log \in K$ for all $f \in K$, and the Hardy field $\RR(x^a : a \in \RR)$ is the smallest subfield $K$ of $\mathcal{R}$ containing $\RR(x)$ such that $f \circ x^a \in K$ for all $f \in K$ and all $a>0$.

The largest Hardy ring $\mathcal{D}$ has several nice closure properties: it is  closed under differentiation,   closed under antidifferentiation,  and logexponentially closed. The rings $\mathcal{R}$ and $\mathcal{C}$ are also logexponentially closed, and $\mathcal{C}$ is also closed under antidifferentiation.   The operation $$\operatorname{Dlog}: \mathcal{D}^* \longrightarrow \mathcal{D}^+\index[symbols]{.i  ke@$\operatorname{Dlog}$}$$
of {\bf logarithmic differentiation},\index{logarithmic differentiation} acting by $$\operatorname{Dlog}: f \longmapsto \frac{f'}{f} = (\log |f|)',$$ is a group homomorphism.   If $R$ is a Hardy ring,  then $\operatorname{Dlog}$ restricts to a group homomorphism  $R^* \longrightarrow R^+$.

Since the intersection of a collection of Hardy subfields of a Hardy field is a Hardy field, every subset of a Hardy field $K$ is contained in a smallest Hardy subfield of $K$.   However, if $K$ and $L$ are Hardy fields, then there need not be a Hardy field containing both $K$ and $L$.    A {\bf maximal Hardy field}\index{maximal Hardy field} is a Hardy field that is not a proper subfield of any other Hardy field.  By Zorn's lemma, every Hardy field is contained in a maximal Hardy field.  The intersection $\mathbb{H}\index[symbols]{.i  kc@$\mathbb{H}$}$ of all maximal Hardy fields is a Hardy field (denoted by $E$ in [35]).   As we show later,  one has $\mathbb{L} \subsetneq \mathbb{H}$.   If $K$ is a Hardy field,  then,  following [35], we let $\operatorname{E}(K)\index[symbols]{.i  kca@$\operatorname{E}(K)$}$ denote the intersection of all maximal Hardy fields containing $K$.  A Hardy field $K$ is {\bf perfect}\index{perfect Hardy field} if it is the intersection of some collection of maximal Hardy fields, or, equivalently, if $\operatorname{E}(K) = K$ [36].  Thus, $\mathbb{H} = \operatorname{E}(\RR)$ is the smallest perfect Hardy field.  Moreover, if $K$ is a Hardy field, then $\operatorname{E}(K)$ is the smallest perfect Hardy field containing $K$.

A function $f \in \mathcal{D}$ is {\bf Hardian}\index{Hardian function} if there exists a Hardy field containing $f$.
If $R$ is a Hardy ring and $f \in \mathcal{D}$, then the $R$-subalgebra $R[f,f',f'',\ldots]$ of $\mathcal{D}$ generated by $f$ and all of its derivatives is the smallest Hardy ring  containing $f$, and there is a unique (surjective) ring homomorphism $$D_{f,R}: R[X_0,X_1,X_2,\ldots] \longrightarrow R[f,f',f'',\ldots]\index[symbols]{.i  ki1@$D_{f,R}$}$$ sending $X_n$ to $f^{(n)}$ for all $n$.   If $K$ is a Hardy field, then a (Hardian) function $f \in \mathcal{D}$ is {\bf Hardy adjoinable to $K$}\index{Hardy adjoinable} if there exists a Hardy field containing both $K$ and $f$.    Thus, $f \in \mathcal{D}$ is Hardian if and only if $f$ is Hardy adjoinable to $\RR$, if and only if $f$ is Hardy adjoinable to the Hardy field $\mathbb{H}$.   If $f$ is Hardy adjoinable to a Hardy field $K$, then there is a smallest Hardy field containing $K$ and $f$, denoted $K\{f\}$.
The following result is clear.

\begin{proposition}[{[35]}]
Let $f \in \mathcal{D}$, and let $K$ be a Hardy field.  The following conditions are equivalent.
\begin{enumerate}
\item $f$ is Hardy adjoinable to $K$.
\item The image of the map $D_{f,K}$ is contained in $\mathcal{D}^* \cup \{0\}$.
\item For all $p(X_0, X_1,X_2,\ldots) \in K[X_0,X_1,X_2,\ldots]$, the function $p(f,f',f'',\ldots)$ is either eventually positive, eventually negative, or eventually $0$, i.e.,  $p(f,f',f'',\ldots)$ lies in $\mathcal{D}^* \cup \{0\}$.
\item The ring $K[f,f',f'',\ldots]$ is an integral domain.
\item The kernel $D_{f,K}^{-1}(0)$ of $D_{f,K}$ is prime, as an ideal of $K[X_0,X_1,X_2,\ldots]$.
\end{enumerate}
When these conditions hold,  one has
\begin{align*}
K\{f\}  & = K(f,f',f'',\ldots) \\
& = \{p(f,f',f'',\ldots)/q(f,f',f'',\ldots): p,q \in K[X_0,X_1,X_2,\ldots], \, q(f,f',f'',\ldots) \neq 0\}
\end{align*}
where $K(f,f',f'',\ldots) $ (generated as a subfield of $ \mathcal{D}$) is the quotient field of the integral domain  $K[f,f',f'',\ldots]$, and it is isomorphic to the quotient field of $K[X_0,X_1,X_2,\ldots]/D_{f,K}^{-1}(0)$, i.e., the residue field of the domain $K[X_0,X_1,X_2,\ldots]$ at the prime ideal $D_{f,K}^{-1}(0)$.
\end{proposition}

We say that a subset $S$ of $ \mathcal{D}$  is {\bf Hardy adjoinable to $K$}\index{Hardy adjoinable} if   there exists a Hardy field containing both $K$ and $S$, and we let $K\{S\}\index[symbols]{.i  kl@$K\{S\}$}$ denote the smallest Hardy field containing $K$ and $S$.   If $K$ and $L$ are Hardy fields, then $L$ is Hardy adjoinable to $K$ if and only if $K$ is Hardy adjoinable to $L$, and when both conditions hold one has $K\{L\} = L\{K\}$.

\begin{example}  Let $K$ be a Hardy field.   Since $x$, $\exp x$, and  $\log x$ are in $\mathbb{H}$,  the set  $\{x, \exp x, \log x\}$ is Hardy adjoinable to $K$, and one has $K\{x\} = K(x)$, $K\{\exp x\} = K(\exp x)$,  $K\{\log x \} = K(x,\log x)$, and $$K\{\exp x, \log x\} = (K\{\exp x\})\{\log x\} = (K(\exp x))\{\log x\} = K(\exp x,x,\log x).$$
\end{example}

As we have noted, the Hardy field $\mathbb{H}$ is equal to the set of all functions in $ \mathcal{D}$ that are Hardy adjoinable to every Hardy field.   Thus, we call elements of $\mathbb{H}$ {\bf universally Hardian}, \index{universally Hardian function} and  $\mathbb{H}$ is the Hardy field of all universally Hardian functions (or, rather, germs at $\infty$).       If $K$ is any Hardy field, then an obvious transfinite inductive argument shows that $\mathbb{H}$ is Hardy-ajoinable to $K$, and therefore $K$ is Hardy adjoinable to $\mathbb{H}$.   Thus, every Hardy field is Hardy adjoinable to $\mathbb{H}$.  (Indeed, if $K$ is a Hardy field, then $K$ is contained in some maximal Hardy field $M$, and then $M$ contains both $K$ and $\mathbb{H}$.) Moreover,  $\mathbb{H}$ is the largest Hardy field with this property:  if $K$ is a Hardy field such that every Hardy field is Hardy adjoinable to $K$,  then $K$ is Hardy adjoinable to every Hardy field, so that all elements of $K$ are Hardy adjoinable to every Hardy field,  and thus $K \subseteq \mathbb{H}$.  Thus,  the Hardy field $ \mathbb{H}$ has the universal property that it is the largest Hardy field $K$ such that every Hardy field is Hardy adjoinable to $K$.  Equivalently,  the Hardy field $ \mathbb{H}$ is the largest Hardy field that is Hardy adjoinable to every Hardy field.  Thus, we call $ \mathbb{H}$ the {\bf universally Hardy adjoinable Hardy field}.\index{universally Hardy adjoinable Hardy field $\mathbb{H}$}

Maximal Hardy fields are precisely the Hardy fields $M$ such that $f \in M$ for all Hardian $f \in \mathcal{D}$ that are Hardy adjoinable to $M$.   Moreover, for any Hardy field $K$, the intersection $\operatorname{E}(K)$ of all maximal Hardy fields containing $K$ is equal to the set of all $f \in \mathcal{D}$ that are Hardy adjoinable to every Hardy field containing $K$.

Let $K$ be a subfield of $\mathcal{D}$.  The algebraic closure $K^o\index[symbols]{.i  kn@$K^o$}$ of $K$ in $\mathcal{D}$ is a {\it real closed} subfield of $\mathcal{D}$,  and in fact it is isomorphic to the {\it real closure of $K$},
and one has $(K^o)^o = K^o$.   Thus, $K$ is real closed if and only if $K^o = K$.  Moreover, if $K$ is a Hardy field,  then $K^o$ is a  (real closed) Hardy field.   It follows that $K$ is real closed if $K$ is a perfect Hardy field.  For proofs of these facts, see \cite[Section 3]{bos}.

\begin{theorem}[{\cite[Theorem 2]{rosenl}}]\label{rosenl}
Let $K$ be a Hardy field,  let $p(X),q(X) \in K[X]$,  and let $y$ be the (germ of) an eventually differentiable function such that $q(y)$ is eventually nonzero and such that $y' = p(y)/q(y)$ on some neighborhood of $\infty$.   Then $K(y)$ is a Hardy field.  Thus, $y$ is Hardy adjoinable to $K$ and $K\{y\} = K(y)$.  Consequently,  for all $f \in K$, one has the following.
\begin{enumerate}
\item $K(e^f)$ is a Hardy field, since $y = e^f$ satisfies $y' = fy$.
\item $K(\log |f|)$ is a Hardy field if $f \neq 0$, since $y = \log |f|$ satisfies $y' = f'/f$ and $f'/f \in K$.
\item $K(\int f(x) \, dx)$ is a Hardy field for any eventual antiderivative $y = \int f(x) \, dx$ of $f$, since $y$ satisfies $y' = f$.
\end{enumerate}
\end{theorem}

\begin{corollary}\label{Hsim}
Let $K$ be a perfect Hardy field.  Let $p(X),q(X) \in K[X]$,  and let $y$ be the (germ of) an eventually differentiable function such that $q(y)$ is eventually nonzero and such that $y' = p(y)/q(y)$ on some neighborhood of $\infty$.   Then $y \in K$.  Thus,  if $f \in \mathcal{D}$ is Hardian (resp.,  lies in $K$),  then $e^f$, any eventual antiderivative of $f$, and $\log |f|$ if $f$ is eventually nonzero,  are also Hardian (resp., lie in $K$).
\end{corollary}

\begin{corollary}
Any Hardy field  is contained in some logexponentially closed Hardy field.
\end{corollary}

Note that, if $f \in \mathcal{D}$ is Hardian and unbounded, then the compositional inverse  $f^{-1} \in \mathcal{D}$ of $f$ exists and is also Hardian \cite[Corollary 6.5]{bos}.

\begin{example}
Let $W$ denote the Lambert $W$ function.   One has
$$W'(x) =  \frac{W(x)}{x(1+W(x))}, \quad \forall x \in (-1/e,0)\cup(0,\infty).$$
It follows that $W \in \RR\{W(x)\} = \RR(x,W(x)) \subseteq \mathbb{H}$, and thus $e^{x/W(x)} \in \mathbb{H}$.   The function $e^{x/W(x)}$ is the compositional inverse of $\log x \log \log x \in \mathfrak{L}$.   It is known (and originally conjectured by Hardy in [118]) that there is no $f \in \mathbb{L}$ such that $f (x) \sim e^{x/W(x)}$  [67] \cite[Theorem 6.49]{kuhl}.  However, one has
$$e^{x/\log x} \prec e^{x/W(x)} \prec (e^{x/\log x})^a$$
for all $a > 1$, and thus $\dege e^{x/W(x)} = \dege e^{x/\log x} = (\infty,1,-1,0,0,0,\ldots)$.  Note also that $W^{-1}(x) = xe^x$ is  in $\RR(x,\exp x)$.  Moreover,  one has $\int_0^x W(t) \, dt = x\left(W(x)-1 + \frac{1}{W(x)}\right)$, so any Hardy field containing $W(x)$ contains $x$ and $\int_0^x W(t) \, dt$.  In fact, any subfield of $\mathcal{D}$ containing $x$ and $W(x)$ contains the $n$-fold derivative and every $n$-fold antiderivative of $W(x)$ for all $n$, since these lie in $\RR(x,W(x))$.
\end{example}

\begin{remark}[The asymptotic equivalence class of $\log$]
Let $K$ be a Hardy field,  let $f \in K_{>0}$ with $f \succ 1$.   \cite[Proposition 6]{rosenl1} states that there exists a $g \in K_{>0}$ with $g \sim \log f$  if and only if there exists a $g \in K_{>0}$ with $g \succ 1$ and $f \succ g^n$ for every positive integer $n$.   This provides a ``universal property'' of the  asymptotic equivalence class of $\log$; more precisely, it provides a characterization of the $\sim$-equivalence class of $\log f$ for any $f$ in a Hardy field $K$ with $f > 0$ and $f \succ 1$.
\end{remark}

Let $R$ be a subring of $\mathcal{D}$.  A function $f \in \mathcal{D}$ is {\bf differentially algebraic over $R$}\index{differentially algebraic} if there exists a nonzero polynomial $p(X_0,X_1,X_2,\ldots) \in R[X_0,X_1,X_2,\ldots]$ such that $p(f,f',f'',\ldots) = 0$, or, equivalently,  if the kernel $D_{f,R}^{-1}(0)$ of the ring homomorphism $D_{f,R}$ is nontrivial.    A function $f \in \mathcal{D}$ is {\bf differentially algebraic} if it is differentially algebraic over $\RR$.    Suppose that $f \in \mathcal{D}$ is differentially algebraic over $R$.  Then for some nonnegative integer $d$ there exists a nonzero polynomial $p(X_0,X_1,\ldots,X_d) \in R[X_0,X_1,\ldots,X_d]$ in the kernel $D_{f,R}^{-1}(0)$ of minimal degree $m > 0$ in $X_d$, and thus the kernel $D_{f,R}^{-1}(0) \cap R[X_0,X_1,X_2,\ldots,X_d]$ of the restricted map $\RR[X_0,X_1,X_2,\ldots,X_d] \longrightarrow S = R[f,f',f'',\ldots,f^{(d)}]$ is a nonzero ideal  of $R[X_0,X_1,X_2,\ldots,X_d]$.   The least $d = d_{f,R}\index[symbols]{.i  kp@$d_{f,R}$}$ possible is called the {\bf differential degree of $f$ over $R$}\index{differential degree $d_{f,R}$ of $f$ over $R$}.  We set $d_{g,R} = \infty$ for  any $g \in \mathcal{D}$ that is not differentiably algebraic over $R$.  Differentiating the equation $p = D_{f,R}(p) = p(f,f',f'',\ldots, f^{(d)}) = 0$, we obtain
$$D(p) = \sum_{k = 0}^d p_k f^{(k+1)} = 0,$$
where  $p_k = \frac{\partial p}{\partial f^{(k)}} = D_{f, R} \frac{\partial p}{\partial X_k}  \in S$ for all $k \leq d$.
Note then that  $p_d \neq 0$ since the polynomial $p_d$ in $f,f',f'',\ldots,f^{(d)}$ has degree $m-1 < m$ in $f^{(d)}$.   Suppose that $p_d \in \mathcal{D}^*$ (which holds, for example, if $R$ is a Hardy field and $f$ is Hardy adjoinable to $R$).   Then
$$f^{(d+1)}  = -\frac{1}{p_d}\sum_{k = 0}^{d-1} p_k f^{(k+1)} \in R[f,f',f'',\ldots,f^{(d)}][1/p_d]$$
and thus
$$p_k' \in R[f,f',f'',\ldots,f^{(d+1)}] \subseteq R[f,f',f'',\ldots,f^{(d)}][1/p_d]$$
for all $k \leq d$.  By induction,  then, one has
$$f^{(k)}  \in R[f,f',f'',\ldots,f^{(d)}][1/p_d]$$
for all $k$, i.e.,
$$R[f,f',f'',\ldots] \subseteq R[f,f',f'',\ldots,f^{(d)}][1/p_d].$$  Conversely, if  there exists a $p \in R[f,f',f'',\ldots, f^{(d)}] \cap \mathcal{D}^*$ such that  $$R[f,f',f'',\ldots] \subseteq R[f,f',f'',\ldots,f^{(d)}][1/p]$$ for some $d$,  then   $p^n f^{(d+1)} -q = 0$ for some $q \in R[f,f',f'',\ldots]$ and some nonnegative integer $n$,  so  there exist polynomials
$P$ and $Q$ in $R[X_0,X_1,\ldots, X_d]$ with $P \neq 0$ such that $0 \neq P X_{d+1}-Q \in R[X_0,X_1,X_2,\ldots]$ lies in the kernel of $D_{f,R}$, and therefore $f$ is differentially algebraic over $R$.  Thus, we have the following.

\begin{proposition}
Let $R$ be a subring of $\mathcal{D}$,  let $f \in \mathcal{D}$, and let $d$ be a nonnegative integer.   The following conditions are equivalent.
\begin{enumerate}
\item There  exists  a $p \in R[f,f',f'',\ldots,f^{(d)}] \cap \mathcal{D}^*$ such that  $$R[f,f',f'',\ldots] \subseteq R[f,f',f'',\ldots,f^{(d)}][1/p].$$
\item There  exist $P,Q \in R[X_0,X_1,\ldots, X_d]$ with $P \neq 0$ such that $P X_{d+1}-Q$ lies in  the kernel of $D_{f,R}$ and $D_{f,R}(P) \in \mathcal{D}^*$.
\end{enumerate}
Moreover, if the conditions above hold, then  $f$ is differentially algebraic over $R$.
\end{proposition}

\begin{proposition}\label{diffeq}
Let $K$ be a Hardy field,  let $f \in \mathcal{D}$ be Hardy adjoinable to $K$, and let $d$ be a nonnegative integer.   The following conditions are equivalent.
\begin{enumerate}
\item $f$ is differentially algebraic over $K$  with $d_{f,K} \leq d$.
\item There  exists a nonzero $p \in K[f,f',f'',\ldots,f^{(d)}]$ such that  $$K[f,f',f'',\ldots] \subseteq K[f,f',f'',\ldots,f^{(d)}][1/p].$$
\item There  exist  $P,Q  \in K[X_0,X_1,\ldots, X_d]$ with $P \neq 0$ such that $P X_{d+1}-Q$ lies in  the kernel of $D_{f,R}$ but $P$ does not.
\item There exists an $F \in K(X_0,X_1,\ldots, X_d)$ such that $f^{(d+1)} \in F(f,f',f'',\ldots,f^{(d)})$.
\item $K\{f\} \subseteq K(f,f',f'',\ldots,f^{(d)})$.
\item $K\{f\} = K(f,f',f'',\ldots,f^{(d)})$.
\end{enumerate}
\end{proposition}

\begin{corollary}[{\cite[Section 14]{bos2}}]\label{diffeqcor}
Let $f \in \mathcal{D}$ be Hardian, and let $d$ be a nonnegative integer.   The following conditions are equivalent.
\begin{enumerate}
\item $f$ is differentially algebraic of differential degree at most $d$ over $\RR$.
\item There  exists a nonzero $p \in \RR[f,f',f'',\ldots,f^{(d)}]$ such that  $$\RR[f,f',f'',\ldots] \subseteq \RR[f,f',f'',\ldots,f^{(d)}][1/p].$$
\item There  exist  $P,Q  \in \RR[X_0,X_1,\ldots, X_d]$ with $P \neq 0$ such that $P X_{d+1}-Q$ lies in  the kernel of $D_{f,R}$ but $P$ does not.
\item There exists  an $F \in \RR(X_0,X_1,\ldots, X_d)$ such that $f^{(d+1)} \in F(f,f',f'',\ldots,f^{(d)})$.
\item $\RR\{f\} \subseteq \RR(f,f',f'',\ldots,f^{(d)})$.
\item $\RR\{f\} = \RR(f,f',f'',\ldots,f^{(d)})$.
\end{enumerate}
\end{corollary}

We say that a subring $S$ of $\mathcal{D}$ containing a ring $R$ is {\bf differentially algebraic over $R$}\index{differentially algebraic} if every element of $S$ is differentially algebraic over $R$.   We say that a subring $R$ of $\mathcal{D}$ is {\bf differentially algebraic} if every element of $R$ is differentially algebraic, i.e., if $R$ is differentially algebraic over $\RR$.   A subring $R$ of $\mathcal{D}$ differentially algebraic over a Hardy field $K$ (resp., over $\RR$) if and only if  its elements satisfy the conditions of Prospotion \ref{diffeq} (resp., Corollary \ref{diffeqcor}).   By  \cite[Theorem 14.3]{bos2}, the Hardy field $\mathbb{H}$ is differentially algebraic.     Moreover,  by Theorem \ref{rosenl}, if $f$ is Hardian and $d_{f,\RR} \leq 1$, then $f \in \mathbb{H}$.  \cite[Conjecture 2]{bos} states that, if $f\in \mathcal{D}$ is Hardian and differentially algebraic, then $f \in \mathbb{H}$.  If this conjecture is true, then $\mathbb{H}$ is precisely the set of all differentially algebraic Hardian functions, and thus $\mathbb{H}$ is the largest differentially algebraic Hardy field.    Note that the Hardian elements of $\mathcal{D}$ are those elements $f$ of $\mathcal{D}$ such that $p(f,f',f'',\ldots) \in \mathcal{D}^* \cup\{0\}$ for every  $p \in \RR[X_0,X_1,X_2,\ldots]$, and the differentially algebraic elements of $\mathcal{D}$ are those elements $f $ of $\mathcal{D}$ such that  $p(f,f',f'',\ldots) \in \{0\}$ for some  nonzero  $p \in \RR[X_0,X_1,X_2,\ldots]$.   Thus, \cite[Conjecture 2]{bos} states that $\mathbb{H}$ is precisely the set of all $f \in \mathcal{D}$ for which both conditions are true.    For any  subring $R$  of $\mathcal{R}$,  we say that $R$ is {\bf bounded by some continuous function} if there exists a $u \in \mathcal{C}$ such that $f \leq u$ for all $f \in R$.   By  \cite[Theorem 14.4]{bos2}, if $K$ is a Hardy field bounded by some continuous function, then $\operatorname{E}(K)$ is differentially algebraic over $K$.  It is also conjectured that $\operatorname{E}(K)$ is is differentially algebraic over $K$ for any Hardy field $K$.

Any Hardian function that is differentially algebraic is analytic on some punctured neighborhood of $\infty$.   Thus $\mathbb{H}$ is a subfield of the ring $\mathcal{A}$ of germs of functions that are analytic on some punctured neighborhood of $\infty$.   Furthermore, any function that is analytic at $\infty$ is Hardian.  However,  if a function $r(x) = \sum_{n = 0}^\infty a_n/x^n$ analytic at $\infty$ is differentially algebraic (or in $\mathbb{H}$),  then the (real) coefficients $a_0,a_1,a_2,\ldots$ must be algebraically dependent over $\QQ$.  See [35] and [36] for proofs of these facts.

The following is a  corollary of Proposition \ref{diffeq}.

\begin{corollary}[{cf., \cite[Theorem 14.8]{bos2}}]\label{diffalgprop}
Let $K$ be a Hardy field and $f \in \mathcal{D}$, and let $\aaa$ be the kernel of the  ring homomorphism $D_{f,R}: R[X_0,X_1,X_2,\ldots] \longrightarrow R[f,f',f'',\ldots]$.   Then $f$ is Hardy adjoinable to $K$ if and only if $\aaa$ is a prime ideal, and $f$ is differentially algebraic over $K$ if and only if $\aaa$ is nonzero.   Suppose that $f$ is Hardy adjoinable to $K$, so that  $\aaa = \ppp$ is a prime ideal.
\begin{enumerate}
\item The ring $K\{f\}$ is isomorphic to the quotient field of $K[X_0,X_1,X_2,\ldots]/\ppp$, that is,  $K\{r\}$ is isomorphic to the residue field of the domain $K[X_0,X_1,X_2,\ldots]$ at $\ppp$.
\item  If $f$ is not differentially algebraic over $K$, then  $\ppp = 0$ and thus $K\{f\}$ is isomorphic to the field $K(X_0,X_1,X_2,\ldots)$ and  has infinite transcencence degree over $K$, with transcendence basis $f, f',f'',\ldots$.
\item Suppose that $f$ is differentially algebraic over $K$ with $d = d_{f,K}$.   Then