%The standard model of particle physics is a quantum field theory which describes three of the four known fundamental forces and all known elementary particles.
%The SM describes the electromagnetic, strong, and weak interactions, but does not provide a description of gravity.
As previously mentioned, the standard model of particle physics is a quantum field theory which describes three of the four known fundamental forces: electromagnetic, weak, and strong.
In particular, the SM is a gauge field theory, meaning its Lagrangian is invariant under certain local transformations.
Gauge fields are discussed in greater detail in Sec.~\ref{sec:theory_gauge}.
In Sec.~\ref{sec:theory_qed}, we will see that imposing local gauge invariance on the Dirac Lagrangian gives rise to quantum electrodynamics.
Sec.~\ref{sec:theory_qcd} describes the strong interaction and Sec.~\ref{sec:theory_ssbhm} illustrates how spontaneous symmetry breaking and the Higgs mechanism allow for massive gauge fields, enabling us to describe the weak interaction in Sec.~\ref{sec:theory_ewk}.
%Sec.~\ref{sec:theory_qcd} describes the strong interaction and Sec.~\ref{sec:theory_ewk} describes the electroweak interaction, the unification of the electromagnetic and weak interactions.
%Finally, in Sec.~\ref{sec:theory_ssbhm} we will see how the Higgs mechanism allows for massive gauge fields and subsequently generates the masses of the gauge bosons and fermions.

\subsection{Gauge Fields} \label{sec:theory_gauge}
For an arbitrary Lagrangian made of a single field variable $\psi$, suppose we impose that its resulting field equations be invariant under the local phase transformation
\begin{equation} \label{eqn:local_phase}
    \psi \to e^{i q \theta(x)} \psi.
\end{equation}
This is deemed a ``local'' phase transformation as the phase $\theta$ is be a function of $x^\mu$.
In the case that $\theta$ is a constant, we deem this a ``global'' phase transformation.
A Lagrangian that is invariant under the transformation in Eqn.~\ref{eqn:local_phase} is said to be \emph{gauge invariant}.
More generally, theories which are invariant under gauge transformations are called \emph{gauge theories}.
As Sec.~\ref{sec:theory_qed} will show, quantum electrodynamics is an abelian gauge theory under the symmetry group U(1), with a single gauge field.
The SM as a whole is a non-abelian gauge theory under the symmetry group U(1) $\times$ SU(2) $\times$ SU(3), with a total of twelve gauge fields corresponding to the spin-1 bosons: the photon, the three massive weak bosons, and the eight gluons.

Gauge theories are particularly attractive from a theoretical standpoint for several reasons.
First, demanding gauge invariance seems reasonable a priori -- the transformation in Eqn.~\ref{eqn:local_phase} is simply a change in the coordinate system we use to define the field $\psi$, and the physics of the universe should be independent of the particular choice of coordinates we use to describe it.
Second, gauge theories have been proven to be renormalizable~\cite{tHooft:1971qjg}, also a reasonable requirement for a theory we hope will describe the universe.

Renormalization refers to the technique by which a quantum field theory is ``cut off'' above some very high energy scale $\Lambda$, above which the theory is assumed to no longer be valid.
In general, this is motivated by the presence of infinities in perturbative calculations of decay rates and cross sections.
Rather than assume these infinities render the Lagrangian a useless description of our universe, renormalization serves as a way of quantitatively applying the qualitative statement that the Lagrangian is a low-energy approximation of a more fundamental theory.
By formalizing the idea that the theory is only valid up to a certain energy scale, we are able to avoid the presence of infinities in the calculation of decay rates and cross sections.

\subsection{Quantum Electrodynamics} \label{sec:theory_qed}
Starting with the Dirac Lagrangian (Eqn.~\ref{eqn:dirac_lagrangian}), suppose we impose that its resulting field equations must be invariant under a local phase transformation (as given by Eqn.~\ref{eqn:local_phase}).
Initially, the Dirac Lagrangian is not invariant under the local phase transformation, as an extra term from the derivative of $\theta$ appears:
\begin{equation} \label{eqn:ld_var}
    \mathcal L \to \mathcal L - q (\partial_\mu \theta)\bar{\psi} \gamma^\mu \psi.
\end{equation}
The situation can be remedied with the introduction of a vector field $A_\mu$ which transforms under Eqn.~\ref{eqn:local_phase} as
\begin{equation} \label{eqn:local_phase_field}
    A_\mu \to A_\mu + \partial_\mu \theta.
\end{equation}
The resulting Lagrangian,
\begin{equation} \label{eqn:ld_inv}
    \mathcal L = \mathcal L_{\text{Dirac}} + q \bar{\psi} \gamma^\mu \psi A_\mu
\end{equation}
is gauge invariant as the second term in Eqn.~\ref{eqn:ld_inv} cancels exactly with the additional term from the transformation to the field $A_\mu$ in Eqn.~\ref{eqn:local_phase_field}.

Frequently this additional field is absorbed into the definition of a \emph{covariant derivative}
\begin{equation}
    \mathcal D_\mu \equiv \partial_\mu + i q A_\mu
\end{equation}
which replaces the original definition of the derivative, and the resulting field equations are then invariant under local phase transformations, as desired.

The vector field $A_\mu$ which has been added to the Lagrangian implies the existence of an associated spin-1 particle.
In principle, we must also include a free term for the field $A_\mu$: it is natural to start with the Proca Lagrangian (Eqn.~\ref{eqn:proca_lagrangian}) which describes the dynamics of free spin-1 particles.
It can be shown~\cite{Griffiths:2008zz} that the mass term in the Proca Lagrangian is not invariant under Eqn.~\ref{eqn:local_phase_field}: this can be interpreted as a requirement that this new vector field $A_\mu$ must be massless.
The full Lagrangian becomes
\begin{align}
    \mathcal L_{\text{QED}} &= \bar{\psi}(i \gamma_\mu \partial_\mu - m) \psi - \frac{1}{4} F^{\mu\nu}F_{\mu\nu} + q (\bar{\psi}\gamma^\mu \psi)A_\mu, \\
                            &= \bar{\psi}(i \gamma_\mu \mathcal D_\mu - m)\psi - \frac{1}{4} F^{\mu\nu}F_{\mu\nu}
\end{align}
with $F^{\mu\nu} = \partial^\mu A^\nu - \partial^\nu A^\mu$, which can be identified as the Lagrangian for quantum electrodynamics.
The field $A_\mu$ is associated with the photon, the constant $q$ with the charge of the electron, the tensor $F^{\mu\nu}$ with the electromagnetic field strength, and interactions between photons and electrons with the trilinear term $q (\bar{\psi}\gamma^\mu \psi)A_\mu$.

It is instructive to reflect on the implications of demanding gauge invariance: we started with a spinor field characterized by the Dirac Lagrangian, as would be natural to do in attempting to describe the behavior of electrons.
Next, by simply requiring that the equations of motion be invariant under changes in the coordinate system used to describe the field (i.e. demanding gauge invariance), we see that there must be an accompanying massless vector field which interacts with the spinor field, which we identify as the photon field.
This is truly remarkable: we have inferred the existence of photons just by demanding that the behavior of electrons be independent of the choice of coordinate system used to describe their field.

\subsection{Quantum Chromodynamics} \label{sec:theory_qcd}
As Sec.~\ref{sec:pp_parton_model} details, inelastic scattering experiments in the 1960s gave strong evidence of the composite nature of protons.
Zweig~\cite{Zweig:1964jf} and Gell-Mann~\cite{GellMann:1964nj} independently proposed a quark model to describe the composite nature, which initially implied that quarks violate the spin-statistics theorem.
The remedy to this came in the proposal~\cite{Greenberg:1964pe} that each quark comes in three different \emph{colors}.
More formally, this is the statement that quarks are assigned to the fundamental representation $SU(3)$, giving rise to a quantum number which has three states which we (arbitrarily) call \emph{red}, \emph{green}, and \emph{blue}.

In attempting to construct the Lagrangian for quantum chromodynamics (QCD), which describes the strong interaction of quarks, we can again begin with the free Dirac Lagrangian for spin-1/2 particles (Eqn.~\ref{eqn:dirac_lagrangian}).
Given that we have three distinct colors of each quark, the free Lagrangian for a particular flavor is actually a sum of three free Dirac Lagrangians.
This is simplified with the notation
\begin{equation}
    \psi = \begin{bmatrix}
        \psi_r \\
        \psi_b \\
        \psi_g \\
    \end{bmatrix},
    \quad\bar{\psi} = [\bar{\psi}_r ~\bar{\psi}_b ~\bar{\psi}_g]
\end{equation}
in which the spinor $\psi$ from the original Dirac Lagrangian has now been promoted to a three-component column vector.
The single-particle Dirac Lagrangian is invariant under global phase transformations; in other words, it has $U(1)$ invariance.
Similarly, the three-particle Dirac Lagrangian has $U(3)$ invariance:
\begin{equation} \label{eqn:u3_global}
    \psi \to U \psi, \quad \bar{\psi} \to \bar{\psi}U^\dagger
\end{equation}
with $U$ any unitary $3 \times 3$ matrix\footnote{A matrix $U$ is said to be \emph{unitary} if $U^\dagger U = 1$}.
Whereas in the case of $U(1)$ symmetry, the invariance has the simple interpretation of a phase, the picture is more subtle for $U(3)$.
It can be shown~\cite{Griffiths:2008zz} that any unitary matrix can be written in the form
\begin{equation}
    U  = e^{i \theta} e^{i \bf{\lambda} \cdot \bf{a}}
\end{equation}
with
\begin{equation}
    \bf{\lambda} \cdot \bf{a} = \sum_{i=1}^8 \lambda_i a_i
\end{equation}
and the matrices $a_i$ identified with the eight Gell-Mann matrices which are the generators of the group $SU(3)$.
Following the development of the QED Lagrangian, we again impose the requirement that the Lagrangian not just be invariant under global transformations as described by Eqn.~\ref{eqn:u3_global}, but also local transformations.
In other words, we want $\mathcal L$ to be invariant under local $SU(3)$ gauge transformations:
\begin{equation}
    \psi \to S \psi, \qquad S \equiv e^{-ig\bf{\lambda} \cdot \phi(x)} \text{ and } \phi \equiv - \frac{1}{g_s} \bf{a}
\end{equation}
As in the case of QED, this can be accomplished through the definition of a covariant derivative
\begin{equation}
    \mathcal D_\mu \equiv \partial_\mu + i g_s \bf{\lambda} \cdot \bf{a},
\end{equation}
resulting in the following Lagrangian which is now invariant under local gauge transformations:
\begin{equation}
    \mathcal L = \bar{\psi}(i \gamma_\mu \mathcal D_\mu - m) \psi.
\end{equation}
This time, we have introduced eight gauge fields $\bf{A}^\mu$, corresponding to the eight gluons.

Finally, we must account for the free gluon field.
As before, the mass terms are excluded because they violate local gauge invariance.
However, the field strength tensor for QED, $F^{\mu\nu} = \partial^\mu A^\nu - \partial^\nu A^\mu$, cannot be directly generalized to QCD due to the fact that transformations of $SU(3)$ are non-Abelian.
An additional term is required to restore local gauge invariance, resulting in the QCD field strength tensor
\begin{equation}
    F_{\mu \nu}^a = \partial_\mu A_\nu^a - \partial_\nu A_\mu^a - g_s f^{abc} A_\mu^b A_\mu^c.
\end{equation}
The term $f^{abc}$ corresponds to the SU(3) structure constants and are defined by the commutation relation $[\lambda_a, \lambda_b] = i f^{abc} \lambda_c$.
This has no analog in QED; it allows for self-interaction of gluons.
The full QCD Lagrangian is then given by
\begin{equation} \label{eqn:qcd_lagrangian}
    \mathcal L_{\text{QCD}} = \bigg(\sum_f \bar{\psi}_f (i \gamma_\mu \mathcal D_\mu - m_f) \psi_f \bigg) - \frac{1}{4} F_{\mu \nu}^a F^{a \mu \nu},
\end{equation}
where the sum over $f$ corresponds to the different flavors of quarks, of which six have been experimentally observed.

Unlike in QED, in which the magnitude of the force associated with the free photon field \emph{decreases} with distance, the magnitude of the strong force associated with the free gluon field \emph{increases} as a function of distance.
As a result, particles possessing color charge cannot exist as free particles and are instead confined to bound states of multiple particles which must always be colorless.

\subsection{Spontaneous Symmetry Breaking \& The Higgs Mechanism} \label{sec:theory_ssbhm}
We were able to derive the Lagrangians for the electromagnetic and strong interactions by starting with the Dirac Lagrangian describing free spin-1/2 particles and imposing the principle of local gauge invariance.
This involved the introduction of additional vector fields, with which we are able to associate the mediators of each force: the photon (for QED) and the eight gluons (for QCD).
The fact that the mass term in the Proca Lagrangian is not locally gauge invariant implies that the mediators must be massless; conveniently, photons and gluons are indeed observed to be massless.
Given the success of the method of imposing local gauge invariance for deriving the Lagrangians for the electromagnetic and strong interactions, it is natural to extend the method to the weak interaction.
An immediate challenge, however, is the fact that the mediators of the weak interaction, the $W$ and $Z$ bosons, are not massless.
Local gauge invariance can still be applied to the weak interaction, but it requires reinterpreting the original field variables in a form that allows us to expand about their ground state.
By doing so, we find that symmetries in the original Lagrangian are broken because of the fact that the ground state does not share the symmetry of the original Lagrangian.
This allows for locally invariant massive gauge fields, and as a consequence, implies the presence of a massive scalar particle, which we will identify with the Higgs boson.

Spontaneous symmetry breaking and the Higgs mechanism can be illustrated through a toy Lagrangian composed of a single complex field:
\begin{equation} \label{eqn:spon_orig}
    \mathcal L = \frac{1}{2} (\partial_\mu \phi)^*(\partial^\mu \phi) + \frac{1}{2} \mu^2 (\phi^* \phi) - \frac{1}{4} \lambda^2 (\phi^* \phi)^2, \qquad \phi \equiv \phi_1 + i \phi_2
\end{equation}
In this Lagrangian, the mass term $(1/2) \mu^2 (\phi^* \phi)$ appears to have the wrong sign: naively, a positive coefficient implies that the particle associated with the $\phi$ field has an imaginary mass.
Physically, this does not make sense.
The subtlety lies in the fact that the Feynman calculus is a perturbative procedure, and must be performed by expanding about a system's ground state.
Interpreting $\frac{1}{2} \mu^2 (\phi^* \phi) - \frac{1}{4} \lambda^2 (\phi^* \phi)^2$ as the \emph{potential} term in the Lagrangian, we can expand about its minimum and apply the Feynman calculus.
In contrast to previously considered fields, the minimum does not occur at $\phi_1 = \phi_2 = 0$, but rather is defined by the circle
\begin{equation} \label{eqn:spon_gs}
    \phi_{1_{\text{min}}}^2 + \phi_{2_{\text{min}}}^2 = \frac{\mu^2}{\lambda^2}.
\end{equation}
Choosing $\phi_{1_{\text{min}}} = \mu/\lambda$ and $\phi_{2_{\text{min}}} = 0$, let us next rewrite the Lagrangian in terms of fields which can be treated as fluctuations about the vacuum state, defining
\begin{equation} \label{eqn:spon_gs}
    \eta \equiv \phi_1 - \frac{\mu}{\lambda}, \qquad \xi \equiv \phi_2.
\end{equation}
In terms of these new fields, the Lagrangian becomes
\begin{equation} \label{eqn:spon_transf}
    \mathcal L = \frac{1}{2} (\partial_\mu \eta)(\partial^\mu \eta) - \mu^2 \eta^2 + \frac{1}{2} (\partial_\mu \xi)(\partial^\mu \xi) - \mu \lambda(\eta^3 + \eta \xi^2) - \frac{\lambda^2}{4}(\eta^4 + \xi^4 + 2 \eta^2 \xi^2) + \frac{\mu^4}{4 \lambda^2}.
\end{equation}
The original Lagrangian (Eqn.~\ref{eqn:spon_orig}) was invariant under rotations in $\phi_1, \phi_2$ space\footnote{More precisely, the original Lagrangian is invariant under SO(2)}; however, this rotational symmetry is no longer manifest in the $\eta, \xi$ space.
The continuous SO(2) symmetry has been broken by the choice of a particular ground state.
The particular ground state we chose, $\phi_{1_{\text{min}}} = \mu/\lambda$ and $\phi_{2_{\text{min}}} = 0$, is arbitrary: the system could just as easily choose any other ground state which satisfies Eqn.~\ref{eqn:spon_gs}.
For this reason, we say that the symmetry has been \emph{spontaneously} broken.

Examining Eqn.~\ref{eqn:spon_transf}, we can identify that the particle associated with the $\eta$ field has mass $m_\eta = \sqrt{2} \mu$ and that the particle associated with the $\xi$ field is massless.
In fact, Goldstone's theorem~\cite{Goldstone:1962es} shows that the spontaneous breaking of a continuous global symmetry is associated with one or more massless scalar particles, referred to as \emph{Goldstone bosons}.

Next, let us impose the condition of local gauge invariance on the original Lagrangian, Eqn.~\ref{eqn:spon_orig}, demanding that it be invariant under transformations of the form $\phi \to e^{i \theta(x)} \phi$.
As before, we can introduce a massless gauge field $A^\mu$ and replace derivatives with covariant derivatives to satisfy local gauge invariance.
The Lagrangian becomes
\begin{multline} \label{eqn:spon_full}
    \mathcal L = \frac{1}{2} (\partial_\mu \eta)(\partial^\mu \eta) - \mu^2 \eta^2 + \frac{1}{2} (\partial_\mu \xi)(\partial^\mu \xi)
    - \frac{1}{4} F^{\mu\nu} F_{\mu\nu} + \frac{1}{2} \bigg(\frac{q\mu}{\lambda}\bigg)^2 A_\mu A^\mu \\
    + q \Big[ \eta(\partial_\mu \xi) - \xi (\partial_\mu \eta) \Big] A^\mu + q^2 \frac{\mu}{\lambda} \eta (A_\mu A^\mu)
    + \frac{1}{2} q^2 (\xi^2 + \eta^2)(A_\mu A^\mu) \\
    - \mu \lambda(\eta^3 + \eta \xi^2) - \frac{\lambda^2}{4}(\eta^4 + \xi^4 + 2 \eta^2 \xi^2)
    + \frac{\mu}{\lambda}q (\partial_\mu \xi) A^\mu
    + \frac{\mu^4}{4 \lambda^2}.
\end{multline}
The gauge field $A^\mu$ that we introduced to impose local gauge invariance now has a quadratic term $(1/2) (q\mu)\lambda)^2 A_\mu A^\mu$, which we can associate with a \emph{massive} gauge boson.
A mass term associated with the gauge field $A^\mu$ has appeared because of the fact that we have rewritten the Lagrangian in a form that allows us to expand about its ground state.
In terms of the original $\phi_1$ and $\phi_2$ fields, no mass term for $A^\mu$ appears, but once a ground state has been selected (transforming to $\eta$ and $\xi$ fields) the gauge boson associated with $A^\mu$ acquires mass: spontaneous symmetry breaking generates masses for gauge bosons.

The Lagrangian of Eqn.~\ref{eqn:spon_full} still presents some difficulties in its physical interpretation.
There is a bilinear term proportional to $(\partial_\mu \xi)A^\mu$ which we would interpret as allowing for a $\xi$ particle to suddenly become an $A^\mu$ gauge boson.
This implies that we have not yet fully cast the Lagrangian in a form that makes its physical interpretation apparent and can be solved by choosing a particular gauge.
The Lagrangian of Eqn.~\ref{eqn:spon_orig} is invariant under global U(1) phase transformations $\phi \to e^{i\theta} \phi$.
If we choose $\theta = - \tan^{-1}(\phi_2/\phi_1)$, the transformed field $\phi'$ is real ($\phi'_2 = 0$), implying that $\xi = 0$: the problematic bilinear term has been eliminated by the choice of gauge.

We have shown that a gauge boson can acquire mass through the spontaneous breaking of a continuous global symmetry (the SO(2) symmetry of the complex scalar field $\phi$).
With a proper choice of gauge, we identify a real scalar field $\eta$ and a massive scalar particle associated with this field.
This process by which gauge bosons can acquire mass is known as the \emph{Higgs mechanism}~\cite{Higgs:1964pj,Englert:1964et} and the massive scalar is known as a Higgs boson.

\subsection{Electroweak Interactions} \label{sec:theory_ewk}
The weak and electromagnetic interactions can be unified in a single electroweak interaction, originally developed by Glashow, Weinberg, and Salam~\cite{Glashow:1959wxa,Weinberg:1967tq,Salam:1968rm}.
The GWS theory of weak interactions begins with an $SU(2) \otimes U(1)$ gauge symmetry.
The symmetry is broken spontaneously through the introduction of a scalar field, leading to the generation of masses for the gauge bosons of the $SU(2)$ component and leaving the gauge boson of the $U(1)$ symmetry massless.
The former will be identified as the massive vector gauge bosons, the $W^\pm$ and the $Z$, while the latter be identified as the massless photon.
The particle associated with the scalar field responsible for the spontaneous symmetry breaking will be identified as the Higgs boson.

As before, we demand that the Lagrangian be invariant under local gauge transformations, this time of the form $\phi \to e^{i \alpha^a \tau^a} e^{i \beta/2} \phi$ and define a covariant derivative for $\phi$:
\begin{equation}
    D_\mu \phi = (\partial_\mu - i g A^a_\mu \tau^a - \frac{i}{2} g' B_\mu) \phi, \qquad \tau^a = \sigma^a/2
\end{equation}
where $\sigma^a$ are the Pauli spin matrices, $A^a_\mu$ corresponds to the $SU(2)$ gauge bosons and $B_\mu$ corresponds to the $U(1)$ gauge boson.
With a quartic potential for the scalar field $\phi$, as in the example of Sec.~\ref{sec:theory_ssbhm}, the field has a minimum defined by a circle in the $\phi_1, \phi_2$ plane (with $\phi = \phi_1 + i \phi_2$).
The original $SO(2)$ symmetry of $\phi$ will be spontaneously broken when a particular ground state along this circle is chosen.
Assuming a ground state of $\phi_1 = (1/\sqrt{2})v, \phi_2 = 0$, choosing the gauge $\alpha^1 = \alpha^2 = 0,~\alpha^3 = \beta$, and rewriting the Lagrangian about this field configuration leads to the generation of masses for the bosons of the $A^a_\mu$ field and leaves the boson of the $B_\mu$ field massless.
Expressing the Lagrangian in terms of the ground state, rather than the original field $\phi$, we find that the following terms appear:
\begin{equation}
    \Delta \mathcal L = \frac{1}{2} \frac{v^2}{4} \bigg[ g^2 (A^1_\mu)^2 + g^2 (A^2_\mu)^2 + (g' B_\mu - g A^3_\mu)^2 \bigg].
\end{equation}
Again we see that rewriting the Lagrangian in a way such that it can be expanded about its spontaneously chosen ground state breaks the original symmetry and gives rise to mass terms for the $SU(2)$ gauge field.

The original fields can be expressed in terms of their mass eigenstates, which will make the physical interpretation of this theory more transparent.
It can be shown~\cite{Peskin:1995ev} that these eigenstates are
\begin{align}
    W^\pm_\mu &= \frac{1}{\sqrt{2}} (A^1_\mu \mp i A^2_\mu) \\
    Z^0_\mu &= \frac{1}{\sqrt{g^2 + g'^2}}(g A^3_\mu - g' B_\mu) \\
    A_\mu &= \frac{1}{\sqrt{g^2 + g'^2}}(g'A_\mu^3 + g B_\mu)
\end{align}

The $W^\pm_\mu$ field has vector bosons of mass $m_W = gv/2$, the $Z^0_\mu$ field has a vector boson of mass $m_Z = \sqrt{g^2 + g'^2} v/2$, and the $A_\mu$ field remains massless.
The covariant derivative can be rewritten in terms of the mass eigenstates and the \emph{weak mixing angle}, $\theta_w$, defined as
\begin{equation}
    \begin{pmatrix} Z^0 \\ A \end{pmatrix} =
    \begin{pmatrix} \cos \theta_w & -\sin \theta_w \\ \sin \theta_w & \cos \theta_w \end{pmatrix} \begin{pmatrix} A^3 \\ B \end{pmatrix}.
\end{equation}
As the field $A_\mu$ will be identified as the electromagnetic vector potential, it is helpful to define $e$, which will be identified as the electron charge
\begin{equation}
    e = \frac{gg'}{\sqrt{g^2 + g'^2}}.
\end{equation}
In this notation the covariant derivative becomes
\begin{equation}
    D_\mu \phi = \bigg[ \partial_\mu - i \frac{g}{\sqrt{2}} (W^+_\mu T^+ + W_\mu^- T^-) - i \frac{g}{\cos \theta_w} Z_\mu (T^3 - \sin^2 \theta_w Q) - ieA_\mu Q \bigg] \phi.
\end{equation}

We can next couple the $SU(2) \otimes U(1)$ gauge fields of the electroweak interaction to the leptons and quarks.
As the W boson couples only to the left-handed helicity states of leptons and quarks, it is helpful to decompose the kinetic energy term for fermions into left- and right-handed components:
\begin{equation}
    \bar{\psi} i \gamma^\mu \partial_\mu \psi = \bar{\psi}_L i \gamma^\mu \partial_\mu \psi_L + \bar{\psi}_R i \gamma^\mu \partial_\mu \psi_R,
\end{equation}
so that $\psi_L$ and $\psi_R$ can couple differently to the gauge fields.

The left- and right-handed components of fermion fields couple differently to the gauge fields, they have different quantum numbers and consequently simple mass terms are forbidden by gauge invariance.
Experimentally, we know that the fermions are not massless, so this poses a problem.
Again, spontaneous symmetry breaking can remedy this and allow for fermions to acquire mass.

Assuming the scalar field $\phi$ undergoes spontaneous symmetry breaking (``acquires a vacuum expectation value''), we can add terms to the Lagrangian which describe interactions between $\phi$ and left- and right-handed components of fermions.
For example, for the electrons:
\begin{equation}
\Delta \mathcal L_e = - \lambda_e \bar{E}_L \cdot \phi e_R + \text{ h.c.}, \qquad E_L = \begin{pmatrix} \nu_e \\ e^- \end{pmatrix}
\end{equation}
Assuming the same ground state as before, $\phi = (0 \quad v/\sqrt{2})$, we obtain a mass term for the electron:
\begin{equation}
    \Delta \mathcal L_e = \frac{-1}{\sqrt{2}} \lambda_e v \bar{e}_L e_R + \text{ h.c.},
\end{equation}
referred to as the Yukawa term and $\lambda_e$ referred to as the Yukawa coupling.
Yukawa terms for the other leptons and the quarks can be obtained in a similar fashion, such that the mass of any fermion is given by
\begin{equation}
    m_f = \frac{1}{\sqrt{2}} \lambda_f v.
\end{equation}
Neither the magnitude of the Yukawa couplings, $\lambda_f$, nor the vacuum expectation value, $v$, are known a priori and must be measured experimentally.

One final subtlety of the electroweak interaction is that while the W boson couples to leptons only of the same generation, it can couple to quarks from different generations.
This mixing is a result of the fact that the mass eigenstates of quarks are different from the weak isospin eigenstates.
The mixing of these eigenstates is described by the Cabibbo-Kobayashi-Maskawa (CKM) matrix~\cite{Cabibbo:1963yz,Kobayashi:1973fv}:
\begin{equation}
V_{\text{CKM}} = \begin{pmatrix} V_{ud} & V_{us} & V_{ub} \\ V_{cd} & V_{cs} & V_{cb} \\ V_{td} & V_{ts} & V_{tb} \end{pmatrix}.
\end{equation}
The CKM matrix is experimentally observed to be nearly diagonal, which has the physical consequence that W-mediated interactions between quarks of different generations are much weaker than those between quarks of the same generation.

\subsection{Shortcomings of the Standard Model} \label{sec:theory_sm_problems}
Though the SM has proved to be compatible with nature in nearly every single experimental test, it is known to be an incomplete theory.
Some of the most glaring shortcomings of the SM are summarized in this section, but it is by no means an exhaustive list of every problem.

First, the SM does not provide a description of gravity, and is (so far) incompatible with the theory of \emph{general relativity}, currently the most successful theory of gravity.
Second, the SM cannot explain dark matter \& dark energy, with strong evidence for dark matter given by the inconsistency of galactic rotation curves with the amount of visible matter~\cite{Rubin:1980zd}.
Third, the SM does not explain the observed dominance of matter over antimatter in the universe~\cite{Dine:2003ax} -- CP violation (which is allowed and observed in the SM) can account for some of this asymmetry, but not nearly enough to explain the observed asymmetry.
Finally, the SM is known to be self-inconsistent at very high energies, with the electromagnetic coupling and the Higgs self-coupling both diverging at arbitrarily high energies~\cite{Gockeler:1997dn,Chivukula:1999az}.
This issue, called \emph{quantum triviality}, implies that the SM is only valid up to some finite energy scale.

Given the abundance of issues with the SM, it is widely believed that the SM is a low-energy approximation of some more fundamental theory.
With the stipulation that the SM is fundamentally an incorrect description of the universe, it is natural to search for the ways in which the SM does \emph{not} correctly describe our universe.
In this paradigm, the experimental success of the SM is puzzling -- if the SM is wrong, why does every experimental test agree with its predictions?
One of the more promising approaches is to test the SM at increasingly high energy scales, as is done through analysis of the 13 TeV center-of-mass collisions at the Large Hadron Collider (LHC).
Among the countless measurements which can be made with the datasets from the LHC's numerous experiments, measuring the properties of the Higgs boson is a promising avenue to search for departures from the SM predictions given the Higgs unique role in mass generation and electroweak symmetry breaking.


\chapter{Introduction}

\epigraph{A complex piece of software consists of simple parts and simple
relations between those parts; the programmer's task is to state those
parts and those relationships, in whatever order is best for human
comprehension\dots%---not in some rigidly determined order like top-down or
%bottom-up.
}{``Literate Programming'' (1984)\\ % section J
\textsc{Donald Knuth}} % The Computer Journal, vol. 27

\section{Structure of a General Circulation Model}

A simple general circulation model consists of a ``dynamical core'':
model the atmosphere as a Navier-Stokes fluid, the Earth as a rotating
sphere. This consists of three equations for the conservation of
momenta, another equation for the conservation of mass (for atmosphere),
and some thermodynamic equation of state for describing pressure as
related to density. Atmospheric general circulation models add equations
of radiative transfer to the dynamic core, and some physical
parametrizations for subgrid details.

We will first examine the atmosphere as a fluid. Since the atmosphere is
``so shallow'' and ``so slow'', we can make various approximations to
the Navier-Stokes equations to make it easier to solve.
But we will have six unknowns (the velocity vector of the atmosphere,
its density, pressure, and temperature) and only four equations from
fluid mechanics alone.

Fortunately, the atmosphere is amazingly close to an ideal gas. So we
can draw upon a rich thermodynamical well. This will be done in the
second section.

We can add more realism to our model than ``just atmosphere''. Doing so
requires care when structuring the code. The usual architecture has a
separate module for each model component, which interact with each other
via a ``coupler'' pattern --- a specific maestro which coordinates the
time-stepping.

Some discussion of radiative transfer will be given, where sunlight and
heat emitted from the Earth affect atmospheric temperatures. This is
where more than 90\% of CPU cycles are spent in climate models.

\section{Fluid Mechanics of Atmosphere}

\subsection{Navier-Stokes Equations}

The conservation of momenta amounts to Newton's second Law
\begin{equation}
  \frac{\materialD\vec{u}}{\materialD t}
  =\frac{-1}{\rho}\nabla p + \nu\nabla^{2}\vec{u} + \vec{F}
\end{equation}
where $\vec{u}$ is the velocity vector field for the atmosphere, $\rho$
its density, $p$ pressure, $\nu$ kinematics viscosity, and $\vec{F}$
external forces like gravity. Here we use the material derivative
\begin{equation}
  \frac{\materialD f}{\materialD t} = \partial_{t}f + (\vec{u}\cdot\grad)f
\end{equation}
which should match the intuition of, if $\vec{x}(t)$ is the position of
a parcel of atmospheric fluid at time $t$, taking the total time
derivative of $f(\vec{x}(t))$ where we note
$\partial_{t}\vec{x}(t)=\vec{u}(t)$.

The conservation of mass may be written in a variety of ways, usually as
\begin{equation}
  \frac{\materialD\rho}{\materialD t}+\rho\grad\cdot\vec{u}=0.
\end{equation}
The atmosphere typically doesn't have a constant density, so this can't
be simplified much further.

For the equation of state, we'll need to invoke thermodynamics.
Fortunately, the atmosphere is close enough to an ideal gas that we can
rely on quite a few results from the literature. The interested reader
may peruse Vallis~\cite{vallis_2017} or Holton and
Hakim~\cite{holton2013dynamicMeteorology} for details.

\subsection{In Rotating Reference Frame}

We can approximate the Earth as a rotating sphere. The angular velocity
vector $\vec{\Omega}$ is roughly constant, and points in the same
direction as the North pole. We relate the time derivative of quantities
as measured in the inertial frame $\D\vec{A}/\D t$ to how it appears to a
rotating reference frame $(\D\vec{A}/\D t)'$ (primes indicate quantities
in the rotating frame) by
\begin{equation}
  \frac{\D\vec{A}}{\D t} = \left(\frac{\D\vec{A}}{\D t}\right)' + \vec{\Omega}\times\vec{A}.
\end{equation}
When applies to the position $\vec{r}$ of a body, we find the velocity
in an inertial frame related to the velocity in a rotating frame
\begin{equation}
  \frac{\D\vec{r}}{\D t} = \left(\frac{\D\vec{r}}{\D t}\right)' + \vec{\Omega}\times\vec{r}
\end{equation}
and acceleration in the rotating frame may be found from
\begin{equation}
  \frac{\D}{\D t}(\vec{v} - \vec{\Omega}\times\vec{r})
  = \frac{\D\vec{v}'}{\D t}+\vec{\Omega}\times\vec{v}'
\end{equation}
where $\vec{v} = \D\vec{r}/\D t$ and $\vec{v}' = (\D\vec{r}/\D t)'$.
After some algebra, we conclude
\begin{equation}
  \frac{\D\vec{v}'}{\D t}
  = \frac{\D \vec{v}}{\D t}
    - 2\vec{\Omega}\times\vec{v}'
    - \vec{\Omega}\times(\vec{\Omega}\times\vec{r}).
\end{equation}
That is, we have to add the Coriolis effect
$-2\vec{\Omega}\times\vec{v}'$ and the centrifugal pseudoforce
$-\vec{\Omega}\times(\vec{\Omega}\times\vec{r})$. We usually sweep the
centrifugal contribution into the external force term.

The conservation of momentum equations in the rotating frame would
become
\begin{equation}
  \frac{\materialD\vec{u}}{\materialD t} + 2\vec{\Omega}\times\vec{u}
  = \frac{-1}{\rho}\grad p + \vec{F}
\end{equation}
where we understand $\vec{u}$ refers to the fluid velocity for the
atmosphere as observed in the rotating frame.

\subsection{Spherical Coordinates in Rotating Frame}

We change coordinates to spherical coordinates, taking $\lambda$ to
describe the longitude (Eastwards angle), $\theta$ the latitude (angular
distance polewards), and $r$ the radial distance from the center of the
Earth. In these coordinates, any scalar quantity $\varphi$ has its
material derivative be
\begin{equation}
  \frac{\materialD\varphi}{\materialD t}
  = \frac{\partial\varphi}{\partial t}
    + \frac{u}{r\cos(\theta)}\frac{\partial\varphi}{\partial\lambda}
    + \frac{v}{r}\frac{\partial\varphi}{\partial\theta}
    + w\frac{\partial\varphi}{\partial r}.
\end{equation}
Care must be taken when computing the viscosity term, because the vector
Laplacian is defined as
\begin{equation}
  \nabla^{2}\vec{A} := \grad(\grad\cdot\vec{A}) - \curl(\curl\vec{A}).
\end{equation}
Only in Cartesian coordinates does it coincide with the familiar Laplacian.

\begin{prop}
  Mass conservation in spherical coordinates is
  \begin{equation}
    \frac{\partial\rho}{\partial t}
    + \frac{1}{r\cos(\theta)}\frac{\partial(u\rho)}{\partial\lambda}
    + \frac{1}{r\cos(\theta)}\frac{\partial}{\partial\theta}(v\rho\cos(\theta))
    + \frac{1}{r^{2}}\frac{\partial}{\partial r}(r^{2}w\rho)
    = 0
  \end{equation}
  where we have $\lambda$ be the latitude coordinate, $\theta$ the
  longitude coordinate, $r$ the vertical/radial coordinate; and
  $\vec{u}=(u,v,w)$ is the velocity pointing North $u$, East $v$, and
  outward $w$.
\end{prop}

\begin{prop}
  Momentum conservation in a rotating frame using spherical coordinates
  are (neglecting the viscosity term)
  \begin{subequations}
    \begin{align}
      \frac{\materialD u}{\materialD t} -\left(2\Omega + \frac{u}{r\cos(\theta)}\right)(v\sin(\theta)-w\cos(\theta))
      &= \frac{-1}{\rho r\cos(\theta)}\frac{\partial p}{\partial\lambda}\\
      \frac{\materialD v}{\materialD t} -\left(2\Omega + \frac{u}{r\cos(\theta)}\right)u\sin(\theta)
      &= \frac{-1}{\rho r}\frac{\partial p}{\partial\theta} \\
      \frac{\materialD w}{\materialD t} - \frac{u^{2}+v^{2}}{r} -
      2\Omega u\cos(\theta)
      &= \frac{-1}{\rho}\frac{\partial p}{\partial r}-g.\label{eq:vertical-rotating-momentum-conservation}
    \end{align}
  \end{subequations}
  The quadratic terms on the left-hand side involving factors of $1/r$
  are usually called ``metric terms'', and those involving factors of
  $\Omega$ are Coriolis terms.
\end{prop}

Neglecting the viscosity term may be justified by observing, in MKS
units, it is typically $10^{-7}$ times smaller than the $\materialD\vec{u}/\materialD t$
term. For more on this, see Holton and
Hakim~\cite{holton2013dynamicMeteorology}, \S2.4 for scale analysis of
momentum equations.

\begin{prop}
  The radius of the Earth $a$ may be approximated as
  \begin{subequations}
    \begin{equation}
      a = \SI{20000/\pi}{\km}
  \end{equation}
  or, to some 44 digits
  \begin{equation}
    a\approx
    \SI{6366.1977236758134307553505349005744813783858}{\km}.%\,2962
  \end{equation}
  \end{subequations}
\end{prop}
\begin{proof}
  Recall from history, in 1791, the meter was defined such that a
  quarter of the Earth's circumference through the North and South
  poles, starting at the equator, would be
\begin{equation}
  (2\pi a)/4 = \SI{1e4}{\km}
\end{equation}
where $a$ is Earth's radius. Modern measurements note the meridional
circumference of the Earth is $\SI{40007.86}{\km}$, so this
historic definition has an absolute error of $\SI{7.86}{\km}$ (making
it a useful approximation). In reality, Earth's equatorial
radius $a_{eq}\approx \SI{6378.137}{\km}$ and polar radius
$a_{pol}\approx\SI{6356.752}{\km}$ have a geometric mean of
$\SI{6367.44}{\km}$.
\end{proof}
\begin{cor}
  The inverse of Earth's radius is
  \begin{subequations}
  \begin{equation}
    \frac{1}{a} = \frac{\pi}{\SI{2e4}{\km}}
  \end{equation}
  or, to 36 digits
  \begin{equation}
    \frac{1}{a}\approx \SI{1.57079632679489661923132169163975144e-4}{\per\km}
  \end{equation}
  \end{subequations}
\end{cor}

This speeds up performance when doing calculations, since multiplication
is between 5- to 9-times faster than division on x86 CPUs\footnote{See, e.g.,
Wittmann and friends~\cite{wittmann2015short} or more informally \url{https://latkin.org/blog/2014/11/09/a-simple-benchmark-of-various-math-operations/}}.
Such is the proportion of CPU latency (i.e., the time from the start of
the instruction until the operation concludes).

\subsection{Primitive Equations}

There are three simplifications we could make: the shallow fluid
approximation, the hydrostatic approximation, and the traditional
approximation.\footnote{My guide for this material is drawn
principally from Vallis~\cite[\S\S2.2.4--2.2.5]{vallis_2017}, who cites
Phillips~\cite{phillips1966TheEquationsofMotionforaShallowRotatingAtmosphereandtheTraditionalApproximation}
and White~\cite{white2002}.}

We usually simplify these equations further, noting that the height of
the atmosphere is no greater than $\SI{100}{\km}$ which is about
60-times smaller than the radius of the Earth. So we could think of the
atmosphere as a shallow fluid.\marginpar{(1) Shallow fluid: $r=a+z\approx a$,\\
  $\partial/\partial r=\partial/\partial z$}
That is to say, we treat $r=a+z$ where
$a$ is the radius of the Earth and $z\ll a$ the altitude. Consequently,
we replace $\partial/\partial r$ by $\partial/\partial z$ and all other
occurrences of $r$ by $a$. If we make this simplification, then we
are also forced to make the hydrostatic
approximation: in the vertical
momentum equation, the gravitational term is balanced by the pressure
gradient term (and these are the dominant terms in the equation, the
other terms are negligible in comparison). That is to say, we use\marginpar{(2)Hydrostatic Approximation}
\begin{equation}
  \frac{\partial p}{\partial z}=-\rho g
\end{equation}
instead of Eq \eqref{eq:vertical-rotating-momentum-conservation}. These
two approximations are bundle deal --- they are taken together, or not
at all. For large-scale atmospheric (and oceanic) flow on Earth, they're
a pretty good approximation.

The traditional approximation\marginpar{(3) Traditional approximation} discards Coriolis terms in the horizonal
momentum equations, and the smaller metric terms $uw/r$ and
$vw/r$. This approximation is largely independent of the shallow fluid
and hydrostatic approximations, and may be empirically justified by
examining the scale of the various terms.

\begin{prop}[Momentum Equations]
Taking all three approximations gives us the conservation of momentum equations:
\begin{subequations}
  \begin{align}
    \frac{\materialD u}{\materialD t}
    - 2\Omega v\sin(\theta) - \frac{uv}{a}\tan(\theta)
    &= \frac{-1}{\rho a\cos(\theta)}\frac{\partial p}{\partial\lambda}\\
    \frac{\materialD v}{\materialD t}
    - 2\Omega u\sin(\theta) - \frac{u^{2}\tan(\theta)}{a}
    &= \frac{-1}{\rho a}\frac{\partial p}{\partial\theta} \\
    0 &= \frac{-1}{\rho}\frac{\partial p}{\partial z}-g.
  \end{align}
\end{subequations}
\end{prop}

\begin{note}
In our approximations, we now have
\begin{equation}
  \frac{\materialD}{\materialD t}=\frac{\partial}{\partial t} +
  \frac{u}{a\cos(\theta)}\frac{\partial}{\partial\lambda} +
  \frac{v}{a}\frac{\partial}{\partial\theta} + w\frac{\partial}{\partial z}.
\end{equation}
\end{note}

\begin{defn}
It is conventional to introduce the \define{Coriolis parameter}
\begin{equation}
  f = 2\Omega\sin(\theta)
\end{equation}
to simplify calculations. Empirically, $\Omega=7.2921150\times10^{-5}\,\mathrm{rad}\cdot\mathrm{s}^{-1}$.
\end{defn}

\begin{prop}[Continuity Equation]
The mass conservation equation for a shallow atmosphere becomes
\begin{equation}
  \frac{\partial\rho}{\partial t}
  + \frac{u}{a\cos(\theta)}\frac{\partial\rho}{\partial\lambda}
  + \frac{v}{a}\frac{\partial\rho}{\partial\theta}
  + w\frac{\partial\rho}{\partial z}
  + \rho\left(\frac{1}{a\cos(\theta)}\frac{\partial u}{\partial\lambda}
              + \frac{1}{a\cos(\theta)}\frac{\partial(v\cos(\theta))}{\partial\theta}
              + \frac{\partial w}{\partial z}
       \right)
  = 0
\end{equation}
or equivalently
\begin{equation}
  \frac{\partial\rho}{\partial t}
  + \frac{1}{a\cos(\theta)}\frac{\partial(u\rho)}{\partial\lambda}
  + \frac{1}{a\cos(\theta)}\frac{\partial(v\rho\cos(\theta))}{\partial\theta}
  + \frac{\partial(w\rho)}{\partial z}
  = 0.
\end{equation}
\end{prop}

\section{Thermodynamics for Atmospheric Fluid}
We need some way to relate density to pressure, which requires
thermodynamics. Atmosphere is approximately an ideal gas, so we could
use
\begin{equation}
  p = \rho R T
\end{equation}
where $R=\SI{287}{\joule\per\kilogram\per\kelvin}$ is the gas
constant for dry air, $T$ is temperature (an unknown). We need another
equation to fix $T$. A first approximation simply fixes $T=T_{0}$ to be
constant, a second approximation fixes $T=T_{0}-T_{1}z$ or something
similar. But realistically, we want to model temperature from first
principles.

For a simple ideal gas, the heat capacity is constant, so
\begin{equation}
  I = cT
\end{equation}
where $c$ is a constant and $I$ satisfies the fundamental thermodynamic
relation
\begin{equation}
  \D I = T\,\D\eta - p\,\D\alpha + \mu\,\D S
\end{equation}
where $I$ is the internal energy of the fluid, $\alpha=1/\rho$ is the
specific volume, $\eta$ is the specific entropy, $\mu$ is the chemical
potential, and $S$ is the composition of the fluid in terms of
``species'' of molecules. If $\dot{Q}$ is the heating applied to the
fluid and $\dot{Q}_{E} = \dot{Q} + \mu\dot{S}$ is the total rate of
energy change, then the internal energy equation
\begin{equation}
  \frac{\materialD I}{\materialD t} + \frac{p}{\rho}\grad\cdot\vec{u} = \dot{Q}_{E}
\end{equation}
or the entropy equation
\begin{equation}
\frac{\materialD \eta}{\materialD t} = \frac{1}{T}\dot{Q}
\end{equation}
could be used to fix the remaining parameters, provided we have a
boundary condition giving us $\dot{Q}$ and $\dot{S}$. For an ideal dry
gas (like the atmosphere) we have
\begin{equation}
  \D I = c_{v}\,\D T
\end{equation}
which gives us
\begin{equation}
c_{v}\frac{\materialD T}{\materialD t} + p\alpha\grad\cdot\vec{u} = \dot{Q}.
\end{equation}
Arguably, for a steady state, $\dot{Q}=0$. Realistically, the Sun
\emph{is} an external heat source, and we need to model how it heats the
atmosphere, which is the rich subject of radiative transfer.

\begin{rmk}
  We can combine several results from thermodynamics to write the first
  law as
  \begin{equation}
    \dot{Q} = c_{p}\frac{\materialD T}{\materialD t} - \frac{1}{\rho}\frac{\materialD p}{\materialD t}
  \end{equation}
  where for the atmosphere
  $c_{p}=1003\,\mathrm{J}\cdot\mathrm{kg}^{-1}\cdot\mathrm{K}^{-1}$, and
  $\dot{Q}$ is the heat rate per unit mass. This is typically used in
  numerical weather prediction. See chapter 2 of
  Kalnay~\cite{kalnay_2002} but be warned: Kalnay uses $Q$ whereas we
  use $\dot{Q}$.
\end{rmk}

\section{Radiative Transfer}

We need to incorporate heating from sunlight, which requires radiative
transfer --- for a review, see Liou~\cite{liou2002introduction} and
Stamnes, Thomas, and Stamnes~\cite{stamnes_thomas_stamnes_2017}.
The latter are part of the team who coded the \DISORT/\index{\DISORT/}
library\footnote{\DISORT/ homepage \url{http://www.rtatmocn.com/disort/}},
which underpins many radiative transfer libraries like the
\RRTM/\index{\RRTM/} suite\footnote{\url{http://rtweb.aer.com/}}.

The basic radiative transfer equation is an integro-differential
equation
\begin{equation}\label{eq:integro-diff-radiative-transfer}
  \mu\frac{\D I(\tau,\mu,\phi)}{\D\tau}
  = I(\tau, \mu, \phi) - S(\tau, \mu, \phi)
\end{equation}
where $\tau$ is the optical depth of the medium; $I$ the diffuse
specific intensity in a cone of unit solid angle along direction $\mu$,
$\phi$; and $S$ is the ``source function''
\begin{equation}
  \begin{split}
    S(\tau, \mu, \phi) &= Q^{\text{(beam)}}(\tau,\mu,\phi)  + Q^{\text{(therm)}}(\tau) \\
    &\qquad + \frac{\omega(\tau)}{4\pi}
  \int^{2\pi}_{0}\int^{1}_{-1} P(\tau,\mu,\phi;\mu',\phi')I(\tau,\mu',\phi')\,\D\phi'\,\D\mu'.
  \end{split}
\end{equation}
Here $\omega(\tau)$ is the ``single scattering albedo'' of the medium
(i.e., the fraction of an incident beam which is scattered by that
volume), and $P$ is the ``scattering phase function'' describing the
angular scattering pattern of an infinitesimal volume. The curious
reader may profitably read chapters 5--8 of Stamnes and
friends~\cite{stamnes_thomas_stamnes_2017}.

\begin{note}
Laszlo and friends~\cite{Laszlo2016} explain how \DISORT/ solves Eq
\eqref{eq:integro-diff-radiative-transfer} in three basic steps:
\begin{enumerate}
\item Transform the equation into a set of radiative transfer equations
  by separation of azimuth dependence;
\item Transforming these equations into a system of ordinary
  differential equations;
\item Solving the System of ODEs using linear algebra.
\end{enumerate}
This strategy may be found in Chandrasekhar's book
\emph{Radiative Transfer} (1960) and refined over time.
\end{note}

\section{ADT Calculus}

Following scientific programming tradition from SAGA\footnote{\url{https://www.ii.uib.no/saga/index.html}},
Rouson and friends~\cite{rouson2011scientific,rouson2008grid}, and much
hard earned experience, we will be encoding mathematical equations
directly into the abstract data types.

% There are a lot of people observing sin(x) is inaccurate on Intel CPUs
% - https://hackernoon.com/help-my-sin-is-slow-and-my-fpu-is-inaccurate-a2c751106102
% - https://randomascii.wordpress.com/2014/10/09/intel-underestimates-error-bounds-by-1-3-quintillion/
% - http://notabs.org/fpuaccuracy/
%
% Also see:
% - https://latkin.org/blog/2014/11/09/a-simple-benchmark-of-various-math-operations/


\section{Computing Limits: Algebraically}\label{sec:ComputingLimitsAlg}
\subsection*{Properties of limits}
With reference to Theorem \ref{thm:LimitProduct}, we can derive
a handful of theorems to give us the tools to compute many limits
without explicitly working with the precise definition of a limit.

\begin{theorem}{Limit Properties}{PropertiesLimits}
 Suppose that $ L, M $ and $ k $ are real numbers where  $\ds \lim_{x\to a}f(x)=L$ and $\ds \lim_{x\to a}g(x)=M$. Then
\begin{itemize}
\item[Constant Multiple Rule] $\ds\lim_{x\to a} kf(x) =\ds k\lim_{x\to a}f(x)=kL$
\item $\ds\lim_{x\to a} (f(x)+g(x)) = \ds\lim_{x\to a}f(x)+\lim_{x\to a}g(x)=L+M$
\item $\ds\lim_{x\to a} (f(x)-g(x)) = \ds\lim_{x\to a}f(x)-\lim_{x\to a}g(x)=L-M$
\item $\ds\lim_{x\to a} (f(x)g(x)) = \ds\lim_{x\to a}f(x)\cdot\lim_{x\to a}g(x)=LM$
\item $\ds\lim_{x\to a} \frac{f(x)}{g(x)} = \ds\frac{\ds\lim_{x\to a}f(x)}{\ds\lim_{x\to a}g(x)}=\frac{L}{M},\hbox{ if $M$ is not 0}$
\end{itemize}
\end{theorem}

Roughly speaking, these rules say that to compute the limit of an
algebraic expression, it is enough to compute the limits of the
``innermost bits'' and then combine these limits. This often means
that it is possible to simply plug in a value for the variable, since
$\ds \lim_{x\to a} x =a$.

\begin{example}{Limit Properties}{LimitProperties}
Compute $\ds\lim_{x\to 1}{x^2-3x+5\over x-2}$.
\end{example}

\begin{solution}
 If we apply the theorem in all its gory detail, we get
\begin{eqnarray*}
\lim_{x\to 1}{x^2-3x+5\over x-2}&=&
{\ds\lim_{x\to 1}(x^2-3x+5)\over \ds\lim_{x\to1}(x-2)}\cr
\\
&=&{(\ds\lim_{x\to 1}x^2)-(\ds\lim_{x\to1}3x)+(\ds\lim_{x\to1}5)\over
  (\ds\lim_{x\to1}x)-(\ds\lim_{x\to1}2)}\cr
\\
&=&{(\ds\lim_{x\to 1}x)^2-3(\ds\lim_{x\to1}x)+5\over (\ds\lim_{x\to1}x)-2}\cr
\\
&=&{1^2-3\cdot1+5\over 1-2}\cr
\\
&=&{1-3+5\over -1} = -3
\end{eqnarray*}
\end{solution}

It is worth commenting on the trivial limit $\ds \lim_{x\to1}5$. From one
point of view this might seem meaningless, as the number 5 can't
``approach'' any value, since it is simply a fixed number. However, 5 can,
and should, be interpreted here as the function that has value 5
everywhere, $f(x)=5$, with graph a horizontal line. From this point of
view it makes sense to ask what happens to the values of the function (height of the graph)
as $x$ approaches 1.

We're primarily interested in limits
that aren't so easy, namely, limits in which a denominator approaches
zero. There are a handful of algebraic tricks that work on many of
these limits.

\begin{example}{Zero Denominator}{zerodenominator}
Compute $\ds\lim_{x\to1}{x^2+2x-3\over x-1}$.
\end{example}

\begin{solution}
 We can't simply plug in $x=1$ because that makes the denominator
 zero.  However:
\begin{eqnarray*}
\lim_{x\to1}{x^2+2x-3\over x-1}&=&\lim_{x\to1}{(x-1)(x+3)\over x-1}\cr
\\
&=&\lim_{x\to1}(x+3)=4\
\end{eqnarray*}
\end{solution}

The technique used to solve the previous example can be referred to as \ifont{factor and cancel}.
Its validity comes from the fact that we are allowed to cancel $x-1$ from the numerator and denominator.
Remember in Calculus that we have to make sure we don't cancel zeros, so we require $x-1\neq 0$ in order
to cancel it. But looking back at the definition of a limit using $x\to 1$, the key point for this example
is that we are taking values of $x$ close to $1$ but \ifont{not} equal to $1$. This is
exactly what we wanted ($x\neq 1$) in order to cancel this common factor.

While Theorem~\ref{thm:PropertiesLimits} is very helpful, we
need a bit more to work easily with limits. Since the theorem applies
when some limits are already known, we need to know the behavior of
some functions that cannot themselves be constructed from the simple
arithmetic operations of the theorem, such as $\ds\sqrt{x}$. Also,
there is one other extraordinarily useful way to put functions
together: composition. If $f(x)$ and
$g(x)$ are functions, we can form two functions by composition:
$f(g(x))$ and $g(f(x))$. For example, if $\ds f(x)=\sqrt{x}$ and $\ds
\ds g(x)=x^2+5$, then $\ds f(g(x))=\sqrt{x^2+5}$ and $\ds
g(f(x))=(\sqrt{x})^2+5=x+5$.  Here is a companion to
Theorem~\ref{thm:PropertiesLimits} for composition:

\begin{theorem}{Limit of Composition}{LimitComposition}
Suppose that $\ds \lim_{x\to a}g(x)=L$ and $\ds \lim_{x\to L}f(x)=f(L)$. Then
$$\lim_{x\to a} f(g(x)) = f(L).$$
\end{theorem}

Note the special form of the condition on $f$: it is not enough to
know that $\ds\lim_{x\to L}f(x) = M$, though it is a bit tricky to see
why. We have included an example in the exercise section to illustrate this tricky
point for those who are interested. Many of the most familiar functions do have this property, and
this theorem can therefore be applied. For example:

\begin{theorem}{Continuity of Roots}{ContinuityRoots}
 Suppose that $n$ is a positive integer. Then
$$\lim_{x\to a}\root n\of{x} = \root n\of{a},$$
provided that $a$ is positive if $n$ is even.
\end{theorem}

This theorem is not too difficult to prove from the definition of limit.

Another of the most common algebraic tricks is called \ifont{rationalization}.
Rationalizing makes use of the difference of squares formula $(a-b)(a+b)=a^2-b^2$.
Here is an example.

\begin{example}{Rationalizing}{Rationalizing}
Compute $\ds\lim_{x\to-1} {\sqrt{x+5}-2\over x+1}$.
\end{example}

\begin{solution}
\begin{eqnarray*}
\lim_{x\to-1} {\sqrt{x+5}-2\over x+1}&=&
\lim_{x\to-1} {\sqrt{x+5}-2\over x+1}\cdot{\sqrt{x+5}+2\over \sqrt{x+5}+2}\cr
\\
&=&\lim_{x\to-1} {x+5-4\over (x+1)(\sqrt{x+5}+2)}\cr
\\
&=&\lim_{x\to-1} {x+1\over (x+1)(\sqrt{x+5}+2)}\cr
\\
&=&\lim_{x\to-1} {1\over \sqrt{x+5}+2}={1\over4}
\end{eqnarray*}
At the very last step we have used Theorems~\ref{thm:LimitComposition} and \ref{thm:ContinuityRoots}.
\end{solution}

\begin{example}{Left and Right Limit}{leftright}
Evaluate $\ds\lim_{x\to 0}{x\over|x|}$.
\end{example}

\begin{solution}
The function $f(x)=x/|x|$ is undefined at 0; when $x>0$, $|x|=x$ and
so $f(x)=1$; when $x<0$, $|x|=-x$ and $f(x)=-1$. Thus
$$\ds \lim_{x\to 0^-}{x\over|x|}=\lim_{x\to 0^-}-1=-1$$
while
$$\ds \lim_{x\to 0^+}{x\over|x|}=\lim_{x\to 0^+}1=1.$$
The limit of $f(x)$ must be equal to both the left and right limits; since they are
different, the limit $\ds \lim_{x\to 0}{x\over|x|}$ does not exist.
\end{solution}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Opensolutionfile{solutions}[ex]
\section*{Exercises for \ref{sec:ComputingLimitsAlg}}

\begin{enumialphparenastyle}

%%%%%%%%%%
\begin{ex}
Compute the limits. If a limit does not exist, explain why.
\begin{multicols}{2}
\begin{enumerate}
	\item	$\ds \lim_{x\to 3}{x^2+x-12\over x-3}$
	\item	$\ds \lim_{x\to 1}{x^2+x-12\over x-3}$
	\item	$\ds \lim_{x\to -4}{x^2+x-12\over x-3}$
	\item	$\ds \lim_{x\to 2} {x^2+x-12\over x-2}$
	\item	$\ds \lim_{x\to 1} {\sqrt{x+8}-3\over x-1}$
	\item	$\ds \lim_{x\to 0^+} \sqrt{{1\over x}+2} - \sqrt{1\over x}$
	\item	$\ds\lim _{x\to 2} 3$
	\item	$\ds\lim _{x\to 4 } 3x^3 - 5x $
	\item	$\ds \lim _{x\to 0 } {4x - 5x^2\over x-1}$
	\item	$\ds\lim _{x\to 1 } {x^2 -1 \over x-1 }$
	\item	$\ds\lim _{x\to 0^ + } {\sqrt{2-x^2 }\over x}$
	\item	$\ds\lim _{x\to 0^ + } {\sqrt{2-x^2}\over x+1}$
	\item	$\ds\lim _{x\to a } {x^3 -a^3\over x-a}$
	\item	$\ds\lim _{x\to 2 } (x^2 +4)^3$
\end{enumerate}
\end{multicols}
\begin{sol}
\begin{multicols}{2}
\begin{enumerate}
	\item	7
	\item	5
	\item	0
	\item	undefined
	\item	$1/6$
	\item	0
	\item	3
	\item	172
	\item	0
	\item	2
	\item	does not exist
	\item	$\ds \sqrt2$
	\item	$\ds 3a^2$
	\item	512
\end{enumerate}
\end{multicols}
\end{sol}
\end{ex}

%%%%%%%%%%
\begin{ex}
Let $f(x)=\left\{
\begin{array}{cc}
1 & \text{if }x\neq 0 \\
0 & \text{if }x=0%
\end{array}%
\right.$ and $g(x)=0$. What are the values of $
L=\lim_{x\to 0}g(x)$ and $M=\lim_{x\to L}f(x)$? Is it true that $\lim_{x\to	0}f(g(x))=M$? What are some noteworthy differences
between this example and Theorem~\ref{thm:LimitComposition}?
\begin{sol}
	$L=0$ and $M=1.$ No.
\end{sol}
\end{ex}

\end{enumialphparenastyle}

\clearpage


\subsection{Q-Q plots}

Plot quartiles of variables against each other.


% 17fiberbundles.tex

\begin{quote}
  A vector bundle is a family of vector spaces parameterized by points in the base space. How do we parameterize a family of manifolds, say Lie groups?
\end{quote}

\section{ 17.1. Fiber Bundles and Principal Bundles }

\subsection{ 17.1a. Fiber Bundles }

\subsection{ 17.1b. Principal Bundles and Frame Bundles }

frame $\mathbf{e}$ at $p$ chosen

\begin{equation}
  f(p) = e_{\alpha}(p) g_{\alpha}(p) \quad \quad \quad \, (17.4)
\end{equation}

\begin{equation}
\begin{aligned}
  & \Phi_{\alpha} : U_{\alpha} \times G \to \pi^{-1}(U_{\alpha}) \\
  & \Phi_{\alpha}(p,g) = e_{\alpha}(p) g = (e_{\alpha})_i g^i_{ \, \, j } = f_j
\end{aligned}
\end{equation}

in an overlap, the same frame (17.4) will have another representation

\begin{equation}
  \mathbf{f}(p) = \mathbf{e}_{\beta}{(p)} g_{\beta}(p) \quad \quad \quad \, (17.5)
\end{equation}

\[
\begin{gathered}
  e_{\beta}(p) = e_{\alpha}(p) \tau_{\alpha \beta}(p) \\
  \tau_{\alpha \beta}(p) \equiv \tau_{\alpha \beta} \\
  g_{\alpha}(p) = \tau_{\alpha \beta}(p) g_{\beta}(p)
\end{gathered}
\]

diffeomorphism
\[
\tau_{\alpha \beta}(p)  : G \to G
\]
left translation of $G$ by (transition) matrix $\tau_{\alpha \beta}(p)$

\subsection{ 17.1c. Action of the Structure Group on a Principal Bundle}

Let $\mathbf{f} = (\mathbf{f}_1 \dots \mathbf{f}_n)$ frame at $p$, $\mathbf{f} \in P$

\begin{theorem}[17.8]
  \[
(f \in P , g\in G) \to (fg) \in P
\]
freely when $g\neq e$ and
\[
\pi(fg) = \pi(f)
\]
i.e. preserves fibers
\end{theorem}

Proof:
  $\pi(\mathbf{f}) = p$ \\

$\Phi_{\alpha} : U_{\alpha} \times G \to \pi^{-1}(U_{\alpha})$ \quad \quad \, local trivialization \\
$\Phi_{\alpha}(p,g_{\alpha}) = \mathbf{f} \Longrightarrow \Phi_{\alpha}^{-1}(\mathbf{f}) = (p,g_{\alpha})$
\quad $\exists \, ! \, g_{\alpha}$ for $\mathbf{f}$

Let $g \in G$,

right action of $g$ on $\pi^{-1}(U_{\alpha})$ is (locally action)

\[
\Phi_{\alpha}(p,g_{\alpha}g) = fg
\]

if $p \in U_{\alpha} \bigcap U_{\beta}$

\[
\begin{gathered}
  fg = \Phi_{\beta}(p,g_{\beta}g) = \Phi_{\beta}(p, \tau_{\beta \alpha}(p)g_{\alpha} g ) = \Phi_{\alpha}(p,g_{\alpha} g)
\end{gathered}
\]
$\tau_{\beta \alpha} = \Phi_{\beta}^{-1} \Phi_{\alpha}$

\hrulefill

We see in this proof that the essential point is that \emph{left translations} in $G$ (say by $\tau_{\beta \alpha}$) \emph{ commute with right translations} (say by $g$).

\subsection{ 17.2. }

\subsection{ 17.3. Chern's Proof of the Gauss-Bonnet-Poincar\'{e} Theorem }

\subsubsection{ 17.3a. A Connection in the Frame Bundle of a Surface }

\begin{equation}
  \omega \left( \frac{d\mathbf{x}}{dt} \right) \in \mathfrak{g} = \mathfrak{u}{ (1) } \quad \quad \quad \, (17.14)
\end{equation}

LaTeX_and_pdfs/the geometry of physics problems/17fiberbundles.tex


\chapter{Quantification of PCA/PLS-DA Class Separations}

\begin{quote}
{\it
  People want to see patterns in the world. ... So important is this skill
  that we apply it everywhere, warranted or not.}
\\\\
 -- Benoit Mandelbrot
\end{quote}

\section{Introduction}

\begin{doublespace}
The importance placed on interpretation of PCA, PLS-DA and OPLS-DA scores plots
necessitates the use of quantitative procedures to determine the significance
of separations between multiple experimental groups in scores space. However,
no de facto protocol or metric exists to provide a means of reporting the
degree or significance of group separation
\cite{werth:abio2010,goodpaster:abio2010,goodpaster:cils2011}.
Anderson et al. used the $J_2$ criterion
\cite{anderson:metab2008,koutroumbas2006} to assess the quality of
resulting scores clusters according to the average withing-group and
between-group scatters for all groups. However, the $J_2$ metric only provides
an overall estimate of group separation without fine-grained information on
each pair of groups \cite{koutroumbas2006}. A similar problem exists
with the related Davies-Bouldin index \cite{davies:ieee1979}, which
chooses a worst-case estimate of group overlap as its figure of merit. Dixon
et al. \cite{dixon:jchemo2009} also comprehensively reported the
performances of four cluster separation indices based on modifications of
metrics used to validate separation for unsupervised clustering algorithms.
Alternatively, the PCAtoTree protocol constructs dendrograms from Euclidean
distance matrices computed from PCA scores for the PHYLIP
\cite{felsenstein:clad1989} software suite using a bootstrapping routine to
determine branch node significance \cite{werth:abio2010,retief:mmbio2000}.
However, it was recently shown that hypothesis testing using a Mahalanobis
distance metric and the $T^2$ and $F$ distributions can provide a statistical
means of quantifying group similarity \cite{goodpaster:cils2011}, suggesting
the possibility of returning $p$ values for full statistical quantitation of
group separations in scores space.
\end{doublespace}

\section{Materials and Methods}

\begin{doublespace}
The methods described below were implemented in software using the C
programming language with minimal external dependencies, so the programs
may be compiled and executed on any modern GNU/Linux distribution.
\end{doublespace}

\subsection{Probability Calculation}

\begin{doublespace}
Under the assumption that each group in the scores space is distributed as a
multivariate normal random variable, the separations between groups may be
calculated using the squared Mahalanobis distance metric
\cite{mahalanobis:pnisi1936}:
\begin{equation}
D_M^2 =
  (\mathbf{u}_j - \mathbf{u}_i)^T
  \mathbf{S}_p^{-1}
  (\mathbf{u}_j - \mathbf{u}_i)
\end{equation}

In the above equation, $\mathbf{u}_i, \mathbf{u}_j \in \mathbb{R}^p$ are the
$p$-variate sample means of groups $i$ and $j$, respectively, and
$\mathbf{S}_p \in \mathbb{R}^{p \times p}$ is the pooled variance-covariance
matrix, a weighted sum of the covariance matrices from groups $i$ and
$j$:
\begin{equation}
\mathbf{S}_p = \frac{n_i \mathbf{S}_i + n_j \mathbf{S}_j}{n_i + n_j}
\end{equation}
where $n_i$ and $n_j$ are the number of observations in groups $i$ and $j$,
respectively. The Mahalanobis distance may then be related to a Hotelling's
$T^2$ statistic by the following scaling \cite{mardia1979}:
\begin{equation}
T^2 = \left( \frac{n_i n_j}{n_i + n_j} \right) D_M^2
\end{equation}

This $T^2$ statistic is an extension of the Student's $t$ statistic to
hypothesis tests in multiple dimensions, and may be related to an $F$
distribution by a final scaling \cite{mardia1979}:
\begin{equation}
x_F =
  \frac{n_i + n_j - p - 1}{p (n_i + n_j - 2)} T^2 \sim
  F(p, n_i + n_j - p - 1)
\end{equation}

It can be seen from this final relation that evaluation of the complement of
the cumulative $F$-distribution function at $x_F$ yields the $p$ value for
accepting the null hypothesis: the points in groups $i$ and $j$ are in fact
drawn from the same distribution.
\end{doublespace}

\begin{figure}[ht!]
\includegraphics[width=6in]{figs/utils/01-opls.png}
\caption
      [Confidence Ellipses and $p$-dendrogram of Example OPLS-DA Scores.]{
  {\bf Confidence Ellipses and $p$-dendrogram of Example OPLS-DA Scores.}
  \\
  ({\bf A}) 2D OPLS-DA scores plot illustrating 95\% confidence ellipses for
  a model having one predictive (PLS) and one orthogonal (OSC) component. The
  symbol shape and color each point correspond to the groups in ({\bf B}).
  Discrimination in the first component is between wild-type and
  antibiotic-treated {\it Mycobacterium smegmatis}, and separations along the
  second component indicate metabolic differences between different antibiotic
  treatments. The antibiotics cluster together based on a shared biological
  target (cell wall synthesis, mycolic acid biosynthesis, or transcription,
  translation and DNA supercoiling). ({\bf B}) Dendrogram generated from the
  scores in ({\bf A}) using Mahalanobis distances, with $p$ values for the null
  hypothesis reported at each branch.
}
\label{figure.10.1}
\end{figure}

\subsection{Dendrogram Generation}

\begin{doublespace}
The implementation of the tree-generation procedure is a classical UPGMA
algorithm \cite{sokal:uksci1958}. When $p$ values are reported at
each branch point, a single tree is generated based on the matrix of
Mahalanobis distances between groups. In the case of bootstrapped trees, the
groups are randomly resampled with replacement while preserving group size.
The desired number of trees is then generated using Euclidean distances
between group means. The final tree used to report bootstrap probabilities
is built using a Euclidean distance matrix calculated from the original
(non-resampled) dataset.
\end{doublespace}

\subsection{Confidence Ellipse Calculation}

\begin{doublespace}
When viewing PCA and PLS-DA scores plots, it was common practice to apply
hand-drawn ellipses to inform group membership, or even to omit such ellipses
entirely. This may lead to inconsistent or erroneous interpretation of
experimental results. Instead, the fact that the Mahalanobis distances of a
set of $p$-variate points from their sample mean follow a $\chi^2$ distribution
having $p$ degrees of freedom \cite{hotelling:ams1931} may be leveraged
to estimate 95\% confidence ellipses for scores in any number of dimensions.
The sample mean $\mathbf{u}$ and sample covariance matrix $\mathbf{S}$ for each
group must first be calculated from its scores-space data. Then, each group
covariance matrix is decomposed into its eigenvalues and eigenvectors,
\begin{equation}
\mathbf{S} = \mathbf{Q} \mathbf{\Lambda} \mathbf{Q}^{-1}
\end{equation}
where $\mathbf{Q} \in \mathbb{R}^{p \times p}$ is an orthogonal matrix holding
the eigenvectors of $\mathbf{S}$, and
$\mathbf{\Lambda} \in \mathbb{R}^{p \times p}$ is a diagonal matrix holding the
corresponding eigenvalues of $\mathbf{S}$.

For the case of two-dimensional scores data, the 95\% confidence ellipse for a
group is as follows:
\end{doublespace}

\begin{equation}
\begin{bmatrix}
x(t) \\
y(t)
\end{bmatrix}
 = \mathbf{u} + \mathbf{Q} \sqrt{\mathbf{\Lambda} F_{0.95,2}^{-1}}
\begin{bmatrix}
\cos(t) \\
\sin(t)
\end{bmatrix}
\end{equation}

\begin{doublespace}
where $F_{0.95,2}^{-1}$ is the value of the inverse $\chi^2$ cumulative
distribution function at $\alpha = 0.05$ and two degrees of freedom, and the
square-root is taken element-wise over $\mathbf{\Lambda}$. Similarly, a
three-dimensional (3D) confidence ellipsoid may be obtained from the
following parametric equation:
\end{doublespace}

\begin{equation}
\begin{bmatrix}
x(u,v) \\
y(u,v) \\
z(u,v)
\end{bmatrix}
 = \mathbf{u} + \mathbf{Q} \sqrt{\mathbf{\Lambda} F_{0.95,3}^{-1}}
\begin{bmatrix}
\cos(u) \cos(v) \\
\cos(u) \sin(v) \\
\sin(v)
\end{bmatrix}
\end{equation}

\begin{doublespace}
where the parameters $t$, $u$ and $v$ are all evaluated on $(0,2\pi)$. These
methods allow for the inclusion of confidence regions onto two- and
three-dimensional scores plots that reflect the 95\% membership boundaries
for each group. The approach assumes normally distributed within-group errors.
\figref{10.1}{Figures 10.1A} and \figref{10.2}{10.2} illustrate the inclusion
of these group confidence regions in representative PCA and OPLS-DA scores,
respectively. The ellipses and ellipsoids clearly define statistically
significant class separation and also provide an example in which multiple
groups actually belong to the same underlying biological classification.
\end{doublespace}

\begin{SCfigure}
\includegraphics[width=3.25in]{figs/utils/02-pca.png}
\caption
      [Confidence Ellipsoids from PCA Scores.]{
  {\bf Confidence Ellipsoids from PCA Scores.}
  \\
  3D PCA scores plot with superimposed 95\% confidence ellipsoids drawn as
  meshes containing group points. The ellipsoids define the statistical
  significance of class separation and provide an illustration where two
  groups are distinct in three-dimensional scores space.
}
\label{figure.10.2}
\end{SCfigure}

\section{Results and Discussion}

\begin{doublespace}
The described PCA utilities software package consists of a set of standalone
C programs that generate dendrograms from PCA, PLS-DA and OPLS-DA scores,
report $p$ values and bootstrap numbers on tree branches, and incorporate
confidence ellipses/ellipsoids into scores plots. The $p$ values reported for
every pair of distinct groups in scores space provide a truly quantitative
means to discuss group separations. Support for the generation of dendrograms
with these $p$ values at each branch point is also included as an alternative
answer to the bootstrap for answering the question of tree uniqueness. This
eliminates the prior dependence on PHYLIP \cite{retief:mmbio2000}
reported for the original PCAtoTree \cite{werth:abio2010} software
package. The reporting of $p$ values is complementary to bootstrapping methods
in cases of highly overlapped groups, in that it provides a more direct,
interpretable quantitation of group separation.
\\\\
In comparison with PCAtoTree, the PCA utilities software package now uses
Mahalanobis distances because this metric is more appropriate for multivariate
data. De Maesschalck et al. \cite{demaesschalck:cils2000} provide an
exceptional introduction to the use of Mahalanobis distances with PCA.
Specifically, Mahalanobis distances account for different variances in each
scores-space direction ($t_1$, $t_2$, $t_3$, etc.) and are invariant
to scaling transformations. This accounting for variances-covariance structure
ensures that the use of a Mahalanobis distance metric for dendrogram generation
includes cluster shape and orientation in the analysis of group separation.
Also, Mahalanobis distances calculated between groups in PCA scores space will
closely approximate those calculated from the original data matrix while
avoiding possible multicollinearities among the original variables. This is
not true of Mahalanobis distances in PLS or OPLS scores space, because of the
underlying supervision of the PLS algorithm. These features differ from the
Euclidean distance metric, which is a special case of the Mahalanobis metric
that arises when the group covariance matrices equal the identity matrix.
\figref{10.1}{Figure 10.1B} illustrates the dendrogram structure based on the
use of Mahalanobis distances determined from a set of scores, and
\figref{10.3}{Figure 10.3} shows the dendrogram structure based on
Euclidean distances from the same scores.
\end{doublespace}

\begin{SCfigure}
\includegraphics[width=3.25in]{figs/utils/03-tree.png}
\caption
      [Dendrogram Generated using Euclidean Distances.]{
  {\bf Dendrogram Generated using Euclidean Distances.}
  \\
  Bootstrapped dendrogram generated from the scores data in Figure 10.1A using
  a Euclidean distance metric. Bootstrap statistics reported at each branch
  were computed from 5,000 bootstrap iterations.
}
\label{figure.10.3}
\end{SCfigure}

\begin{doublespace}
It is important to note that our software is not a means of determining the
reliability of PCA or PLS-DA models, but only a tool set for quantifying the
scores that those models produce. In the case of PCA scores, significance of
the principal components used must be inferred based on the explained sum of
squares or another cross-validation technique
\cite{eastment:tech1982,krzanowski:biom1987}. PLS-DA models require
rigorous cross-validation to ensure model reliability, as they almost always
yield perfect separations between the scores of different groups
\cite{kjeldahl:jchemo2010}. With that in mind, separations between
groups not under discrimination may be due to true experimental differences in
PLS-DA scores plots, as opposed to the forced separations between discriminated
groups. Thus, the interpretation of any results from the PCA utilities must be
done with the knowledge of the underlying algorithm's mathematical intent, and
only after the model has been validated. While we demonstrated confidence
region generation using only 2D and 3D scores plots, it is important to note
that the PCA utilities software package places no restriction on the number of
components or on which components may be used during dendrogram generation and
$p$ value calculation. Any dimensionality or choice of scores may be used with
the described methods, provided all components are suitably validated.
\\\\
The updated and enhanced version of PCAtoTree, called PCA utilities, provides
a novel means of quantifying and visualizing separation significance in PCA,
PLS-DA and OPLS-DA scores plots. Importantly, PCA utilities enables single-step
methodologies for generating informative scores plots and dendrograms of
experimental groups in {\it any} study utilizing PCA, PLS-DA or OPLS-DA to
elucidate group structure in complex datasets, including metabolic
fingerprinting and untargeted metabolic profiling. The tools are distributed
under version 3.0 of the GNU General Public License \cite{gpl3} and are freely
available at \url{http://bionmr.unl.edu/pca-utils.php}.
\end{doublespace}

\bibliographystyle{abbrv}
\bibliography{bworley}


% !TEX root = main.tex
% !TEX spellcheck = en-US

\section{Polynomial Commitment Schemes}
\label{sec:pcom}
A polynomial commitment scheme $\PCOM = (\kgen, \com, \open, \verify)$ consists of four
algorithms and allows to commit to a polynomial $\p{f}$ and later open the evaluation in a
point $z$ to some value $s=\p{f}(z)$. More formally:
\begin{description}
\item[$\kgen(1^\secpar, \maxdeg)$:] The key generation algorithm takes in a security
  parameter $\secpar$ and a parameter $\maxdeg$ which determines the maximal degree of the
  committed polynomial. It outputs a structured reference string $\srs$ (the commitment
  key). Note that $\srs$ implicitly determines $\secpar$ and $\maxdeg$.
\item[$\com(\srs, \p{f})$:] The commitment algorithm $\com(\srs, \p{f})$ takes
  in $\srs$ and a polynomial $\p{f}$ with maximum degree $\maxdeg$, and outputs
  a commitment $c$.
\item[$\open(\srs, z, s, \p{f})$:] The opening algorithm
  takes as input $\srs$, an evaluation point $z$, a
  value $s$ and the polynomial $\p{f}$. It outputs an opening $o$.
\item[$\verify(\srs, c, z, s, o)$:] The verification algorithm takes in $\srs$,
  a commitment $c$, an evaluation point $z$, a value $s$ and an opening $o$. It
  outputs 1 if $o$ is a valid opening for $(c, z, s)$ and 0 otherwise.
\end{description}

A secure polynomial commitment $\PCOM$ should satisfy correctness, evaluation binding,
opening uniqueness, hiding and knowledge-binding.  Note that since we are in the updatable
setting, $\srs$ in these security definitions is the SRS that $\advse$ finalizes using the
update oracle $\initU$ (See~\cref{fig:upd}).

\begin{description}
\item[Evaluation binding:] A $\ppt$ adversary $\adv$ which outputs a commitment
  $\vec{c}$ and evaluation points $\vec{z}$ has at most negligible chances to open
  the commitment to two different evaluations $\vec{s}, \vec{s'}$. That is, let
  $k \in \NN$ be the number of committed polynomials, $l \in \NN$ number of
  evaluation points, $\vec{c} \in \GRP^k$ be the commitments, $\vec{z} \in
  \FF_p^l$ be the arguments the polynomials are evaluated at, $\vec{s},\vec{s}'
  \in \FF_p^k$ the evaluations, and $\vec{o},\vec{o}' \in \FF_p^l$ be the
  commitment openings. Then for every $\ppt$ adversary $\adv$
	\[
		\condprob{
			\begin{matrix}
				  \verify(\srs, \vec{c}, \vec{z}, \vec{s}, \vec{o}) = 1,  \\
				  \verify(\srs, \vec{c}, \vec{z}, \vec{s}', \vec{o}') = 1, \\
				  \vec{s} \neq \vec{s}'
			\end{matrix}}
			{
			\begin{matrix}
%				& \srs \gets \kgen(\secparam, \maxdeg),\\
				 (\vec{c}, \vec{z}, \vec{s}, \vec{s}', \vec{o}, \vec{o}') \gets \adv^{\initU}(\maxdeg)
			\end{matrix}
		} \leq \negl\,.
	\]

\end{description}

\begin{description}
\item[Hiding:] We also formalize notion of $k$-hiding property of a polynomial commitment scheme. Let $\HHH$ be a set of size $\maxdeg + 1$ and $\ZERO_\HHH$ its
  vanishing polynomial. We say that a polynomial scheme is \emph{hiding} with
  security $\epsh(\secpar)$ if for every $\ppt$ adversary $\adv$, $k \in \NN$,
  probability
  \begin{align*}
    \condprob
   { b' = b}{
    (f_0, f_1, c, k, b') \gets \adv^{\initU, \oraclec}(\maxdeg, c), f_0, f_1 \in \FF^{\maxdeg}
    [X]}
\leq \frac{1}{2} + \eps(\secpar).
  \end{align*}
  Where $c = f'_b (\chi)$, for a random bit $b$ and the polynomial
      $f'_b (X) = f_b + \ZERO_\HHH (X) (a_0 + a_1 X + \ldots a_{k - 1} X^{k -
        1})$,
and the oracle $\oraclec$ on adversary's evaluation query $x$ it adds $x$ to initially empty set
      $Q_x$ and if $|Q_x| \leq k$, it provides $f'_b (x)$.

  \end{description}

\begin{description}
\item[Commitment of knowledge:] Intuitively, when a commitment scheme is ``of knowledge'' then if an
adversary produces a (valid) commitment $c$, which it can open correctly in an evaluation point, then it must
know the underlying polynomial $\p{f}$ which commits to that value.  For every $\ppt$ adversary $\adv$ who produces
  commitment $c$, evaluation $s$ and opening $o$ there
  exists a $\ppt$ extractor $\ext$ such that
\[
  \condprob{
    \begin{matrix}
       \deg \p{f} \leq \maxdeg,
       c = \com(\srs, \p{f}),\\
       \verify(\srs, c, z, s, o) = 1
    \end{matrix}
        }{
    \begin{matrix}
      %
     % & \srs \gets \kgen(\secparam, \maxdeg),\\
      c \gets \adv^{\initU}(\maxdeg),
      z \sample \FF_p \\
      (s, o) \gets \adv(c, z), \\
   \p{f} = \ext_\adv(\srs, c)\\
    \end{matrix}}
  \geq 1 - \epsk(\secpar).
\]
In that case we say that $\PCOM$ is $\epsk(\secpar)$-knowledge.
\end{description}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "main"
%%% End: