\section{Exercise 04}
\subsection{}

\begin{frame}
\frametitleTC{PI tuning}
\framesubtitleTC{part 1}
\myPause
 \begin{itemize}[<+-| alert@+>]
 \item Given the first-order process
       \begin{displaymath}
        P(z) = \frac{2}{(z-0.95)}
       \end{displaymath}
 \item[(a)] tune a PI as we just discussed for two/three response speeds,
 \item[(b)] test the results in Modelica.
 \end{itemize}
\end{frame}

\begin{frame}
\frametitleTC{PI tuning}
\framesubtitleTC{part 2}
\myPause
 \begin{itemize}[<+-| alert@+>]
 \item Given the processes
       \begin{displaymath}
        P_1(z) = \frac{2}{(z-0.95)(z-0.1)}, \quad
        P_2(z) = \frac{2}{(z-0.95)(z-0.8)},
       \end{displaymath}
 \item[(a)] plot their step responses and say which one is more ``dominantly first-order'',
 \item[(b)] relate your conclusions to the position of the pole not in $z=0.95$,
 \item[(c)] tune a PI for both systems as if they were first-order with only the\\
            slower pole $z=0.95$,
 \item[(b)] test the results in Modelica and comment on the possibility of\\
            reaching ``fast'' responses, depending on the position of the\\
            neglected pole.
 \end{itemize}
\end{frame}


\makeatletter\@ifundefined{infty@macros@defined}{\input{header}\def\infty@lock{}\begin{document}}{}\makeatother

\chapter{k-theory}{bcfe1b}{$K$-Theory}

The story of modern algebaric topology really begins with \emph{$K$-theory},
ostensibly a method for studying spaces using vector bundles instead of
test spaces (like singular cohomology does). As we will discuver, $K$-theory
is much more intimately related to cohomology than its construction might
suggest. It will be the first of many \emph{extraordinary} cohomology theories
we will study on our journey to the frontier of algebraic topology.

Even as a way to study spaces, $K$-theory is radically different from
\emph{ordinary} cohomology. Not only does it have values in negative degree,
but it is also intimately contected to the topology of unitary matrices.

\section{vec-bun-review}{7088ed}{A Review of Vector Bundles}

Before we can begin to tackle $K$-theory, we will recall some basic facts
of vector bundles, though we will probably gloss over most of the details.
Throughout, we fix some nice field such as $\R$ or $\C$ (though, in general,
we assume to be working over $\C$ unless otherwise noted) and henceforth
supress it from the notation.

\begin{defn}{vec-buns}{d755ef}
  A \emph{vector bundle} $\xi$ consists of the following data:
  \begin{itemize}
    \item A surjection of spaces $p: E \srj B$. We call $p$, $E$, and $B$ the
          projection, total space, and base space, respectively.
    \item For each $b\in B$, a finite-dimentisonal vector space structure
          on each fiber $p^{-1}\Par{b}$, which make each fiber into a
          topological vector space.
  \end{itemize}
  Furthermore, the map $p$ is \emph{locally trivial}, that is, for each
  $b\in B$ there exists a neighborhood $U$ around it such that $p^{-1}\Par{U}$
  is homeomorphic to $B \times V$ for some vector space $V$.
\end{defn}

Since the dimension of each fiber varies continuously along $B$, it is clear that when $B$
is connected, all of the fibers have the same dimension. We call this number the \emph{rank}
of the bundle. We may refer to a rank $1$ bundle as a \emph{line bundle}, and to a rank $n$
bundle as an \emph{$n$-plane bundle}.

The trivialization requirement suggests a simple class of vector bundles: those which
are \emph{globally trivial}:
\begin{exmp}{trivial-vec-bun}{47b41a}
  Given a space $X$ and a vector space $V$, we may form the \emph{trivial bundle}
  \[ \pr[1]: X \times V \to X \]
  whose projection being the product projection (hence the name!) and whose fiber is $V$.
\end{exmp}

\begin{exmp}[The Tautological Bundle]{tautological-line-bundle}{6bb21c}
  Let $\Rp[n]$ be real projective space, the space of lines through the origin of
  $\R[n+1]$. Let $\tau = E \rmap{p} \Rp[n]$ be a line bundle where
  \[ E = \mkset{ \Par{\ell, v} \in \Rp[n] \times \R[n+1] }{ v \in \ell }, \]
  where $p$ is given by the projection. This is called the \emph{tautological bundle} of
  $\Rp[n]$. The same construction may be done with $\Cp[n]$, too.
\end{exmp}

\begin{exmp}[The Tangent Bundle]{tangent-bundle}{ebdea1}
  Given a smooth manifold $M^n$, we may form its tangent bundle $TM$, made up of the union of
  its tangent spaces $T_x M$ of vectors tangent to $x \in M$\footnote{A rigorous treatment of
  the tangent bundle is outside the scope of this book. See \citeme for further reading.}
  The rank of $TM$ is equal to the dimension of the manifold $M$.
\end{exmp}

As objects over $B$, vector bundles have the maps you'd expect:

\begin{defn}{vec-bun-maps}{e65fec}
  A map of bundles over $B$, $\ph: \xi \to \xi'$, consists of a ladder
  \[\begin{tikzcd}
    F \ar{d}{\ph_F} \ar{r}{} & E \ar{d}{\ph_E} \ar{r}{p} & B \\
    F' \ar{r}{} & E' \ar[']{ur}{p'}
  \end{tikzcd}\]
  where the map of fibers $\ph_F$ is also a linear map. If such a map
  is invertible, we say $\xi$ and $\xi'$ are isomorphic, and denote it
  in the usual way. The category consisting of vector bundles and these maps
  will be denoted $\cVecBun[B]$.
\end{defn}

Given another space $B'$, we can and a map from it, we can perform a
\emph{change of base}:
\begin{defn}{vec-bun-change-of-base}{21049c}
  Given a vector bundle $\xi = E \rmap{p} B$ and a map $f: B' \to B$, we may
  form their pullback:
  \[\begin{tikzcd}
    E \times[B] B' \ar{r}{} \ar{d}{} & \ar{d}{p} E \\
    B' \ar{r}{f} & B
  \end{tikzcd}\]
  The vector bundle given by the vertical arrow $E \times[B] B' \to B'$ is denoted
  by $f^*\xi$ and is called the \emph{pullback along $f$}.
\end{defn}

The following are easily verified:
\begin{prop}{simple-props-of-vec-bun-change-of-base}{3814b2}
  \hfill
  \begin{itemize}
    \item If $B' \inj B$ is an inclusion, then $f^*\xi$ is isomorphic
          to the bundle given by restricting $p$ to to $B'$.
    \item For a sequence of bases $B'' \rmap{g} B' \rmap{f} B'$, there is
          a natural isomorphism
          \[ g^* f^* \xi \isom \Par{fg}^* \xi. \]
  \end{itemize}
\end{prop}
\begin{proof}
  Exercise. % TODO: link to exercise at the end of the section.
\end{proof}

The following theorem will give us access to a number of useful operations
on vector bundles:
\begin{thm}{vect-fnct-to-vec-bun-fnct}{38efab}
  Let $\cVect$ be the category of finite dimensional vector spaces, and
  let $T:\cVect \to \cVect$ be a functor which mapes the map
  \[ \Hom[V, W] \to \Hom[T\Par{V}, T\Par{W}] \]
  continuous (where $V$ and $W$ are regarded as products of the ground field).
  Then, this functor may be lifted to a functor $\cVecBun[B] \to \cVecBun[B]$.

  An analogous theorem also holds for $T$ with domain a product of copies of
  $\cVect$ and its opposite.
\end{thm}
\begin{proof}
  Atiyah. \citeme
\end{proof}

From \tagref{thm:vect-fnct-to-vec-bun-fnct} we are entitled to to the direct sum
(also known as the \emph{Whitney sum}),
tensor product, hom-bundle, dual, and exterior power of
any vector bundle(s), and the attendant natural isomorphisms.
%% TODO: something about the category of bundles over B?

\section{complex-k-theory}{f407c6}{Complex $K$-Theory}

$K$-theory originates in algebraic geometetry, named after the German \emph{Klasse}, as in
isomorphism ``class'', by Grothendieck \citeme{}. $K$-theory originated as a tool to study
shaves on an algebaric variety; Michael Atiyah and Friedrich Hirzebruch transfered
the construction over to topology, resulting in \emph{complex topological $K$-theory}.
The story of $K$-theory begins with two objects: the semiring of vector bundle classes, and
the Grothendieck group. Let us begin by fixing $\C$ as our ground field and contemplating our
favorite space $X$.

We'd like to study the vector bundles over $X$ algebraically, but they do not form a group.
In fact, they don't even form a monoid; the Whitney sum is only associative and commutative up
to isomorphism. However, if we consider \emph{isomorphism classes} of vector bundules, we
obtain an algebraic structure we can get a grip on:
\begin{defn}{monoid-vec-bun-iso}{190b0f}
  Let $\cVect[X] = \poi[0] \cVecBun[X]$ denote the set of isomorphism classes of
  $\cVecBun[X]$.\footnote{This is sometimes called the \emph{core} of a category.}
  This set forms a semiring (i.e. an abelian monoid with a multiplication) under the
  Whitney sum and the tensor product, respectively.
\end{defn}

However, the theory of semirings does not fit into our existing machinery of
homological algebra: it is not an abelian group. The next step is to use a construction
of Grothendieck to ``groupify'' it.
\begin{defn}{grothendieck-group}{9d1b08}
  Let $M$ be an abeilan monoid. The \emph{Grothendieck group} $K\Par{M}$ is defined by
  the following universal property:
  \[\begin{tikzcd}
    & G \\
    K\Par{M} \ar[dashed]{ur}{} \ar{r}{} & M \ar{u}{}
  \end{tikzcd}\]
  where $G$ is any group and $M \to G$ is any map of monoids. In other words, $K\Par{M}$
  consists of formally adjoining the ``missing'' inverses to $M$: for each $m\in M$,
  there is a $-m\in K\Par{M}$. We may call these ``negative'' classes \emph{virtual classes}.

  Formally, $K\Par{M}$ is a quotient of $M \times M$ where $\Par{m, n}$ corresponds to $m - n$.
  Alternatively, we may define $K\Par{M}$ as a quotient of the free group ${\Z}M$, where we set
  $m + n \sim m \oplus n$, here $+$ and $\oplus$ being the additions of ${\Z}M$ and $M$,
  respectively.
\end{defn}

\begin{defn}{zeroth-k-group}{6fca6d}
  The \emph{Grothendieck group of $X$}, or the \emph{zeroth $K$-theory of $X$} is the
  Grothendieck group of its vector bundles, denoted
  \[ \Kthy[0][X] = K\Par{\cVect[X]}. \]
  Moreover, the tensor product provides $\Kthy[0][X]$ with a multiplication, where the
  trivial line bundle $\ep = X \times \C$ is our one. This makes the Grothendieck group a ring.
  In fact, this is a contravariant functor. Given a map of spaces $f: Y \to X$, we may perform
  a change of base of all of the vector bundles to obtain a map $\Kthy[0][X] \to \Kthy[0][Y]$.
\end{defn}

\begin{exmp}{grothendieck-group-of-pt}{e0eaa1}
  Because every vector bundle over the point is trivial, its Grothendieck group is just the
  integers: $\Kthy[0][\pt] = \Z$.
\end{exmp}

While we have succeeded in making a ring out of vector bundles, this is merely a
slice of $K$-theory\footnote{Spoilers: it's a really big slice.}! Let's work through some
properties of $\Kthy[0][X]$. Throughout, $\Squ{\xi}$ is the (non-virtual) class represented
by the bundle $\xi$.

\begin{prop}{elements-of-K-0}{aa6eaf}
  Every element of $\Kthy[0][X]$ is of the form $\Squ{\xi} - n$ for some bundle $\xi$ and
  some natural number $n$.
\end{prop}
\begin{proof}
  By construction,
  every element of $\Kthy[0][X]$ is of the form $\Squ{\xi} - \Squ{\ze}$. Pick some
  bundle $\eta$ such that $\ze \oplus \eta$ is trivial, i.e., it is isomorhic to $n\ep$.
  Then,
  \[ \Squ{\xi} - \Squ{\ze} = \Squ{\xi} + \Squ{\eta} - \Squ{\ze} - \Squ{\eta} =
      \Squ{\xi \oplus \eta} - \Squ{n\ep} = \Squ{\xi \oplus \eta} - n. \]
\end{proof}

\begin{prop}{equality-in-K-0}{d64ddf}
  Two classes $\Squ{\xi}, \Squ{\ze}$ in $\Kthy[0][X]$ are equal if and only if
  $\xi \oplus n\ep \isom \ze \oplus n\ep$ for some natural number $n$.
\end{prop}
\begin{proof}
  If $\Squ{\xi} = \Squ{\ze}$, then $\xi \oplus \eta \isom \ze \oplus \eta$ for some bundle
  $eta$ (by construction). The rest of the argument follows as in \tagref{prop:elements-of-K-0}.
\end{proof}

\section{k-thy-periodicity-theorem}{359137}{A Periodicity Theorem}

The fundamental property of $K$-theory is \emph{Bott periodicity}. The only form we can
state right now is
\[ \Kthy[0][X \times {\Sph[2]}] \isom \Kthy[0][X] \otimes \Kthy[0][{\Sph[2]}], \]
but, as we will eventually learn, is a deep fact about the structure of $\sU$, the unitary
group.

We begin by considering the \emph{projective bundle} associated to a vector bundle.
\begin{defn}{projective-bundles}{e824c2}
  Let $\xi = E \to B$ be a vector bundle. We can remove a copy of $B$ from $E$ by deleting
  the zero element of each fiber. Then $\units{\C}$ acts on $E\sans B$ by fiberwise scaling.
  define $\Pr[][][E]$ as the quotient of $E\sans B$ by this action, and moreover, let
  $\Pr[][][\xi]$ be the bundle $\Pr[][][E] \to B$. This is the \emph{projectivization} of
  $xi$. Note that this is merely a fibre bundle; the fibers are not vector spaces, but
  projective spaces.
\end{defn}

\begin{prop}{projectivizaton-up-to-line-bundle}{0e40ac}
  For any vector bundle $\xi$ and line bundule $\ell$,
  \[ \Pr[][][\xi \otimes \ell] \isom \Pr[][][\xi]. \]
\end{prop}
\begin{proof}
  We apply \tagref{thm:vect-fnct-to-vec-bun-fnct} to reduce this to a question about
  projectivizations of vector spaces.
  Let $\Pr[][][V]$ be the projectivization of the vector space $V$. Given a nonzero $w\in W$,
  the assignment $v\mapsto v\otimes w$ gives a map $V \to V \otimes W$. If $\dim W = 1$,
  this map is an (unnatural) isomorphism. If we projectivize, however, we no longer care
  about the choice of sign of $w$, so $\Pr[][][V] \isom \Pr[][][V \otimes W]$.
\end{proof}

We will not prove the following theorem until much later, but we state it now
and ponder its corollaries.
\begin{thm}{main-thm-bott-periodicity}{cadc0b}
  Let $\ell$ be a line bundle over $X$, and consider the projective bundle
  $\Pr[][][\ell \oplus \ep]$. Its Grothendieck group is completely determined as a
  $\Kthy[0][X]$-algebra, given as the following quotient of a polynomial
  algebra:\footnote{Note that the generator of this algebra is $\Squ{\eta}$; it is
  \emph{not} a formal power series ring, despite the double square brackets.}
  \[ \Kthy[0][{\Pr[][][\ell\oplus\ep]}] =
      \frac{\Kthy[0][X]\Squ{\Squ{\eta}}}
        {\Par{\Par{\Squ{\eta}-1}\Par{\Squ{\eta}\Squ{\ell} - 1}}}. \]
  Here, $\Squ{\eta}$ is another line bundle, which we will contruct later.
\end{thm}

This has two important corollaries. Consider the vector bundle $\ep \oplus \ep$ over
$X$, i.e. $X \times \C[2] \to X$. If we projectivize, we wind up with the projective
bundle $X \times \Cp[1]$. Recalling that the complex projective line is $\Sph[2]$, we
have the following corrolaries:

\begin{cor}{grothendieck-group-of-S2}{dbc762}
  Setting $X = \pt$ and $\ell = \ep$ above, we find that
  \[ \Kthy[0][{\Sph[2]}] = \frac{{\Z}\Squ{eta}}{\Par{\Par{\Squ{eta} - 1}^2}}. \]
\end{cor}

\begin{cor}{grothendieck-group-kunneth}{4f605f}
  The following K\"unneth theorem holds, where the isomorphism is
  the obvious multiplication map.
  \[ \Kthy[0][X] \otimes \Kthy[0][{\Sph[2]}] \isom
      \Kthy[0][{X \times \Sph[2]}]. \]
\end{cor}

%% TODO: prove big main theorem (gross)

\section{k-thy-is-cohomology}{1d1dc4}{An Extraordinary Theory}

We will now develop $K$-theory proper, using the periodicity theorems we've built up.
We'll also show how $K$-theory is the next step towards modern algebaric topology, as
the first example of an \emph{extraordinary cohomology theory}.

Let $\cTop$ be our category of spaces, as usual, and let $\cTop_*$ be the pointed variant.
Finally, let $\cTop^2$ be the category of pairs of spaces. Finally, given a space $X$, let
$X^+$ be that space with a disjoint basepoint.

The following construction is entirely analogous to the equivalent one for singular
cohomology.
\begin{defn}{reduced-grothendieck-group}{e99f3a}
  Given a pointed space $X$ with basepoint $x$, let the \emph{reduced Grothendieck group}
  be given as
  \[ \rKthy[0][X] = \ker[{\Kthy[0][X] \to \Kthy[0][x]}], \]
  i.e., as the kernel of the image of the inclusion of the basepoint. By definition, the
  collapse map $X \to x$ induces a splitting
  \[ \Kthy[0][X] = \rKthy[0][X] \oplus \rKthy[0][x]. \]
  We define the \emph{relative Grothendieck group} of a pair as
  \[ \Kthy[0][X, Y] = \rKthy[0][X/Y]. \]
\end{defn}

The usual facts, e.g. $\Kthy[0][X] = \rKthy[0][X^+]$, $\Kthy[0][X, \eset] = \Kthy[0][X]$,
are obvious. We can now define $K$-theory in \emph{negative degree} using the reduced
Grothendieck Group.
\begin{defn}{negative-k-thy}{55a1bf}
  Let $X$ be a pointed space. Then, define \emph{reduced $K$-theory}
  \[ \rKthy[-n][X] = \rKthy[0][{\Susp[n]X}] \]
  for $n > 0$. $K$-theory itself and its relative version are defined in
  terms of this:
  \[ \Kthy[-n][X] = \rKthy[-n][X^+], \quad
       \Kthy[-n][X, Y] = \rKthy[-n][X/Y]. \]
  These are all contravariant functors with the expected effect on maps, and
  are all algebras over the relevant Grothendieck group, which takes the role of the
  zeroth $K$-theory.
\end{defn}

\makeatletter\@ifundefined{infty@lock}{}{\end{document}}\makeatother


Although some properties of the simple waves have been emphasized in section \ref{sec:stress_paths}, the complexity of the equations prevents the complete characterization of the loading paths followed.
In order to get additional information on the evolution of the stress states, the systems of ODEs gathered in table \ref{tab:simpleWavesEquations} are numerically integrated for plane stress and plane strain loadings. %, based on the material parameters used in chapter \ref{chap:chap3}.
In particular, the thin-walled tube problem considered by \textsc{Clifton} \cite{Clifton} is first looked at so that the above developments can be validated.
Next, the plane stress and plane strain cases are treated.
%The identified behaviors should provide some simplification assumptions for the building of a procedure that lead to approximate solutions of the problems.
The values of the elastic properties considered here are those used in the previous chapter (see table \ref{tab:material}).
On the other hand, the tensile yield stress $\sigma^y=1 \times 10^{8} \: Pa$ and the hardening modulus $C=1\times10^8 \: Pa$ are set arbitrarily.
Finally, we restrict to positive shear stress $\sigma_{12}\geq 0$.
\subsection{Thin-walled tube problem}
\label{sec:num_thin-walled}
%% Hypothèses du problème
Consider the semi-infinite domain in the Cartesian coordinate system: $x_1 \times x_2 \times x_3 \in [0,\infty[ \times [-h,h] \times [-e,e]$, being acted upon by a traction vector $\vect{T}^d$ at $x_1=0 $ and free surfaces $x_2=\pm h$ and $x_3=\pm e$.
Only the first two components of $\vect{T}^d$ are non-null so that the stress and strain tensors within the medium are of the form:
\begin{equation}
  \tens{\sigma} = \matrice{\sigma_{11} & \sigma_{12} & 0\\  & 0 & 0\\sym & & 0} \quad ;\quad\tens{\eps} = \matrice{\eps_{11} & \eps_{12} &0 \\  & \eps_{22}&0 \\sym & & \eps_{33}}
\end{equation}
By using the following mapping of coordinates: $(1,2,3) \mapsto (z,\theta,r)$, such a state corresponds also to that
%of the thin-walled cylinder studied by \textsc{Clifton} \cite{Clifton}.
holding in a hollow cylinder with radius and length much bigger that its thickness, submitted to combined longitudinal and torsional loads.
Hence the name thin-walled tube problem.
As a particular plane stress case, the set of ODEs along characteristics derived in section \ref{sec:stress_paths} applies by taking into account the vanishing stress component $\sigma_{22}$:
\begin{align*}
  & \dot{\sigma}_{22}=\widetilde{C}^{ep}_{22ij} \dot{\eps}_{ij} =0 \quad i,j=\{1,2\} \\
  \Rightarrow  \quad  &\widetilde{C}^{ep}_{2222} \dot{\eps}_{22} = - \widetilde{C}^{ep}_{22ij}\dot{\eps}_{ij} \quad ij=\{11,12,21\}
\end{align*}
where $\widetilde{\Cbb}^{ep}$ is the plane stress tangent modulus \eqref{eq:CP_constitutive}.
Thus, inverting the above equation and introducing it in the constitutive equation, we are left with the following law:
\begin{equation}
  \label{eq:ch5_TW_tangent}
  \dot{\sigma}_{ij}=\widetilde{C}^{ep}_{ijkl} \dot{\eps}_{kl} - \frac{\widetilde{C}^{ep}_{ij22}\widetilde{C}^{ep}_{22kl}}{\widetilde{C}^{ep}_{2222}}\dot{\eps}_{kl}= \widehat{C}^{ep}_{ijkl} \dot{\eps}_{kl}\qquad ij,kl=\{11,12,21\}
\end{equation}
%with $\widetilde{\Cbb}^{ep}$ is referred to as the thin-walled tube tangent modulus.
The characteristic analysis of the hyperbolic system based on this tangent modulus also leads to loading paths followed across slow and fast waves, involving however two components of stress rather than three. For the sake of simplicity, the stress components are denoted by $\sigma_{11}=\sigma$ and $\sigma_{12}=\tau$ whereas the velocity components reads $v_1=u$ and $v_2=v$.

Thus, the ODEs governing the evolution of stress components inside the waves of combined-stress read:
\begin{equation}
  \label{eq:tw_paths}
  d\sigma = \psi^{s,f} d\tau
\end{equation}
where the loading functions $\psi^{s,f}$ depend on the component of the acoustic tensor that corresponds to the tangent modulus \eqref{eq:ch5_TW_tangent}.
Equations \eqref{eq:tw_paths} as well as those of \textsc{Clifton} \cite{Clifton} have been numerically integrated, starting from several arbitrary points lying on the initial yield surface.
Since the loading functions are odd functions of $\sigma$ and $\tau$ \cite{Clifton}, $\tau(\sigma)$ and $\sigma(\tau)$ are even functions and hence, the loading paths exhibit symmetries with respect to $\tau$ and $\sigma$ axes.
Therefore, the study is restricted to the quarter-plane ($\sigma>0,\tau>0$).
\begin{figure}[h!]
  \centering
  \subcaptionbox{Stress path in $(\sigma,\tau)$ plane \label{subfig:tw_fast_stress}}{\input{chapter5/pgfFigures/thinwalledStress_fast}} \qquad
  \subcaptionbox{Stress path in deviatoric plane\label{subfig:tw_fast_dev}}{\input{chapter5/pgfFigures/thinwalledDev_fast}}
  \caption{Stress path followed in a fast simple wave for the thin-walled tube problem. Comparison between the results obtained from equations \eqref{eq:tw_paths} and these of \cite{Clifton}.}
  \label{fig:fast_clifton}
\end{figure}
Figure \ref{fig:fast_clifton} shows one stress path resulting from the integration of the ODE related to right-going fast waves with $\sigma$ used as a driving parameter.
The initial stress state lies on the yield surface at $\sigma=0$ and the ODE is discretized by means of the backward Euler method, the integration being performed until the stress reaches the value $\sigma=\sigma^y $.
The path is respectively depicted in the stress space and in the deviatoric plane in figures \ref{fig:fast_clifton}\subref{subfig:tw_fast_stress} and \ref{fig:fast_clifton}\subref{subfig:tw_fast_dev}.
The deviatoric plane projection is obtained by drawing the paths in the eigenstress space and projecting them onto the plane perpendicular to the hydrostatic axis $\sigma_1=\sigma_2=\sigma_3$.
In this plane, the von-Mises yield surface is a circle drawn with dashed lines.
%Furthermore, the direction of the path is given by the arrows in figure \ref{sec:stress_paths}.
As observed by \textsc{Clifton}, the path inside fast waves first follows the initial yield surface up to the intersection with the $\sigma$-axis.
Then, the loading path is such that $d\tau=0$ while $\sigma$ increases as far as hyperbolicity holds, that is for $c_f < c_2 = \sqrt{\mu/\rho} $ \cite{Clifton}.
Notice that these conclusions are similar to those made in the previous section.
The ODEs derived in section \ref{sec:stress_paths} for plane stress, once adapted to the thin walled-tube problem, then yield the solution originally proposed by \textsc{Clifton}.

Adopting the same approach with $\tau$ as driving parameter, some stress paths through slow waves have been reported in figure \ref{fig:tw_slow}.
Since fast waves lead to loading paths following the initial yield surface, the orthogonality property of the loading functions implies that those of slow waves move away from it.
This is seen in figure \ref{fig:tw_slow}\subref{subfig:tw_slow_stress}.
This property holds in the $(\sigma,\tau)$ plane but not in the deviatoric plane, as can be seen in figure \ref{fig:tw_slow}\subref{subfig:tw_slow_dev}, since the quasi-linear form \eqref{eq:ch5_quasilinear_normal} and hence, the ODEs, are not written in terms of $s_1,s_2,s_3$.
%This is however in general not the case in the deviatoric plane (\ref{fig:tw_slow}\subref{subfig:tw_slow_dev}) except for the initial condition $\sigma=0$ leads to a radial loading path following the direction of pure shear (horizontal dotted line in figure \ref{fig:tw_slow}\subref{subfig:tw_slow_dev}).
\begin{figure}[h!]
  \centering
  \subcaptionbox{Stress path in $(\sigma,\tau)$ plane \label{subfig:tw_slow_stress}}{\input{chapter5/pgfFigures/thinwalledStress}} \qquad
  \subcaptionbox{Stress path in deviatoric plane \label{subfig:tw_slow_dev}}{\input{chapter5/pgfFigures/thinwalledDev}}
  \caption{Stress paths followed in a slow simple wave for the thin-walled tube problem. Comparison between the results obtained from equations \eqref{eq:tw_paths} (cross markers) and those of \cite{Clifton} (solid lines).}
  \label{fig:tw_slow}
\end{figure}

The behaviors highlighted above allow the solution of the Picard problem in a thin-walled cylinder, that is:
\begin{itemize}
\item initial conditions $\tens{\sigma}(\vect{x},t=0)=\tens{0}$, $\vect{v}(\vect{x},t=0)=\vect{0}$
\item step-loading boundary conditions $\sigma(x_1=0,t)=\sigma^d$ and $\tau(x_1=0,t)=\tau^d$
\end{itemize}
Indeed, with given ($\sigma^d,\tau^d$) outside of the initial yield surface, one can first integrate backward the loading path through the slowest wave. Two situations are then distinguished:
\begin{itemize}
\item[(i)] if the integration leads to some point of the initial yield surface, which can be reached by elastic discontinuities, the solution is complete.
\item[(ii)] if the slow wave connects ($\sigma^d,\tau^d$) to the $\sigma$-axis at some point lying outside of the initial yield surface, then a fast wave must be integrated backward to the initial elastic domain.
  Indeed, analogously to the results of table \ref{tab:stress_paths_properties}, it is shown in \cite{Clifton} that the paths followed through slow waves (\textit{resp. fast waves}) are perpendicular (\textit{resp. parallel}) to the $\sigma$-axis.
  As a result and by virtue of the symmetries with respect to the $\sigma$ and $\tau$ axes of the loading paths, the initial yield surface can be reached by considering a fast wave.
\end{itemize}
At last, the cases $\tau^d=0$ and $\sigma^d=0$ respectively lead to one single fast wave and one single slow wave.
Once the characteristic structure of the problem has been determined (\textit{i.e. one fast wave, one slow wave, or both}), the complete set of ODEs can be integrated in order to compute the solution.
It is worth emphasizing the complexity introduced by waves of combined-stress since the characteristic structure of the solution of a Picard problem now depends on the boundary conditions.
Hence, for developing a Riemann solver that would provide the stationary solution, additional computational effort must be made.

The iterative procedure proposed by \textsc{Lin} and \textsc{Ballman} \cite{Lin_et_Ballman} to solve Riemann problems is based on the above considerations.
%\textsc{Lin} and \textsc{Ballman} \cite{Lin_et_Ballman} proposed an iterative procedure to solve Riemann problems with the stress states considered above.
The left and right initial conditions of that problem satisfy equations similar to \eqref{eq:integral_example}:
\begin{subequations}
  \label{eq:lin_ballman}
  \begin{alignat}{1}
    \label{eq:lin_ballman_left}
    & u^* = u^L + \int_{\tens{\sigma}^L}^{\tens{\sigma}^*} \frac{d\sigma}{\rho c} \quad ; \quad v^* = v^L + \int_{\tens{\sigma}^L}^{\tens{\sigma}^*} \frac{d\tau}{\rho c} \\
    \label{eq:lin_ballman_right}
    & u^* = u^R - \int_{\tens{\sigma}^R}^{\tens{\sigma}^*} \frac{d\sigma}{\rho c} \quad ; \quad v^* = v^R - \int_{\tens{\sigma}^R}^{\tens{\sigma}^*} \frac{d\tau}{\rho c}
  \end{alignat}
\end{subequations}
where the asterisk denotes the stationary state of the Riemann problem.
First, a stress state ($\bar{\sigma},\bar{\tau}$) is assumed to be connected to $\tens{\sigma}^L$ and $\tens{\sigma}^R$ (see figure \ref{fig:lin_et_ballman} for the illustration of the method).
\begin{figure}[h!]
  \centering
  % \begin{tikzpicture}[scale=1.5]
  %   \draw[->] (0,0) --(3,0);
  %   \draw[->] (0,0) --(0,3);
  %   \node[below] at (1,0) {$v^L$};
  % \end{tikzpicture}
  \input{chapter5/pgfFigures/iterativeRP}
  \caption{Schematic representation of the iterative Riemann solver proposed in \cite{Lin_et_Ballman}.}
  \label{fig:lin_et_ballman}
\end{figure}
By taking into account the conclusions of \textsc{Clifton} the loading paths followed can be identified so that equations \eqref{eq:lin_ballman_left} and \eqref{eq:lin_ballman_right} can be integrated.
Thus, virtual integral curves are built in ($u,\sigma$) and ($v,\tau$) planes as depicted with dashed lines in figure \ref{fig:lin_et_ballman}.
Second, the intersection of the curves joining respectively $\vect{v}^L$ to $\vect{v}^1$ and $\vect{v}^R$ to $\vect{v}^2$ gives a stress state ($\widehat{\sigma},\widehat{\tau}$) that is used to apply the procedure again until some criterion $\norm{\vect{v}^1-\vect{v}^2}\leq \epsilon $ is achieved.
At last, the state obtained $(\widehat{\vect{v}},\widehat{\tens{\sigma}})$ corresponds to the stationary state of the Riemann problem and can be used to compute numerical fluxes at cell interfaces.
Notice that in this procedure, the intersection of integral curves is found by means of the tangent lines approximation at $\bar{\tens{\sigma}}$ so that this solver does not fully account for the exact solution.
Therefore, it appears that the loading paths identified in \cite{Clifton} are crucial in order to determine the wave pattern corresponding to a guessed stationary state.
This is exactly what is lacking for the more general plane strain and plane stress problems.

\subsection{Plane stress}
\label{sec:num_plane_stress}
We now move on to a more general plane stress case for which the stress $\sigma_{22} $ is not zero.
Although the equations of section \ref{sec:stress_paths} have been derived for two directions of propagation, attention is paid here to $\vect{n}=\vect{e}_1$ only.
Thus, the system of ODEs considered reads (see table \ref{tab:simpleWavesEquations}):
\begin{align}
  \label{eq:plane_stress_paths}
  & d\sigma_{11} = \psi_1^{s,f} d\sigma_{12} \\
  & d\sigma_{22} = -\frac{\psi^{s,f}_{1}\alpha_{11}+\alpha_{12}}{\alpha_{22}}d\sigma_{12}
\end{align}
%Indeed, it has been seen that similar properties of the loading paths inside the simple waves hold for both directions.

One path through a fast simple wave is first looked at by assuming an initially free-stress state, brought to the yield surface at the point $ \sigma_{11}=\sigma_{22}=0 $.
Equations \eqref{eq:plane_stress_paths} are thus integrated implicitly with $\sigma_{12}$ as driving parameter until the shear component $\sigma_{12}$ vanishes.
%The ODEs of table \ref{tab:simpleWavesEquations} are thus integrated implicitly with $\sigma_{12}$ as driving parameter until the shear component $\sigma_{12}$ vanishes.
Two situations are considered for which the stress $\sigma_{11}$ increases or decreases.
\begin{figure}[h!]
  \centering
  \subcaptionbox{Projections of loading paths in ($\sigma_{11},\sigma_{12}$) and ($\sigma_{22},\sigma_{12}$) planes \label{subfig:CP_fast_stress}}{\input{chapter5/pgfFigures/CPfastWaves0.tex}}
  \subcaptionbox{Loading paths in the deviatoric plane \label{subfig:CP_fast_dev}}{\input{chapter5/pgfFigures/CPfastWaves_deviator0.tex}}
  \caption{Loading paths through a fast simple wave starting from the initial yield surface with initial condition $\sigma_{11}=\sigma_{22}=0 $ in directions of decreasing and increasing $\sigma_{11} $.}
  \label{fig:fast_path_plane_stress}
\end{figure}
The resulting loading paths are depicted in figure \ref{fig:fast_path_plane_stress}\subref{subfig:CP_fast_stress} in $(\sigma_{11},\sigma_{12})$ and $(\sigma_{22},\sigma_{12})$ planes, while the projection in the deviatoric plane can be seen in figure \ref{fig:fast_path_plane_stress}\subref{subfig:CP_fast_dev}.
In addition, figure \ref{fig:fast_path_plane_stress}\subref{subfig:CP_fast_stress} shows the evolution of the characteristic speed associated with the fast wave along the path by means of a color gradient.
Thus, it can be seen that for the loadings under consideration, the wave celerity is a decreasing function of the stress so that the simple wave solutions are valid.
Next, it appears that $\sigma_{12}$ is an even function of $\sigma_{11}$ and $\sigma_{22}$. %the paths have axial symmetry, although the property has not been shown yet.
At last, analogously to the thin-walled cylinder solution, the stress components follow the initial yield surface, which is obvious in the deviatoric plane (figure \ref{fig:fast_path_plane_stress}\subref{subfig:CP_fast_dev}).
Furthermore, according to the property \eqref{eq:CP_roots} the stress path must be horizontal in the $(\sigma_{11},\sigma_{12})$ and $(\sigma_{22},\sigma_{12})$ planes, once the $\sigma_{11}$-axis is reached.
As depicted in figure \ref{fig:fast_path_plane_stress}\subref{subfig:CP_fast_dev}, this point corresponds to a direction of pure shear in the deviatoric plane.
%As a result, the plastic flow becomes significant once a direction of pure shear is reached.
Nevertheless, the numerical integration of ODEs once the shear stress $\sigma_{12}$ vanishes is not possible owing to an indeterminacy of the loading function $\psi_1^f$ that has not been identified so far.
%condition \eqref{eq:CP_roots} yields $\psi^f_1 \rightarrow \infty$ and associated numerical issues so that the loading path cannot be integrated further.
%The integration performed here nevertheless stops once $\sigma_{12}=0$ due to a singularity that has not been identified and leads to an undefined loading function $\psi_1^f$.

% Note that while the path is restricted to the initial yield surface, there exists a relation bewteen the principle stresses $\sigma_1 $ and $\sigma_2 $.
% Indeed, since the the out-of-plane stress $\sigma_{33}=0 $ is itself an eigenvalue of Cauchy stress tensor, the intersection of the initial yield surface with the plane $\sigma_3=0$ in the principle stress space is an ellipse as shown in figure \ref{fig:ellipse}.
% Therefore, the following relation holds:
% \begin{equation}
%   \label{eq:ellipse_equation}
%   \(\frac{\sigma_1}{a}\)^2 + \(\frac{\sigma_2}{b}\)^2 = 1
% \end{equation}
% where $a$ and $b$ the semi-major and semi-minor axis of the ellipse.
% Find $a$ and $b $!.
% \begin{figure}[h!]
%   \centering
%   \input{chapter5/pgfFigures/vonMises_cut}
%   \caption{Intersection of the initial yield surface with the plane $\sigma_3=0 $ in eigenstresses space.}
%   \label{fig:ellipse}
% \end{figure}

%% integration jusqu'à \tau=2\sigma^y pour \sigma_{22}=\{\pm 57735026.919,0\}
We now focus on the stress evolution inside slow waves.
The same procedure is followed for several starting points on the initial yield surface.
In addition, various initial values are considered for $\sigma_{22}$ since, even for a solid in a free stress state at $t=0$, a fast wave may lead to $\sigma_{22}\neq 0$.
\begin{figure}[h!]
  \centering
  \subcaptionbox{Projections of loading paths in ($\sigma_{11},\sigma_{12}$) and ($\sigma_{22},\sigma_{12}$) planes \label{subfig:CP_slow_stress1}}{\input{chapter5/pgfFigures/CPslowWaves1.tex}}
  \subcaptionbox{Loading paths in the deviatoric plane \label{subfig:CP_slow_dev1}}{\input{chapter5/pgfFigures/CPslowWaves_deviator1.tex}}
  \caption{Stress paths in a slow simple wave for various starting points lying on the initial yield surface for $\sigma_{22}=-5.8\times 10^7 \: Pa$. Projections in the stress space (figure \subref{subfig:CP_slow_stress2})  and deviatoric plane (figure \subref{subfig:CP_slow_dev1}).}
  \label{fig:slow_path_plane_stress1}
\end{figure}
The loading paths thus obtained for the (arbitrary) initial values $\sigma_{22}=-5.8\times 10^7 \: Pa$, $\sigma_{22}=0$ and $\sigma_{22}=5.8\times 10^7 \: Pa$, are respectively depicted in figures \ref{fig:slow_path_plane_stress1}, \ref{fig:slow_path_plane_stress2} and \ref{fig:slow_path_plane_stress3}.
The projections in the stress space and the deviatoric plane are shown.
The evolution of the characteristic speed associated with the slow wave can also be seen by means of a color gradient.
Once again, the simple wave solution appears to be valid with the considered loading conditions.
Furthermore, one can see that the stress paths are now more complex since, for instance, no symmetry appears in the $(\sigma_{11},\sigma_{12})$ plane.
%For instance, for a negative initial value of the stress $\sigma_{22}$ (figure \ref{fig:slow_path_plane_stress1}), the projection in the $(\sigma_{11},\sigma_{12})$ plane does not allow to identify some symmetry.
Moreover, the behavior is even more complex in the $(\sigma_{22},\sigma_{12})$ plane in which the variations first mainly concern $\sigma_{22}$ and next, the slopes of curves roughly change so that the paths are almost vertical.
This sharp change in slopes is also notable in the deviatoric plane in figure \ref{fig:slow_path_plane_stress1}\subref{subfig:CP_slow_dev1}.
%However, this figure does not help in finding some interpretations.

On the other hand, similar observations can be made for the other initial values of $\sigma_{22}$ as can be seen in figures \ref{fig:slow_path_plane_stress2} and \ref{fig:slow_path_plane_stress3}.
\begin{figure}[h!]
  \centering
  \subcaptionbox{Projections of loading paths in ($\sigma_{11},\sigma_{12}$) and ($\sigma_{22},\sigma_{12}$) planes \label{subfig:CP_slow_stress2}}{\input{chapter5/pgfFigures/CPslowWaves2.tex}}
  \subcaptionbox{Loading paths in the deviatoric plane  \label{subfig:CP_slow_dev2}}{\input{chapter5/pgfFigures/CPslowWaves_deviator2.tex}}
  \caption{Stress paths in a slow simple wave for various starting points lying on the initial yield surface for $\sigma_{22}=0$. Projections in the stress space (figure \subref{subfig:CP_slow_stress2}) and deviatoric plane (figure \subref{subfig:CP_slow_dev2}).}
  \label{fig:slow_path_plane_stress2}
\end{figure}
%The last set of results obtained with the initial data $\sigma_{22}<0$, which can be see in figure \ref{fig:slow_path_plane_stress3}, shows a similar behavior to that of figure \ref{fig:slow_path_plane_stress1}.
However, the paths depicted in the ($\sigma_{22},\sigma_{12}$) plane in figure \ref{fig:slow_path_plane_stress3}\subref{subfig:CP_slow_stress3} follow a direction opposite to those corresponding to the initial condition $\sigma_{22}=-5.8\times 10^7 \: Pa$.
%case in the $(\sigma_{22},\sigma_{12})$ plane, since $\sigma_{22}$ decreases rather than increases before the slopes of paths break (see figure \ref{fig:slow_path_plane_stress3}\subref{subfig:CP_slow_stress3}).
The previous remark is also valid in the deviatoric plane in figure \ref{fig:slow_path_plane_stress3}\subref{subfig:CP_slow_dev3}.
Indeed, the integral curves first describe clockwise curved lines until the break in slopes occurs, after which a behavior close to straight lines is seen.
\begin{figure}[h!]
  \centering
  \subcaptionbox{Projections of loading paths in ($\sigma_{11},\sigma_{12}$) and ($\sigma_{22},\sigma_{12}$) planes \label{subfig:CP_slow_stress3}}{\input{chapter5/pgfFigures/CPslowWaves3.tex}}
  \subcaptionbox{Loading paths in the deviatoric plane  \label{subfig:CP_slow_dev3}}{\input{chapter5/pgfFigures/CPslowWaves_deviator3.tex}}
  \caption{Stress paths in a slow simple wave for various starting points lying on the initial yield surface for $\sigma_{22}=5.8\times 10^7 \: Pa$. Projections in the stress space (figure \subref{subfig:CP_slow_stress3}) and deviatoric plane (figure \subref{subfig:CP_slow_dev3}).}
  \label{fig:slow_path_plane_stress3}
\end{figure}
It is worth noticing that the driving parameter used for slow waves has not been chosen arbitrarily.
As a matter of fact, the numerical integration does not go well when driven with $\sigma_{11}$.
Furthermore, numerical issues occur if the starting point is such that $\sigma_{12}=0$.

More generally, the loading paths resulting from the integration of ODEs governing the behavior inside simple waves in plane stress can be summarized as follows.
Whereas the integral curves inside a fast wave first exhibit a phase in which the stress is restricted to the initial yield surface, the passage of a slow wave makes the stress leave the elastic domain almost instantaneously.
It is moreover noteworthy that the shear stress component $\sigma_{12}$ undergoes the biggest variation through a slow wave, in spite of the visible combined-stress nature of the corresponding paths.
In addition, roughs change in the slopes of the integral curves associated with slow waves occur.
However, such phenomena might also be observed for fast waves once the shear stress vanishes but have not been highlighted in figure \ref{fig:fast_path_plane_stress} due to numerical issues in integrating an undetermined function.
%Indeed, the theory (equation \eqref{eq:CP_roots}) predicts that this situation would lead to loading paths (locally) perpendicular to the yield surface rather than parallel.
Furthermore, after the slopes of slow wave integral curves broke, the paths are straights the deviatoric plane.

\subsection{Plane strain}
\label{sec:num_plane_strain}
Assuming that a solid initially at rest undergoes external loads leading to a plane strain case, the previous approach is now repeated.
However, the derivation of the hyperbolic system in a two-dimensional setting relies on the writing of the out-of-plane stress component as a function of plastic strain.
Hence, the integral curves associated with simple waves are integrated implicitly, along with the plastic flow.
To do so, the consistency condition (see section \ref{sec:constitutive-equations}) of the von-Mises yield surface \eqref{eq:ch5_von-Mises_yield} is written:
\begin{equation}
  \label{eq:consistance}
  \dot{f}=0 \quad \Leftrightarrow  \quad  \sqrt{\frac{3}{2}}\:\frac{\tens{s}:\tens{\dot{\sigma}}}{\norm{\tens{s}}}=C\dot{p}
\end{equation}
In addition, combination of the plastic flow rule \eqref{eq:plastic_strain_rate}: $\tens{\dot{\eps}}^p = \dot{p}\:\sqrt{\frac{3}{2}}\frac{\tens{s}}{\norm{\tens{s}}}$ ,
and the above consistency condition yields:
\begin{equation}
  \label{eq:flow_rule}
  \tens{\dot{\eps}}^p = \frac{3}{2C}\frac{\tens{s}\otimes\tens{s}}{\norm{\tens{s}}^2} :\tens{\dot{\sigma}}
\end{equation}
% so that the evolution of the plastic strain tensor is governed by:
% \begin{equation}
%   \label{eq:flow_rule2}
%   \tens{\dot{\eps}}^p = \frac{3}{2C}\frac{\tens{s}\otimes\tens{s}}{\norm{\tens{s}}^2} :\tens{\dot{\sigma}}
% \end{equation}
Thus, the system of ODEs consists of the equations of table \ref{tab:simpleWavesEquations}:
\begin{align}
  \label{eq:plane_strain_paths}
  & d\sigma_{11} = \psi_1^{s,f} d\sigma_{12} \\
  & d\sigma_{22} = -\frac{\psi^{s,f}_{1}\alpha_{11}+\alpha_{12}}{\alpha_{22}}d\sigma_{12}
\end{align}
along with the ODE related to the out-of-plane component:
\begin{equation}
  \label{eq:sig33_plane_strain}
  d\sigma_{33}= \nu\(d\sigma_{11}+d\sigma_{22}\) - E d\eps^p_{33}
\end{equation}

Since a fast wave propagates faster than a slow one, a material particle is first acted upon by the effects of the former.
\begin{figure}[h!]
  \centering
  \subcaptionbox{Projections of loading paths in ($\sigma_{11},\sigma_{12}$) and ($\sigma_{22},\sigma_{12}$) planes \label{subfig:fastDP_stress}}{\input{chapter5/pgfFigures/DPfastWaves0.tex}}
  \subcaptionbox{Loading path in the deviatoric plane \label{subfig:fastDP_dev}}{\input{chapter5/pgfFigures/DPfastWaves_deviator0.tex}}
  \caption{Loading paths through a fast simple wave with initial condition $\sigma_{22}=0$ for different starting points on the initial yield surface.}
  \label{fig:fast_path_plane_strains}
\end{figure}
Thus, figure \ref{fig:fast_path_plane_strains} shows the evolution of stresses resulting from numerical integration using $\sigma_{11}$ as a driving parameter by rearranging equations \eqref{eq:plane_strain_paths}.
Several starting points on the initial yield surface are considered.
The evolution of the celerity of fast waves along the integral curve confirms the validity of the simple wave solution.
Furthermore, the starting points are chosen in such a way that a symmetry of the loading path with respect to $\sigma_{11}=0$ and $\sigma_{22}=0$ planes is notable.
Although the stress paths depicted in figure \ref{fig:fast_path_plane_strains}\subref{subfig:fastDP_stress} are rather different to those resulting from a fast wave in plane stress, the behavior in the deviatoric plane is similar as can be seen in figure \ref{fig:fast_path_plane_strains}\subref{subfig:fastDP_dev}.
Indeed, the fact that the computed loading paths through a fast wave is parallel to the initial yield surface is obvious when looking at the deviatoric plane.
More specifically, the von-Mises circle is traced by the integral curve even when the shear component $\sigma_{12}$ is zero (see paths $1$ and $6$ in figure \ref{fig:fast_path_plane_strains}).
Notice that the integration of the loading path in the plane $\sigma_{12}=0$ is here possible contrary to the plane stress.
The integral curves of figure \ref{fig:fast_path_plane_strains} however exhibit a cusp which is not explained (see the two external arrows pointing toward axes of pure tensile/compression).
%Nevertheless, the results of figure \ref{fig:fast_path_plane_strains} must be taken carefully since the loading paths exhibits a cusp that is not explained so far (see the two external arrows pointing toward axes of pure tensile/compression).

%% For slow waves, integrated by driving with a decreasing \tau yields an increasing celerity (it goes for fast waves driven with tau in plane stress)
On the other hand, some loading paths resulting from the integration of slow wave ODEs are depicted in figures \ref{fig:slow_path_plane_strains1}, \ref{fig:slow_path_plane_strains2} and \ref{fig:slow_path_plane_strains3}.
Analogously to the plane stress case, three initial values $\sigma_{22}=-1.3 \times 10^{8} \: Pa$, $\sigma_{22}=0$ and $\sigma_{22}=1.3 \times 10^8 \: Pa$ are considered since a fast wave may modify the initial free-stress state.
The integration of loading paths through slow waves in plane strain is performed by using $\sigma_{12}$ as a driving parameter.
However, numerical difficulties arise owing to the characteristic speed associated with slow waves which start increasing rather than decreasing at some point along the path.
In order to circumvent this issue, the last stress state leading to a decreasing celerity is used as an initial condition for a second integration driven by means of $\sigma_{11}$.
The final value is set so that the variation of $\sigma_{11}$ (\textit{i.e increasing or decreasing}) undergone up to that singularity is continued.
This strategy allows carrying on the integration further.
Nevertheless, the same problem of increasing characteristic speed again occurs and the computation must be aborted.
\begin{figure}[h!]
  \centering
  \subcaptionbox{Projections of loading paths in ($\sigma_{11},\sigma_{12}$) and ($\sigma_{22},\sigma_{12}$) planes \label{subfig:slowDP_stress1}}{\input{chapter5/pgfFigures/DPslowWaves1.tex}}
  \subcaptionbox{Loading path in the deviatoric plane \label{subfig:slowDP_dev1}}{\input{chapter5/pgfFigures/DPslowWaves_deviator1.tex}}
  \caption{Loading paths through slow simple waves for different starting points on the initial yield surface for the initial condition $\sigma_{22}=-1.3 \times 10^{8} \: Pa$.}
  \label{fig:slow_path_plane_strains1}
\end{figure}
The integral curves depicted in figure \ref{fig:slow_path_plane_strains1} results from the negative initial value $\sigma_{22}=-1.3 \times 10^{8} \: Pa$ for several starting points on the initial yield surface.

Whereas $\sigma_{11}$ varies little as shown by the projection of the path in the ($\sigma_{11},\sigma_{12}$) plane, this is not the case for $\sigma_{22}$ (see figure \ref{fig:slow_path_plane_strains1}\subref{subfig:slowDP_stress1}).
Indeed, the projections of the integral curves in the ($\sigma_{22},\sigma_{12}$) plane exhibit complex paths similar to those obtained for plane stress.
In contrast, it can be seen in figure \ref{fig:slow_path_plane_strains1}\subref{subfig:slowDP_dev1} that the paths first follow the initial yield surface and next a direction of pure shear in the deviatoric plane, which differs from plane stress solutions.
Even though the paths for plane stress and plane strain have similar shapes in the stress space, one cannot expect the same observations in the deviatoric plane due to the out-of-plane stress component.
%The fact that the curves have the same shape in stress space and not in the deviatoric plane can be explained by the out-of-plane stress that is zero are not.
Namely, the loading paths are restricted to the $(\sigma_1,\sigma_2)$ plane under plane stress, while they can take values in the whole space ($\sigma_1,\sigma_2,\sigma_3$) under plane strain.

The same behavior is observed in figures \ref{fig:slow_path_plane_strains2} and \ref{fig:slow_path_plane_strains3} which respectively show the loading paths resulting from the zero and the positive initial values of $\sigma_{22}$.
\begin{figure}[h!]
  \centering
  % \subcaptionbox{Projections of loading paths in ($\sigma_{11},\sigma_{12}$) and ($\sigma_{22},\sigma_{12}$) planes \label{subfig:slowDP_stress2}}{\input{chapter5/pgfFigures/DPslowWaves2.tex}}
  % \subcaptionbox{Loading path in the deviatoric plane \label{subfig:slowDP_dev2}}{\input{chapter5/pgfFigures/DPslowWaves_deviator2.tex}}
  {\input{chapter5/pgfFigures/DPslowWaves2.tex}}
  {\input{chapter5/pgfFigures/DPslowWaves_deviator2.tex}}
  \caption{Loading paths through slow simple waves for different starting points on the initial yield surface for the initial condition $\sigma_{22}=0$.}
  \label{fig:slow_path_plane_strains2}
\end{figure}
\begin{figure}[h!]
  \centering
  % \subcaptionbox{Projections of loading paths in ($\sigma_{11},\sigma_{12}$) and ($\sigma_{22},\sigma_{12}$) planes \label{subfig:slowDP_stress3}}{\input{chapter5/pgfFigures/DPslowWaves3.tex}}
  % \subcaptionbox{Loading path in the deviatoric plane \label{subfig:slowDP_dev3}}{\input{chapter5/pgfFigures/DPslowWaves_deviator3.tex}}
  {\input{chapter5/pgfFigures/DPslowWaves3.tex}}
  {\input{chapter5/pgfFigures/DPslowWaves_deviator3.tex}}
  \caption{Loading paths through slow simple waves for different starting points on the initial yield surface for the initial condition $\sigma_{22}=1.3 \times 10^{8} \: Pa$.}
  \label{fig:slow_path_plane_strains3}
\end{figure}
Nevertheless, the integral curves in figure \ref{fig:slow_path_plane_strains2} reveal that numerical issues occur "faster" than in the previous case.
Indeed, the characteristic speeds quickly start increasing so that the stress paths depicted are short.
Furthermore, the projection in the ($\sigma_{22},\sigma_{12}$) plane of the integral curves $2$ and $3$ show that the slow wave mainly influences $\sigma_{22}$.
The projections in the deviatoric plane in figure \ref{fig:slow_path_plane_strains2} however show that the stress paths first follow the initial yield surface until the direction of pure shear is reached, and next follow the radial direction.
In addition, considering figures \ref{fig:slow_path_plane_strains1}, \ref{fig:slow_path_plane_strains2} and \ref{fig:slow_path_plane_strains3}, it can be seen that if the initial condition on $\sigma_{11}$ is greater than the value corresponding to the maximum shear stress on the initial yield surface, $\sigma_{22}$ increases along the loading path.
Conversely, $\sigma_{22}$ decreases along the loading path if $\sigma_{11}$ is initially lower than the value that corresponds to the maximum shear stress on the initial yield surface.
%In addition, considering figures \ref{fig:slow_path_plane_strains1}, \ref{fig:slow_path_plane_strains2} and \ref{fig:slow_path_plane_strains3}, it can be seen that the loading paths in $(\sigma_{22},\sigma_{12})$ plane lead to an increasing $\sigma_{22}$ if the initial condition is such that $\sigma_{11}$ is greater than this corresponding to the maximum shear on the initial yield surface in projection in the $(\sigma_{11},\sigma_{12})$ plane.
%Conversely, an initial condition $\sigma_{11}$ lower than that associated to the maximum shear stress on the initial yield surface in the plane $(\sigma_{11},\sigma_{12})$ results in a decreasing $\sigma_{22}$ along the integral curves.
Note that the same goes for $\sigma_{11}$.
Thus, it seems that the property $\sign(d\sigma_{22})=\sign(d\sigma_{11})$ holds along the loading paths followed inside a slow simple wave in plane strain, though this has not been proved mathematically.

Generally speaking, it appears that for the ranges of stress considered here, the hardening of the material is mainly due to slow simple waves for plane strain cases.
Indeed, the latter may lead to radial loading paths that greatly increase the radius of the von-Mises cylinder in principal stress space, whereas the integral curves corresponding to fast waves are restricted to the initial yield surface. Notice, however, that the above results have been obtained by using a rather low hardening modulus.

%If on the other hand, the hardening parameter is raised to $C=1\times10^{10} \: Pa$, the loading paths slightly differ.
%To illustrate this, the same plane strain problems as before are considered by using the same driving parameters and initial conditions for both fast and slow waves.
%The resulting integral curves are here depicted in the deviatoric plane only in order to highlight particular behaviors.
The curves resulting from the use of the hardening parameter $C=1\times10^{10} \: Pa$ exhibit slight differences.
First, the integral curves of fast waves are depicted in figure \ref{fig:fast_H}.
As before, the integral curves follow the initial yield surface but then branch off to reach a direction of pure tensile/compressive loading.
\begin{figure}[h!]
  \centering
  \input{chapter5/pgfFigures/DPfastWaveH_deviator0.tex}
  \caption{Fast simple wave solutions of the plane strain problem $C=1\times10^{10} \: Pa$.}
  \label{fig:fast_H}
\end{figure}
Moreover, the visible cusps in the loading paths $2$, $3$, $4$ and $5$, which already arise in the solutions based on a lower hardening modulus, indicate that the path followed inside fast waves converges to a direction of pure tension/compression under plane strain.

The increase in hardening parameter also allows the elimination of the integration issues that occur for a lower one.
As a result, the stress paths followed inside slow simple waves depicted in figure \ref{fig:slow_H} lead to stress states lying further outside of the initial elastic domain.
\begin{figure}[h!]
  \centering
  {\phantomsubcaption \label{subfig:slow_H1}}
  {\phantomsubcaption \label{subfig:slow_H2}}
  {\phantomsubcaption \label{subfig:slow_H3}}
  \input{chapter5/pgfFigures/DPslowWaves_H}
  \caption{Slow simple wave solutions of the previous problem with $C=1\times10^{10} \: Pa$.}
  \label{fig:slow_H}
\end{figure}
Moreover, for every initial value of $\sigma_{22}$ considered in the figures \ref{fig:slow_H}\subref{subfig:slow_H1}, \ref{fig:slow_H}\subref{subfig:slow_H2} and \ref{fig:slow_H}\subref{subfig:slow_H3}, the slopes of the integral curves no longer break but smoothly vary to reach the direction of pure shear in the deviatoric plane.

\begin{remark}
  The use of a higher hardening parameter for slow waves under plane stress also leads to smoother paths in the deviatoric plane.
  On the other hand, the integral curves associated with the fast waves under plane stress (slightly) move away from the yield surface up to a direction of pure shear.
  Nevertheless, at that point numerical difficulties occur due to the indeterminacy of the loading functions already mentioned.
\end{remark}
%%%% REMARQUES A LA VOLEE
% It is shown in \cite{Ting73} that the plastic celerities only depends on $\tens{\sigma}/\norm{\tens{\sigma}}$ so that they are constant along rays of the stress space $(\sigma_{11}, \sigma_{22}, \sigma_{12})$. Thus, look at the loading path along integral curves and see the evolution of celerities.

%%% Local Variables:
%%% mode: latex
%%% ispell-local-dictionary: "american"
%%% TeX-master: "../mainManuscript"
%%% End:


\subsection{Bias of the 2SOLS estimator}


\newpage\section{Linear Algebra}

	\begin{myitemize}
		\item \href{http://yufeizhao.com/olympiad/algcomb.pdf}{Algebraic Techniques - Yufei Zhao}
	\end{myitemize}

	\lem{Multiplication Order}{\[(AB)^T=B^TA^T\]\[ABCD=A(BC)D\]}

	\theo{https://artofproblemsolving.com/community/c6h355915p2270176}{Linear map that reverses the order of multiplication}{Let $F$ be a field, and $m$ a positive integer. The only $F$-linear maps $s:\mathrm{M}_m\left(F\right)\to\mathrm{M}_m\left(F\right)$ which satisfy
		\[s\left(X_kX_{k-1}...X_1\right) = s\left(X_1\right) s\left(X_2\right) ... s\left(X_k\right)\quad \forall k\in\N,\ X_i \in\mathrm{M}_m(F)\]
	are maps of the form $s\left(P\right) = UP^TU^{-1}\quad \forall P\in\mathrm{M}_m\left(F\right)$ for $U$ an invertible $m\times m$ matrix over $F$.}

		\proof{Let $ s $ be a map that satisfies the problem condition. Let $ t $ be another linear map defined by $ t(P)=s(P)^T\quad \forall P\in\mathrm{M}(F) $.

		This map $ t $ also satisfies \[t\left(X_kX_{k-1}...X_1\right) = t\left(X_1\right) t\left(X_2\right) ... t\left(X_k\right)\quad \forall k\in\N,\ X_i \in\mathrm{M}_m(F)\]
		%
		The rest uses advanced algebra :cold\textunderscore sweat: something called \texttt{Noether-Skolem theorem}... maybe later...}

	\prob{https://artofproblemsolving.com/community/c6h355915p1934456}{ISL 2009 C3}{H}{Let $ n $ be a positive integer. Given a sequence $ \varepsilon_1 $ , $ \dots $ , $ \varepsilon_{n - 1} $ with $ \varepsilon_i = 0 $ or $ \varepsilon_i = 1 $ for each $ i = 1 $ , $ \dots $ , $ n - 1 $ , the sequences $ a_0 $ , $ \dots $ , $ a_n $ and $ b_0 $ , $ \dots $ , $ b_n $ are constructed by the following rules:
		\[a_0 = b_0 = 1, \quad a_1 = b_1 = 7,\]
		\[\begin{array}{lll} a_{i+1} = \begin{cases} 2a_{i-1} + 3a_i, \\ 3a_{i-1} + a_i, \end{cases} & \begin{array}{l} \text{if } \varepsilon_i = 0, \\ \text{if } \varepsilon_i = 1, \end{array} & \text{for each } i = 1, \dots, n - 1,

		\\[1.5em] b_{i+1}= \begin{cases} 2b_{i-1} + 3b_i, \\ 3b_{i-1} + b_i, \end{cases} & \begin{array}{l} \text{if } \varepsilon_{n-i} = 0, \\ \text{if } \varepsilon_{n-i} = 1, \end{array} & \text{for each } i = 1, \dots, n - 1. \end{array}\]

		Prove that $ a_n = b_n $.}\label{problem:bijection_3}\label{problem:recursive_solution_3}

	\begin{solution}[Algebraic, darij grinberg]
		We'll first translate the problem in matrix language, then find a linear transformation to prove it.

		\begin{solution_def}
			Let $ M_2(\Q) $ be the ring of $ 2\times 2 $ matrices over the rational numbers.

			Definte two matrices $ A, B \in M_2(\Q) $ by $A=\left(\begin{array}{cc} 3&2\\ 1&0\end{array}\right)$ and $B=\left(\begin{array}{cc} 1&3\\ 1&0\end{array}\right)$.

			For every $i\in\left\{1,2,...,n-1\right\}$, define a matrix $K_i\in \mathrm{M}_2\left(\mathbb Q\right)$ by \[K_i=\varepsilon_i B + \left(1-\varepsilon_i\right) A\]This clearly yields that $K_i=A$ if $\varepsilon_i=0$, and that $K_i=B$ if $\varepsilon_i=1$.

			For every $i\in\left\{1,2,...,n-1\right\}$, we have $\left(\begin{array}{c} a_{i+1}\\ a_i\end{array}\right) = K_i \left(\begin{array}{c} a_{i}\\ a_{i-1}\end{array}\right)$. By induction we have
			\[\left(\begin{array}{c} a_{n}\\ a_{n-1}\end{array}\right) =K_{n-1}K_{n-2}...K_1\left(\begin{array}{c} 7\\ 1\end{array}\right)\]
			\[a_n=\left(\begin{array}{cc} 1\ 0 \end{array}\right) K_{n-1}K_{n-2}...K_1\left(\begin{array}{c} 7\\ 1\end{array}\right)\]
			%
			We need to prove that
			\[\left(\begin{array}{cc} 1\ 0 \end{array}\right) K_{n-1}K_{n-2}...K_1\left(\begin{array}{c} 7\\ 1\end{array}\right) = \left(\begin{array}{cc} 1\ 0 \end{array}\right) K_1K_2...K_{n-1}\left(\begin{array}{c} 7\\ 1\end{array}\right)\]
		\end{solution_def}

		In order to do this, it is clearly enough to define some map $s : \mathrm{M}_2\left(\mathbb Q\right) \to \mathrm{M}_2\left(\mathbb Q\right)$ which satisfies
		\vspace{-1em}
		\begin{enumerate}
			\itemsep-.5em
			\item $ s\left(K_{n-1}K_{n-2}...K_1\right) = K_1K_2...K_{n-1} $
			\item Every matrix $P\in \mathrm{M}_2\left(\mathbb Q\right)$ satisfies $\left(\begin{array}{cc} 1&0 \end{array}\right) P\left(\begin{array}{c} 7\\ 1\end{array}\right) = \left(\begin{array}{cc} 1\ 0 \end{array}\right) s\left(P\right)\left(\begin{array}{c} 7\\ 1\end{array}\right)$
		\end{enumerate}

		Let $U$ be the invertible matrix $\left(\begin{array}{cc} 7&1\\ 1&2\end{array}\right) \in \mathrm{M}_2\left(\mathbb Q\right)$. Let $s : \mathrm{M}_2\left(\mathbb Q\right) \to \mathrm{M}_2\left(\mathbb Q\right)$ be the map defined by \[s\left(P\right) = UP^TU^{-1},\quad \forall P\in M_2(\Q)\]

		It's easy to check with computation that this mapping satisfies (2). We need to show it satisfies (1) too.

		First let's list some properties of $ s $. We have,
		\begin{enumerate}
			\itemsep0em
			\item $ s(I_2)=I_2 $ where $ I_2 $ is the identity matrix.
			\item $ s(XY) = s(Y)s(X) $, trivial by \autoref{lemma:Multiplication Order}
			\item $ s(A)=A \text{ and } s(B)=B $, easy to show with some computation.
			\item It follows that $ s(K_i)=K_i $.
		\end{enumerate}
		(1) trivially follows from these properties. So $ s $ satisfies the problem.
	\end{solution}

	\rem{The above solution followed a rather standard procedure (translating linear recurrences into matrix multiplication - this is the same trick that solves many problems about Fibonacci numbers) until the point where we "guessed" the matrix $U$ and the map $s$. How did we do that?

		The motivation is the following: We need a map $s$ which satisfies (1) and (2). We forget about (2) for a moment, and try to satisfy (1) only.

		The easiest way to ensure that (1) holds for every choice of $n$ and $\varepsilon_1,\varepsilon_2,...,\varepsilon_{n-1}$ is to choose $s$ as a linear map satisfying $s\left(A\right)=A$ and $s\left(B\right)=B$ (this immediately guarantees that $s\left(K_i\right) = K_i$ for every $i$, because $K_i=\varepsilon_i B + \left(1-\varepsilon_i\right) A $ is a linear combination of $A$ and $B$) and satisfying $s\left(X_kX_{k-1}...X_1\right) = s\left(X_1\right) s\left(X_2\right) ... s\left(X_k\right)$ for any $k\in \mathbb N$ and any $2\times 2$ matrices $X_1$, $X_2$, ..., $X_k$.

		This condition $s\left(X_kX_{k-1}...X_1\right) = s\left(X_1\right) s\left(X_2\right) ... s\left(X_k\right)$ is fulfilled, for example, when the map $s$ has the form $s\left(P\right) = UP^TU^{-1}$ for every $P\in\mathrm{M}_2\left(\mathbb Q\right)$ for $U$ an invertible $2\times 2$ matrix. Actually it is fulfilled only in this case, as I explain further below, but as for now let us at least agree that $s\left(P\right) = UP^TU^{-1}$ for every $P\in\mathrm{M}_2\left(\mathbb Q\right)$ is a good point to start.

		So now we are searching for a $2\times 2$ matrix $U$ such that the map $s$ defined by $s\left(P\right) = UP^TU^{-1}$ for every $P\in\mathrm{M}_2\left(\mathbb Q\right)$ satisfies $s\left(A\right)=A$, $s\left(B\right)=B$ and (2). These conditions give linear equations on the entries of this matrix $U$, and the only matrix $U$ which solves all of them is (up to scaling) $\left(\begin{array}{cc} 7&1\\ 1&2\end{array}\right) \in \mathrm{M}_2\left(\mathbb Q\right)$. It is now clear how to proceed from here.}

	\begin{solution}[Bijection, evan chen]
		Let $ A_i=2^ia_i $. So the recursive relations now are:
			\[A_{i+1}=8A_{i-1}+6A_i \text{ or } 12A_{i-1}+2A_i\]
		Now we build a bijective relation. Imagine $ n $ rooms in a row with $ n-1 $ doors, numbered $ \epsilon_i $, between them. We have $ 14 $ colors, $ \{\star, 1, 2, \dots 13\} $ to paint the rooms. So the two sides of the doors will get different coloring, let these two colors be $ i, j $. We need to follow some certain rules:
			\begin{enumerate}
				\itemsep-.4em
				\item If $ i $ is $ \star $, then $ j $ can be any color.
				\item If the door is labeled with $ 0 $, and $ i \in \{\star, j-2, j-1, j, j+1, j+2\} \pmod {13} $
				\item If the door is labeled with $ 1 $, $ i \in \{\star, j\} $.
			\end{enumerate}
		We prove that $ A_i $ is the number of ways the first $ i $ rooms can be painted (and $ B_i $ the number of ways the last $ i $ rooms).

		First, the door between the rooms $ i, i+1 $ was labeled $ 0 $. If $ A_i\ne \star $, then we have $ 6 $ ways to paint $ i+1 $. From there comes $ 6A_i $ ways of painting the first $ i+1 $ rooms. If $ A_i=\star $, then there are $ 14 $ ways of painting $ i+1 $. But $ 6 $ of those ways have already been counted. And the rest of the $ 8 $ new colors will come from $ A_{i-1} $. So $ 8A_{i-1} $ ways from there. In total:
			\[A_{i+1} = 8A_{i-1}+6A_i\]
		And if the door was labeled $ 1 $, then $ 6, 8 $ becomes $ 2, 12 $. And our result follows.
	\end{solution}

	\rem{We first have to settle to search for a bijective solution. So we ask the question, ``$ a_i $'s are the number of ways to do something. How can we define that?''

	Now the coefficients of the recurresions doesn't add up. It would be better if we had them being equal. So we do that, nice and easy.

	So the coefficients now add up to $ 14 $. So for the $ i+1 $-th object, we have $ 14 $ choices, and those choices get divided depending on the choice for the $ i $-th object. From here, it is natural to think about those rules.}

\newpage\section{Double Counting and Other Algebraic Methods}

	\prob{https://artofproblemsolving.com/community/c6h546170p3160563}{ISL 2012 C3}{M}{In a $999 \times 999$ square table some cells are white and the remaining ones are red. Let $T$ be the number of triples $(C_1,C_2,C_3)$ of cells, the first two in the same row and the last two in the same column, with $C_1,C_3$ white and $C_2$ red. Find the maximum value $T$ can attain.}

		\solu{Expicitly count the value, and bound it using ineq...}

\newpage\subsection{Probabilistic Methods}

	\prob{https://artofproblemsolving.com/community/c6h155694p874985}{ISL 2006 C3}{M/E}{Let $ S$ be a finite set of points in the plane such that no three of them are on a line. For each convex polygon $ P$ whose vertices are in $ S$, let $ a(P)$ be the number of vertices of $ P$, and let $ b(P)$ be the number of points of $ S$ which are outside $ P$. A line segment, a point, and the empty set are considered as convex polygons of $ 2$, $ 1$, and $ 0$ vertices respectively. Prove that for every real number $ x$ \[\sum_{P}{x^{a(P)}(1 - x)^{b(P)}} = 1,\] where the sum is taken over all convex polygons with vertices in $ S$.}

		\solu{This can be done by strong induction and double counting. Counting for every possibile subsets with every points inside of the convex hull and at least one point on the convex hull outside of the set.}

		\solu{The beautiful solution on the other hand uses probability. Color each point black or white, then translate the condition in terms of probability. :D}


\documentclass{notes}

\title{Implementation of the Dreicer runaway rate}
\author{Mathias Hoppe}

\usepackage{amssymb}

\newcommand{\Ec}{E_{\rm c}}
\newcommand{\ED}{E_{\rm D}}
\newcommand{\Zeff}{Z_{\rm eff}}

\begin{document}
    \maketitle

    \noindent
    This document describes the details of the Connor-Hastie Dreicer runaway
    rate was implemented \DREAM.

    \section*{Connor-Hastie runaway rate}
    The expression derived by Connor \& Hastie for the Dreicer runaway rate is
    \begin{equation}\label{eq:gammaCH}
        \gamma = C\frac{n_e}{\tau_{ee}} \left( \frac{E}{\ED} \right)^{-\frac{3}{16}(1+\Zeff)h}
        \exp\left[-\lambda\frac{\ED}{4E} - \sqrt{\eta\frac{(1+\Zeff)\ED}{E}} \right],
    \end{equation}
    where $C$ is an undetermined constant (which we will set to 1\footnote{
    According to Ola, this is the value obtained from simulations.}), $n_e$ is
    the electron density, $\tau_{ee}$ is the thermal electron-electron collision
    time, $\Zeff$ is the plasma effective charge. The coefficients $\lambda$,
    $\eta$ and $h$ all approach unity when $E\gg E_{\rm c}$, and the option
    \texttt{DREICER\_RATE\_CONNOR\_HASTIE\_NOCORR} sets $\lambda=\eta=h=1$.
    In general, these coefficients are given by
    \begin{equation}
        \label{eq:gammaCH_var}
        \begin{aligned}
            \lambda &= 8\frac{E^2}{\Ec^2}\left[ 1-\frac{\Ec}{2E}-\sqrt{1-\frac{\Ec}{E}} \right],\\
            \eta &= \frac{1}{4}\frac{E^2/\Ec}{E/\Ec-1}\arccos^2\left( 1-\frac{2\Ec}{E} \right),\\
            h &= \frac{1}{3}\frac{1}{E/\Ec-1}\left[ \frac{E}{\Ec}+
                2\left(\frac{E}{\Ec}-2\right)\sqrt{\frac{E/\Ec}{E/\Ec-1}} - \frac{\Zeff-7}{\Zeff+1}
            \right].
        \end{aligned}
    \end{equation}
    The Dreicer field $\ED$ and Connor-Hastie threshold field $\Ec$ are given by
    \begin{align}
        \ED &= \frac{n_e e^3\ln\Lambda}{4\pi\epsilon_0^2 T_e},\\
        \Ec &= \frac{n_e e^3\ln\Lambda}{4\pi\epsilon_0^2 m_ec^2} = \ED\frac{T_e}{m_ec^2}.
    \end{align}

    \subsection*{Derivatives}
    When implementing the runaway rate, we also need to evaluate as many of its
    partial derivatives as possible in order to build the Jacobian for the
    equation system. The runaway rate $\gamma$ is most sensitive to the
    quantity $E/\ED$, and so we can focus on the derivatives with respect
    to $E$, $n_e$ and $T_e$ which affect $E/\ED$. Further, in order to avoid the
    complex dependencies on various quantities in the expressions for $\lambda$,
    $\eta$ and $h$, we will differentiate the runaway rate as if these
    coefficients were all set to one (even when the full expressions are used).

    Differentiating $\gamma$ with respect to the main parameters $E$, $n_e$,
    $T_e$ which we solve for in \DREAM, we find that
    \begin{equation}
        \begin{aligned}
            \frac{\partial\gamma}{\partial E} &\approx
                \frac{\partial x}{\partial E}\frac{\partial\gamma}{\partial x} =
                \frac{x}{E}\frac{\partial\gamma}{\partial x},\\
            %
            \frac{\partial\gamma}{\partial n_e} &\approx \frac{\gamma}{n_e} +
                \frac{\partial x}{\partial n_e}\frac{\partial\gamma}{\partial x} =
                \frac{\gamma}{n_e} - \frac{x}{n_e}\frac{\partial\gamma}{\partial x},\\
            %
            \frac{\partial\gamma}{\partial T_e} &\approx
                \frac{\partial x}{\partial T_e}\frac{\partial\gamma}{\partial x} =
                \frac{x}{T_e}\frac{\partial\gamma}{\partial x},
        \end{aligned}
    \end{equation}
    where we used that $\partial(1/\ED)/\partial n_e = -1/n_e\ED$ and
    $\partial(1/\ED)/\partial T_e = 1/T_e\ED$. This means that by only
    evaluating one derivative analytically we can easily retrieve the three
    derivatives of physical quantities which we are most interested. The
    derivative of $\gamma$ with respect to $x=E/\ED$ is given by
    \begin{equation}
        \begin{aligned}
            \frac{\partial\gamma}{\partial x} &=
                \frac{Cn_e}{\tau_{ee}}x^{-\frac{3}{16}(1+\Zeff)h}
                \exp\left[ -\frac{\lambda}{4x} - \sqrt{\eta\frac{1+\Zeff}{x}} \right]
                \left( \frac{3}{16}\frac{(1+\Zeff)h}{x} + \frac{\lambda}{4x^2} +
                \frac{1}{2x}\sqrt{\eta\frac{1+\Zeff}{x}}\right) =\\
            %
            &= \frac{\gamma}{x}\left(
                \frac{3}{16}(1+\Zeff)h + \frac{\lambda}{4x} +
                \frac{1}{2}\sqrt{\eta\frac{1+\Zeff}{x}}
            \right).
        \end{aligned}
    \end{equation}
    (again keeping $\lambda=\eta=h=1$).

\end{document}


%% \section{Delta Dictionaries}
\section{Implementation}
\label{sec:DD}

\input{fig-dd-example-all}

Our implementation of delta dictionaries and corresponding proofs are formalized in Agda and available in the anonymous supplementary materials.

%% \subsection{Delta Indexing}
%% \subsection{Key Types and Deltas}
\subsection{Deltas and Key Types}

Borrowing from association lists, \dds{} use a list-of-pairs, where the first item in each list represents a key and the second is the literal value that is mapped to the represented key.
%
Unlike association lists, the natural number that represents the key is not its literal value.

In order to allow multiple key types, while relying on useful properties of natural numbers under the hood, \dds{} accept a typeclass argument representing a bijection
%
between the key type and the naturals, and use this bijection to convert keys to and from naturals. This is discussed further in \emph{\textbf{Bijections to Natural Numbers}}.

In order to maintain canonical order, while ensuring that every natural number is valid as the first item in a pair, that number must be the non-negative difference between the key it represents and the previous key.
%
We call this number a \emph{delta}. % , alluding to the \emph{delta encoding} technique more commonly harnessed for performance optimization.
%
As described so far, a $0$ offset would correspond to a duplicate key.
%
To prevent duplicate keys from being represented, a delta is actually the offset minus $1$: a delta of $0$ indicates an offset (from the previous key) of $1$, a delta of $2$ indicates an offset of $3$, and so on.
%
The head of the list, however, does not follow the ``minus $1$'' rule: so the first ``delta'' is interpreted literally, \ie{}~it represents the key value exactly.

\autoref{fig:dd-example} depicts the \dd{} corresponding to the example from \autoref{sec:Introduction}.

%% \subsection{Bijections to the naturals}
%% \label{sec:DD:bij}
\parahead{Bijections to Natural Numbers}

In our implementation, each key is represented by a natural number, so that we can use addition, subtraction, and successor operations in order to define deltas.
%
There may be an algebraic structure more general than the natural numbers which satisfies these requirements, but for practical purposes, working with naturals
%
is easier for both the implementer and the client. In Agda, the bijection typeclass accepts a \texttt{convert} function (for clarity, the code in this paper uses the synonym \texttt{toNat}), as well as proofs that \texttt{convert}
%
is injective and surjective, and the inverse function is defined by the library using the proof of surjectivity.\footnote{\hspace{0.01in}%
%
Without surjectivity, a binding for an unmapped natural either invalidates the \dd---violating \Total---or is ignored, in which case its presence or absence does not affect the semantic meaning---violating \Extensional.
%
}
%
We demonstrate this in Agda by
%
providing an instance of the bijection typeclass for integers ($25$ lines of code).

Most types that are suitable for use as keys in the first place, especially strings and countable numeric types, can be bijected to the naturals,
%
though doing so may be onerous. Finite types, such as characters, are suitable as keys, but cannot be bijected to the naturals---%
%
simultaneously achieving \Total{} and \Extensional{} for a dictionary over finite types may require a custom-made dictionary data type.

\Ddls{} are canonically ordered, but by the natural ordering of the naturals, which, depending on the choice of bijection, may correspond to an unnatural
%
ordering of the key type. As such, we do not expose the ordering to the client---functions such as \texttt{destruct} and \texttt{dlt$\Rightarrow$list} produce results
%
that are in arbitrary order from the client's perspective.

%%, and so from the client's perspective, the \dd{} is unordered.

\subsection{Lookup, Insertion, and Destruction}
\label{sec:DD:basics}

\input{fig-agda}

\autoref{fig:dd-example-find} and \autoref{fig:dd-example-insert} illustrate example lookup and insert operations.
%
These proceed largely as they would for association lists, but working indirectly with keys encoded as natural numbers and, furthermore, differences between these numbers.

\autoref{fig:agda} presents concrete implementations for lookup (\ie{} \texttt{\_\altLAng\_\altRAng}), insert (\ie{} \texttt{\_,,\_}), and \texttt{destruct} in Agda.
%
Notice that we parameterize the \texttt{Delta} module by key type \verb+K+ and bijection \verb+bij+ to the naturals; the operations are parameterized by value type \verb+V+.
%
%Having to treat the first delta differently than the rest (literally rather than relatively) is the source of the somewhat technical---through simple---details.
%
The type \verb+DL+ describes the raw ``delta lists'' used internally, which are wrapped by the \verb+DD+ datatype exposed to clients.

The helper function \verb+delta+ computes the delta, \ie{} the offset minus $1$, between two distinct numbers.
%
Given that, lookup is straightforward. The insert function is also fairly straightforward.
%
If the delta to insert is less than the delta of the first pair, then we place the delta to insert as the first pair of the new list, and
%
the original first pair will be the second pair of the new list, but using the delta between its original value and the inserted delta.
%
If the first pair is an exact match, then we simply replace the old value with the new one.
%
\verb+destruct+ simply pops the head off the list, and then augments the next key by the offset.

%% \cite[Facts about weak maps]{FMapFacts}
%
The Coq Standard Library~\citep{FMapInterface,FMapFacts} describes key metatheory about dictionaries, including that for lookup and insert (it does not define \verb+destruct+).
%
Our Agda mechanization proves the relevant subset of this metatheory. Some of the metatheory in the Coq treatment involves concepts not relevant to our treatment,
%
especially multiple distinct notions of equality. Also, since we do not expose mapping order to the client via our interface,
%
we do not prove any of the theorems pertaining to ordering (\ie{} those that are not ``weak'').

\subsection{Additional Operations}

Our Agda mechanization also defines key deletion, union, map, and to/from-list operations, along
with appropriate metatheory (not reproduced here).

%% \subsection{Core properties}
%% \section{Properties}
\subsection{Properties}
\label{sec:DD:props}

We now consider properties about delta dictionaries, starting with the four design goals identified in \autoref{sec:Introduction}.
%
Theorems below are proven in Agda.
%
Recall that key type \verb+K+ is a module parameter and is implicitly bound in the type \verb+DD V+.

% The \SemInj~ and \EqDec~ theorems, a destruction theorem, and analogs to the \emph{structural properties} \emph{contraction} and \emph{exchange} are defined below, and proven in Agda.

%% \subsection{Design Goals}
%% \parahead{Design Goals}

\begin{remark}[\SemTot]
%
\textnormal{This property cannot be formally defined---rather its truth is apparent from the fact that the other theorems do not require their \dd~ arguments to be refined with validity premises.}
%
\end{remark}

\begin{theorem}[\SemInj]
\label{thm:SemInj}
\justIndent
\begin{alltt}
  \altFAll\{V\} \{dd1 dd2 : DD V\} \altRArr
    ((k : K) \altRArr dd1 \altLAng k \altRAng == dd2 \altLAng k \altRAng) \altRArr
    dd1 == dd2
\end{alltt}
\end{theorem}

\begin{theorem}[\EqDec]
\label{thm:EqDec}
\justIndent
\begin{alltt}
  \altFAll\{V\} (dd1 dd2 : DD V) \altRArr
    ((v1 v2 : V) \altRArr v1 == v2 \altOr v1 \altNE v2) \altRArr
    dd1 == dd2 \altOr dd1 \altNE dd2
\end{alltt}
\end{theorem}

%% \begin{theorem}[\EzDstr]
\begin{theorem}[Not-So-Easy Destructibility]
\label{thm:EzDstr}
\justIndent
\begin{alltt}
  \altFAll\{V\} \{dd dd' : DD V\} \{k : K\} \{v : V\} \altRArr
    (destruct dd == None \altRArr dd == \altEmpty)
      \altAnd
    (destruct dd == Some ((k , v) , dd') \altRArr
      (k \altNIn dd' \altAnd dd == dd' ,, (k , v))
\end{alltt}
\end{theorem}

%% \subsection{Contraction and Exchange}
%% \parahead{Contraction and Exchange for Dictionaries}

%\rkc{Two common properties for PL metatheory.}

\noindent
%
We discuss why destruction is ``not-so-easy'' in \autoref{sec:Discussion:Tradeoffs}.

Lastly, we prove analogs to the \emph{structural properties} \emph{contraction} and \emph{exchange}.

% The \SemInj~ and \EqDec~ theorems, a destruction theorem, and analogs to the \emph{structural properties} \emph{contraction} and \emph{exchange} are defined below, and proven in Agda.

\pagebreak %% SPACING HACK: TODO check whether this is needed after final edits

\begin{theorem}[Dictionary Contraction]
\label{thm:cont-dicts}
\justIndent
\begin{alltt}
  \altFAll\{V\} \{dd : DD V\} \{k : K\} \{v v' : V\} \altRArr
    dd ,, (k , v') ,, (k , v) == dd ,, (k , v)
\end{alltt}
\end{theorem}

\begin{theorem}[Dictionary Exchange]
\label{thm:exch-dicts}
\justIndent
\begin{alltt}
  \altFAll\{V\} \{dd : DD V\} \{k1 k2 : K\} \{v1 v2 : V\} \altRArr
    k1 \altNE k2 \altRArr
    dd ,, (k1 , v1) ,, (k2 , v2) ==
    dd ,, (k2 , v2) ,, (k1 , v1)
\end{alltt}
\end{theorem}