\subsection{Construction}
\begin{frame}{Social Network}
This social network is of a particular kind called \emph{two-mode networks} which consists of a set of actors (seiyuu) and events (anime).
\vspace{15pt}

Details to consider:
\begin{itemize}
\item We can choose between anime and seiyuu as nodes.
\item Nodes are time dependant (since they have debut year).
\item Edge or relationship definition:
	\begin{itemize}
	\item How many works in common?
	\item Which time frame?
	\end{itemize}
\end{itemize}
\vspace{15pt}
\end{frame}
%-------------------------------------------------------------------------

\begin{frame}
We compared several different graphs but will show only two definitions here using \emph{seiyuu as nodes} and, as edge definition:
\begin{itemize}
\item at least 1 work in common
\item at least 10 works in common
\end{itemize}
Both of them during the time frame between the first debut registered (1960) and the year of observation.
\end{frame}
%-------------------------------------------------------------------------

\subsection{Analysis}
\begin{frame}{One work in common}
\begin{figure}
	\begin{subfigure}{.6\linewidth}
		\includegraphics[scale=0.27, left]{graphics/atLeast1WorkCommunity.png}
	\end{subfigure}%
	\begin{subfigure}{.4\linewidth}
		\begin{description}
		\item[Avg degree] 267
		\item[Graph density] 0.09
		\item[Modularity] 0.2
		\item[Network diameter] 6
		\item[Connected components] 18
		\end{description}
	\end{subfigure}
\end{figure}
\end{frame}
%-------------------------------------------------------------------------

\begin{frame}{Ten works in common}
\begin{figure}
	\begin{subfigure}{.55\linewidth}
		\includegraphics[scale=0.55, left]{graphics/atLeast10WorksCommunity.png}
	\end{subfigure}%
	\begin{subfigure}{.45\linewidth}
		\begin{description}
		\item[Avg degree] 9
		\item[Graph density] 0.003
		\item[Modularity] 0.29
		\item[Network diameter] 7
		\item[Connected components] 2261
		\end{description}
	\end{subfigure}
\end{figure}
\end{frame}
%-------------------------------------------------------------------------

\begin{frame}{Features}
\begin{description}
	\item [Strongly connected] With merely $\sim$3000 nodes it has $\sim$400000 edges when only one work in common is required and $\sim$14000 edges when asking for 10 or more.
	\item [Big cluster] Thightly interconnected and big cluster surrounded by poorly or not connected nodes. (99\% of the nodes of one work in common graph and 23\% of 10 works in common).
	\item [Communities] We can see at least four clear communities in each graph.
	\item [Nodes] This graph is accumulative, so long carrier almost always means a strong node.
\end{description}
\end{frame}
%-------------------------------------------------------------------------

\begin{frame}{Edge growth}
\begin{figure}
	\centering
	\begin{subfigure}{.5\columnwidth}
		\centering
		\includegraphics[scale=0.35]{graphics/accumulationEdges_1_1960-2018.png}
	\end{subfigure}%
	\begin{subfigure}{.5\columnwidth}
		\centering
		\includegraphics[scale=0.35]{graphics/accumulationEdges_10_1960-2018.png}
	\end{subfigure}
\end{figure}
\begin{itemize}
\item Edge growth follows the same distribution with 1 and 10 works in common
\end{itemize}
\end{frame}
%-------------------------------------------------------------------------

\begin{frame}{Node growth}
\begin{center}
\includegraphics[scale=0.5]{graphics/nodesAccumulation.png}
\end{center}
\begin{itemize}
\item More than half of the nodes are from last 18 years (2000 to 2018)
\end{itemize}
\end{frame}
%-------------------------------------------------------------------------

\begin{frame}{Top 5 degree}
\begin{table}[!htb]
    \begin{minipage}{.5\textwidth}
        \centering
            \begin{tabular}{|l|c|}
				\hline
				Name & Degree \\
				\hline
				Takehito Koyasu & 1545 \\
				\hline
				Akira Ishida & 1488 \\
				\hline
				Mamiko Noto & 1422 \\
				\hline
				Nobuo Tobita & 1417 \\
				\hline
				Daisuke Namikawa & 1390 \\
				\hline
			\end{tabular}
            \caption{One work in common}
    \end{minipage}%
    \begin{minipage}{.6\textwidth}
        \centering
        \begin{tabular}{|l|c|}
				\hline
				Name & Degree \\
				\hline
				Takehito Koyasu & 311 \\
				\hline
				Akira Ishida & 273 \\
				\hline
				Mamiko Noto & 258 \\
				\hline
				Daisuke Namikawa & 232 \\
				\hline
				Katsuyuki Konishi & 229 \\
				\hline
			\end{tabular}
            \caption{Ten works in common}
    \end{minipage}
\end{table}
\end{frame}
%-------------------------------------------------------------------------

\begin{frame}{Top 5 betweenness centrality}
\begin{table}[!htb]
    \begin{minipage}{.5\textwidth}
        \centering
            \begin{tabular}{|l|c|}
				\hline
				Name & BtwC \\
				\hline
				Takehito Koyasu & 49982.52 \\
				\hline
				Akira Ishida & 40221.50 \\
				\hline
				Daisuke Namikawa & 30448.43 \\
				\hline
				Nobuo Tobita & 29363.25 \\
				\hline
				Mamiko Noto & 29168.18 \\
				\hline
		\end{tabular}
        \caption{One work in common}
    \end{minipage}%
    \begin{minipage}{.5\textwidth}
        \centering
        \begin{tabular}{|l|c|}
				\hline
				Name & BtwC \\
				\hline
				Takehito Koyasu & 18489.44 \\
				\hline
				Mamiko Noto & 10988.96 \\
				\hline
				Daisuke Namikawa & 9570.48 \\
				\hline
				Akira Ishida & 8299.19 \\
				\hline
				Rie Kugimiya & 7560.16 \\
				\hline
		\end{tabular}
        \caption{Ten works in common}
    \end{minipage}
\end{table}
\end{frame}
%-------------------------------------------------------------------------

\begin{frame}
Both networks have fairly similar top 5s so it points to them having similar structure and connections amoung their nodes, aside from actual values.
\vspace{10pt}

From now on our graph definition will be:
\begin{description}
\item[Node] Seiyuu
\item[Edge] At least 10 works in common from 1960 to year of observation.
\end{description}
\vspace{10pt}

Because requiring more jobs in common means less amount of edges, this leaves a more understandable graph and we verified it does without changing its structure so much.
\end{frame}


%* glpk09.tex *%

\chapter{CPLEX LP Format}
\label{chacplex}

\section{Prelude}

The CPLEX LP format\footnote{The CPLEX LP format was developed in
the end of 1980's by CPLEX Optimization, Inc. as an input format for
the CPLEX linear programming system. Although the CPLEX LP format is
not as widely used as the MPS format, being row-oriented it is more
convenient for coding mathematical programming models by human. This
appendix describes only the features of the CPLEX LP format which are
implemented in the GLPK package.} is intended for coding LP/MIP problem
data. It is a row-oriented format that assumes the formulation of LP/MIP
problem (1.1)---(1.3) (see Section \ref{seclp}, page \pageref{seclp}).

CPLEX LP file is a plain text file written in CPLEX LP format. Each text
line of this file may contain up to 255 characters\footnote{GLPK allows
text lines of arbitrary length.}. Blank lines are ignored. If a line
contains the backslash character ($\backslash$), this character and
everything that follows it until the end of line are considered as a
comment and also ignored.

An LP file is coded by the user using the following elements:

$\bullet$ keywords;

$\bullet$ symbolic names;

$\bullet$ numeric constants;

$\bullet$ delimiters;

$\bullet$ blanks.

\newpage

{\it Keywords} which may be used in the LP file are the following:

\begin{verbatim}
      minimize        minimum        min
      maximize        maximum        max
      subject to      such that      s.t.      st.      st
      bounds          bound
      general         generals       gen
      integer         integers       int
      binary          binaries       bin
      infinity        inf
      free
      end
\end{verbatim}

\noindent
All the keywords are case insensitive. Keywords given above on the same
line are equivalent. Any keyword (except \verb|infinity|, \verb|inf|,
and \verb|free|) being used in the LP file must start at the beginning
of a text line.

{\it Symbolic names} are used to identify the objective function,
constraints (rows), and variables (columns). All symbolic names are case
sensitive and may contain up to 16 alphanumeric characters\footnote{GLPK
allows symbolic names having up to 255 characters.} (\verb|a|, \dots,
\verb|z|, \verb|A|, \dots, \verb|Z|, \verb|0|, \dots, \verb|9|) as well
as the following characters:

\begin{verbatim}
!  "  #  $  %  &  (  )  /  ,  .  ;  ?  @  _  `  '  {  }  |  ~
\end{verbatim}

\noindent
with exception that no symbolic name can begin with a digit or a period.

{\it Numeric constants} are used to denote constraint and objective
coefficients, right-hand sides of constraints, and bounds of variables.
They are coded in the standard form $xx$\verb|E|$syy$, where $xx$ is
a real number with optional decimal point, $s$ is a sign (\verb|+| or
\verb|-|), $yy$ is an integer decimal exponent. Numeric constants may
contain arbitrary number of characters. The exponent part is optional.
The letter `\verb|E|' can be coded as `\verb|e|'. If the sign $s$ is
omitted, plus is assumed.

{\it Delimiters} that may be used in the LP file are the following:

\begin{verbatim}
      :
      +
      -
      <   <=   =<
      >   >=   =>
      =
\end{verbatim}

\noindent
Delimiters given above on the same line are equivalent. The meaning of
the delimiters will be explained below.

{\it Blanks} are non-significant characters. They may be used freely to
improve readability of the LP file. Besides, blanks should be used to
separate elements from each other if there is no other way to do that
(for example, to separate a keyword from a following symbolic name).

The order of an LP file is:

$\bullet$ objective function definition;

$\bullet$ constraints section;

$\bullet$ bounds section;

$\bullet$ general, integer, and binary sections (can appear in arbitrary
order);

$\bullet$ end keyword.

These components are discussed in following sections.

\section{Objective function definition}

The objective function definition must appear first in the LP file. It
defines the objective function and specifies the optimization direction.

The objective function definition has the following form:
$$
\left\{
\begin{array}{@{}c@{}}
{\tt minimize} \\ {\tt maximize}
\end{array}
\right\}\ f\ {\tt :}\ s\ c\ x\ s\ c\ x\ \dots\ s\ c\ x
$$
where $f$ is a symbolic name of the objective function, $s$ is a sign
\verb|+| or \verb|-|, $c$ is a numeric constant that denotes an
objective coefficient, $x$ is a symbolic name of a variable.

If necessary, the objective function definition can be continued on as
many text lines as desired.

The name of the objective function is optional and may be omitted
(together with the semicolon that follows it). In this case the default
name `\verb|obj|' is assigned to the objective function.

If the very first sign $s$ is omitted, the sign plus is assumed. Other
signs cannot be omitted.

If some objective coefficient $c$ is omitted, 1 is assumed.

Symbolic names $x$ used to denote variables are recognized by context
and therefore needn't to be declared somewhere else.

Here is an example of the objective function definition:

\begin{verbatim}
   Minimize Z : - x1 + 2 x2 - 3.5 x3 + 4.997e3x(4) + x5 + x6 +
      x7 - .01x8
\end{verbatim}

\section{Constraints section}

The constraints section must follow the objective function definition.
It defines a system of equality and/or inequality constraints.

The constraint section has the following form:

\begin{center}
\begin{tabular}{l}
\verb|subject to| \\
{\it constraint}$_1$ \\
{\it constraint}$_2$ \\
\hspace{20pt}\dots \\
{\it constraint}$_m$ \\
\end{tabular}
\end{center}

\noindent where {\it constraint}$_i, i=1,\dots,m,$ is a particular
constraint definition.

Each constraint definition can be continued on as many text lines as
desired. However, each constraint definition must begin on a new line
except the very first constraint definition which can begin on the same
line as the keyword `\verb|subject to|'.

Constraint definitions have the following form:
$$
r\ {\tt:}\ s\ c\ x\ s\ c\ x\ \dots\ s\ c\ x
\ \left\{
\begin{array}{@{}c@{}}
\mbox{\tt<=} \\ \mbox{\tt>=} \\ \mbox{\tt=}
\end{array}
\right\}\ b
$$
where $r$ is a symbolic name of a constraint, $s$ is a sign \verb|+| or
\verb|-|, $c$ is a numeric constant that denotes a constraint
coefficient, $x$ is a symbolic name of a variable, $b$ is a right-hand
side.

The name $r$ of a constraint (which is the name of the corresponding
auxiliary variable) is optional and may be omitted (together with the
semicolon that follows it). In this case the default names like
`\verb|r.nnn|' are assigned to unnamed constraints.

The linear form $s\ c\ x\ s\ c\ x\ \dots\ s\ c\ x$ in the left-hand
side of a constraint definition has exactly the same meaning as in the
case of the objective function definition (see above).

After the linear form one of the following delimiters that indicate
the constraint sense must be specified:

\verb|<=| \ means `less than or equal to'

\verb|>=| \ means `greater than or equal to'

\verb|= | \ means `equal to'

The right hand side $b$ is a numeric constant with an optional sign.

Here is an example of the constraints section:

\begin{verbatim}
   Subject To
      one: y1 + 3 a1 - a2 - b >= 1.5
      y2 + 2 a3 + 2
         a4 - b >= -1.5
      two : y4 + 3 a1 + 4 a5 - b <= +1
      .20y5 + 5 a2 - b = 0
      1.7 y6 - a6 + 5 a777 - b >= 1
\end{verbatim}

(Should note that it is impossible to express ranged constraints in the
CPLEX LP format. Each a ranged constraint can be coded as two
constraints with identical linear forms in the left-hand side, one of
which specifies a lower bound and other does an upper one of the
original ranged constraint.)

\section{Bounds section}

The bounds section is intended to define bounds of variables. This
section is optional; if it is specified, it must follow the constraints
section. If the bound section is omitted, all variables are assumed to
be non-negative (i.e. that they have zero lower bound and no upper
bound).

The bounds section has the following form:

\begin{center}
\begin{tabular}{l}
\verb|bounds| \\
{\it definition}$_1$ \\
{\it definition}$_2$ \\
\hspace{20pt}\dots \\
{\it definition}$_p$ \\
\end{tabular}
\end{center}

\noindent
where {\it definition}$_k, k=1,\dots,p,$ is a particular bound
definition.

Each bound definition must begin on a new line\footnote{The GLPK
implementation allows several bound definitions to be placed on the same
line.} except the very first bound definition which can begin on the
same line as the keyword `\verb|bounds|'.

Syntactically constraint definitions can have one of the following six
forms:

\begin{center}
\begin{tabular}{ll}
$x$ \verb|>=| $l$ &              specifies a lower bound \\
$l$ \verb|<=| $x$ &              specifies a lower bound \\
$x$ \verb|<=| $u$ &              specifies an upper bound \\
$l$ \verb|<=| $x$ \verb|<=| $u$ &specifies both lower and upper bounds\\
$x$ \verb|=| $t$                &specifies a fixed value \\
$x$ \verb|free|                 &specifies free variable
\end{tabular}
\end{center}

\noindent
where $x$ is a symbolic name of a variable, $l$ is a numeric constant
with an optional sign that defines a lower bound of the variable or
\verb|-inf| that means that the variable has no lower bound, $u$ is a
numeric constant with an optional sign that defines an upper bound of
the variable or \verb|+inf| that means that the variable has no upper
bound, $t$ is a numeric constant with an optional sign that defines a
fixed value of the variable.

By default all variables are non-negative, i.e. have zero lower bound
and no upper bound. Therefore definitions of these default bounds can be
omitted in the bounds section.

Here is an example of the bounds section:

\begin{verbatim}
   Bounds
      -inf <= a1 <= 100
      -100 <= a2
      b <= 100
      x2 = +123.456
      x3 free
\end{verbatim}

\section{General, integer, and binary sections}

The general, integer, and binary sections are intended to define
some variables as integer or binary. All these sections are optional
and needed only in case of MIP problems. If they are specified, they
must follow the bounds section or, if the latter is omitted, the
constraints section.

All the general, integer, and binary sections have the same form as
follows:

\begin{center}
\begin{tabular}{l}
$
\left\{
\begin{array}{@{}l@{}}
\verb|general| \\
\verb|integer| \\
\verb|binary | \\
\end{array}
\right\}
$ \\
\hspace{10pt}$x_1$ \\
\hspace{10pt}$x_2$ \\
\hspace{10pt}\dots \\
\hspace{10pt}$x_q$ \\
\end{tabular}
\end{center}

\noindent
where $x_k$ is a symbolic name of variable, $k=1,\dots,q$.

Each symbolic name must begin on a new line\footnote{The GLPK
implementation allows several symbolic names to be placed on the same
line.} except the very first symbolic name which can begin on the same
line as the keyword `\verb|general|', `\verb|integer|', or
`\verb|binary|'.

If a variable appears in the general or the integer section, it is
assumed to be general integer variable. If a variable appears in the
binary section, it is assumed to be binary variable, i.e. an integer
variable whose lower bound is zero and upper bound is one. (Note that
if bounds of a variable are specified in the bounds section and then
the variable appears in the binary section, its previously specified
bounds are ignored.)

Here is an example of the integer section:

\begin{verbatim}
   Integer
      z12
      z22
      z35
\end{verbatim}

\section{End keyword}

The keyword `\verb|end|' is intended to end the LP file. It must begin
on a separate line and no other elements (except comments and blank
lines) must follow it. Although this keyword is optional, it is strongly
recommended to include it in the LP file.

\section{Example of CPLEX LP file}

Here is a complete example of CPLEX LP file that corresponds to the
example given in Section \ref{secmpsex}, page \pageref{secmpsex}.

{\footnotesize
\begin{verbatim}
\* plan.lp *\

Minimize
   value: .03 bin1 + .08 bin2 + .17 bin3 + .12 bin4 + .15 bin5 +
          .21 alum + .38 silicon

Subject To
   yield:     bin1 +     bin2 +     bin3 +     bin4 +     bin5 +
              alum +     silicon                                 =  2000

   fe:    .15 bin1 + .04 bin2 + .02 bin3 + .04 bin4 + .02 bin5 +
          .01 alum + .03 silicon                                 <=   60

   cu:    .03 bin1 + .05 bin2 + .08 bin3 + .02 bin4 + .06 bin5 +
          .01 alum                                               <=  100

   mn:    .02 bin1 + .04 bin2 + .01 bin3 + .02 bin4 + .02 bin5   <=   40

   mg:    .02 bin1 + .03 bin2                       + .01 bin5   <=   30

   al:    .70 bin1 + .75 bin2 + .80 bin3 + .75 bin4 + .80 bin5 +
          .97 alum                                               >= 1500

   si1:   .02 bin1 + .06 bin2 + .08 bin3 + .12 bin4 + .02 bin5 +
          .01 alum + .97 silicon                                 >=  250

   si2:   .02 bin1 + .06 bin2 + .08 bin3 + .12 bin4 + .02 bin5 +
          .01 alum + .97 silicon                                 <=  300

Bounds
          bin1 <=  200
          bin2 <= 2500
   400 <= bin3 <=  800
   100 <= bin4 <=  700
          bin5 <= 1500

End

\* eof *\
\end{verbatim}

}

%* eof *%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  My documentation report
%  Objetive: Explain what I did and how, so someone can continue with the investigation
%
% Important note:
% Chapter heading images should have a 2:1 width:height ratio,
% e.g. 920px width and 460px height.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
%	PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[11pt,fleqn]{book} % Default font size and left-justified equations

\usepackage[top=3cm,bottom=3cm,left=3.2cm,right=3.2cm,headsep=10pt,letterpaper]{geometry} % Page margins

\usepackage{xcolor} % Required for specifying colors by name
\definecolor{ocre}{RGB}{52,177,201} % Define the orange color used for highlighting throughout the book

% Font Settings
\usepackage{avant} % Use the Avantgarde font for headings
%\usepackage{times} % Use the Times font for headings
\usepackage{mathptmx} % Use the Adobe Times Roman as the default text font together with math symbols from the Symbol, Chancery and Computer Modern fonts
\usepackage{microtype} % Slightly tweak font spacing for aesthetics
\usepackage[utf8]{inputenc} % Required for including letters with accents
\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
\usepackage{amsthm}

% Bibliography
\usepackage[style=alphabetic,sorting=nyt,sortcites=true,autopunct=true,babel=hyphen,hyperref=true,abbreviate=false,backref=true,backend=biber]{biblatex}
\addbibresource{bibliography.bib} % BibTeX bibliography file
\defbibheading{bibempty}{}

\input{structure} % Insert the commands.tex file which contains the majority of the structure behind the template

%----------------------------------------------------------------------------------------
%	Definitions of new commands
%----------------------------------------------------------------------------------------

\def\R{\mathbb{R}}
\newcommand{\cvx}{convex}
\begin{document}

%----------------------------------------------------------------------------------------
%	TITLE PAGE
%----------------------------------------------------------------------------------------

\begingroup
\thispagestyle{empty}
\AddToShipoutPicture*{\put(0,0){\includegraphics[scale=1.25]{esahubble}}} % Image background
\centering
\vspace*{5cm}
\par\normalfont\fontsize{35}{35}\sffamily\selectfont
\textbf{Computational Biology 2021}\\
{\LARGE Expectation-Maximization of the Potential of Mean Force}\par % Book title
\vspace*{1cm}
{\Huge Technical Report}\par % Author name
\endgroup

%----------------------------------------------------------------------------------------
%	COPYRIGHT PAGE
%----------------------------------------------------------------------------------------

\newpage
~\vfill
\thispagestyle{empty}

%\noindent Copyright \copyright\ 2014 Andrea Hidalgo\\ % Copyright notice

\noindent \textsc{Biosystems Simulation Lab, National Chiao Tung University}\\

\noindent \textsc{https://github.com/yizaochen/em_theory}\\ % URL

\noindent This research was done under the supervision of Dr. Jhih-Wei Chu with the financial support of MOST Taiwan.\\ % License information

\noindent \textit{First release, November 2020} % Printing/edition date

%----------------------------------------------------------------------------------------
%	TABLE OF CONTENTS
%----------------------------------------------------------------------------------------

\chapterimage{head1.png} % Table of contents heading image

\pagestyle{empty} % No headers

\tableofcontents % Print the table of contents itself

%\cleardoublepage % Forces the first chapter to start on an odd page so it's on the right

\pagestyle{fancy} % Print headers again

%----------------------------------------------------------------------------------------
%	CHAPTER 1
%----------------------------------------------------------------------------------------

\chapterimage{head2.png} % Chapter heading image
\chapter{Convex Sets}
\section{Convexity}
\subsection{Cone}
\begin{definition}[Cone]
A set $K \in \R^n$, when $x \in K $ implies $\alpha x \in K$.
\end{definition}
A non convex cone can be hyper-plane.\\
For convex cone $x + y \in K, \forall x,y \in K$.\\
Cone don't need to be "pointed". e.g. \\
Direct sums of cones $C_1 + C_2 = \{ x = x_1+x_2 | x_1 \in C_1, x_2 \in C_2 \}$.\\
\begin{example}
$S_1^n  \{ X | X=X^n ,\lambda(x) \ge 0\}$\\
A matrix with positive eigenvalues.
\end{example}

\subsubsection{Operations preserving convexity}
\begin{itemize}
\item[Intersection] $C  \cap_{i \in \mathbb{I}}C_i$
\item[Linear map] Let $A : \mathbb{R}^n \to  \R^n$ be a linear map. If $C \in \R^n$ is convex, so is $A(C) = \{Ax \forall x \in C \}$
\item[Inverse image] $A^{-1}(D) = \{ x \in \R |Ax \in D \}$
\end{itemize}

\subsubsection{Operations that induce convexity}
Convex hull on $S = \cap \{C | S\in C, C is convex\}$\\
\begin{example}
$Co \{ x_1,x_2,\cdots,x_m\} = \{ \sum_{i=1}^m \alpha_i x_i | \alpha \in \delta_m \}$
\end{example}
For a convex set $x \in C \Rightarrow x = \sum \alpha_i x_i$.
\begin{theorem}[Carathéodory's theorem]
If a point $x \in \R^d$ lies in the convex hull of a set $P$, there is a subset $P'$ of $P$ consisting of $d + 1$ or fewer points such that $x$ lies in the convex hull of $P'$. Equivalently, x lies in an r-simplex with vertices in P.
\end{theorem}

\section{Convex Functions}
\begin{definition}[Convex function]
Let $C \in \R^n$ be convex, $f:C \to \R$ is convex on f if $x,y \in C \times C$. $\forall \alpha \in (0,1)$, $f(\alpha x + (1-\alpha) y) \le f(\alpha x) + f((1-\alpha) y)$
\end{definition}

\begin{definition}[Strictly Convex function]
Let $C \in \R^n$ be convex, $f:C \to \R$ is strictly convex on f if $x,y \in C \times C$. $\forall \alpha \in (0,1)$, $f(\alpha x + (1-\alpha) y) \langle f(\alpha x) + f((1-\alpha) y)$
\end{definition}

\begin{definition}[Strongly convex]
$f:C \to \R$ is strongly convex with modules $u \ge 0$ if $f - \frac{1}{2}u || \cdot ||^2$ is convex.
\end{definition}
Interpretation: There is a convex quadratic $\frac{1}{2}u || \cdot ||^2$ that lower bounds f.
\begin{example}
$\min_{x \in C} f(x) \leftrightarrow \min \bar{f}(x)$
Useful to turn this into an unconstrained problem. \\
$$\bar{f}(x) = \begin{cases}
f(x) \quad if x \in C \\
\infty \quad  elsewhere
\end{cases}$$
\end{example}
\begin{definition}
A function $f : \R^n \to \R \cup \infty \ \bar{\R}$ is convex if $x,y \in \R^n \times \R^n$, $\forall x,y , \bar{f}(\alpha x + (1-\alpha) y) \le f(\alpha x) + f((1-\alpha) y)$
\end{definition}
Definition 1 is equivalent to definition 2 if $f(x) = \infty$.
\begin{example}
$f(x) = \sup_{j \in J} f_j(x)$
\end{example}

\subsection{Epigraph}
\begin{definition}[Epigraph]
For $f: \R^n \rightarrow \bar{R}$, its epigraph $epi(f) \in \R^{n+1} is the set epi(f) \{ (x,\alpha) | f(x) \in \alpha \}$
\end{definition}
Next: a function is convex i.f.f. its epigraph is convex.

\begin{definition}
A function $f : C \rightarrow \R, C \in \R^n$ is convex if $\forall x, y \in C$, $f(ax + (1-a)x) \le af(x) + (1-a)f(x) \quad \forall a \in (0,1)$.\\
Strict convex: $x \neq y \Rightarrow f(ax + (1-a)x) \le af(x) + (1-a)f(x) $
\end{definition}
\begin{remark}
$f$ is convex $\Rightarrow$ $-f$ is concave.
\end{remark}
Level set: $S_{\alpha}f = \{ x | f(x) \le \alpha \}$.\\
$S_{\alpha}f$ is convex $\Leftrightarrow$ $f$ is convex. \\
\begin{definition}[Strongly convex]
$f : C \rightarrow \R$ is strongly convex with modules $\mu$ if $\forall x, y \in C$, $\forall \alpha \in (0,1)$, $f(ax + (1-a)x) \le af(x) + (1-a)f(x) - \frac{1}{2\mu}\alpha(1- \alpha) \|x-y\|^2$.
\end{definition}

\begin{remark}
\begin{itemize}
\item $f$ is 2nd-differentiable, $f$ ix \cvx $\iff$ $\nabla^2f(x) \rangle  0$.
\item $f$ is strongly \cvx $\iff$ $\nabla^2f(x) \rangle  \mu I$ $\iff$ $x \ge \mu$
\end{itemize}
\end{remark}
\begin{definition}[2]
$f : \R^n \to \bar{\R} $ is \cvx  if $x, y  \in \R , \alpha \in (0,1), f(ax + (1-a)x) \le af(x) + (1-a)f(x)$.
\end{definition}
The effective domain of $f$ is $dom f = \{x | f(x) \langle + \infty \}$
\begin{example}[ludcator function]
$\delta_c(x) = \begin{cases}
0 \quad  x \in C \\
+ \infty \quad elsewhere
\end{cases}$.\\
$dom \space \delta_c(x) = C$
\end{example}
\begin{definition}[Epigraph]
The epigraph of f is $epi \space f = \{(x,\alpha) | f(x) \le \alpha\}$
\end{definition}
The graph of $epi \space f$ is $\{ (x,f(x) | x \in dom \space f\}$.
\begin{definition}[III]
A function $f : \R^n \to \bar{\R}$ is %\cvx  if $\epi \space f $ is \cvx
\end{definition}
\begin{theorem}
$f : \R^n \to \bar{\R}$ is \cvx  $\iff$ $\forall x,y \in \R^n, \alpha \in (0,1), f(ax + (1-a)x) \le af(x) + (1-a)f(x)$.
\end{theorem}
\begin{proof}
$\Rightarrow$ take $x,y \in dom \space f$, $(x,f(x)) \in epi \space f$,$(y,f(y)) \in epi \space f$.
\end{proof}

\begin{example}[Distance]
Distance to a \cvx  set $d_c(x) = \inf \{ \| z-x \| | z \in C \}$. Take any two sequence $\{ y_k\} and \{ \bar{y}_k\} \subset C$ s.t. $\| y_k - x\| \to d_c(x)$, $\| \bar{y}_k - \bar{x}\| \to d_c(\bar{x})$. $z_k = \alpha y_k + (1 - \alpha) \bar{y}_k$.
\begin{align*}
d_c(\alpha x + (1-\alpha) \bar{x}) &\le \| z_k - \alpha x - (1 - \alpha) \bar{x}\| \\
& = \| \alpha(y_k - x) + (1 - \alpha)(\bar{y}_k - \bar{x})\| \\
& \le \alpha \| y_k - x\| + (1 - \alpha ) \|\bar{y}_k - \bar{x}\|
\end{align*}
Take $k \to \infty$, $d_c(\alpha x + (1 - \alpha) \bar{x}) \le \alpha d(x) + (1 - \alpha) d(\bar{x})$
\end{example}
\begin{example}[Eigenvalues]
Let $X \in S^n := \{ n \times n symmetric matrix\}$. $\lambda_1(x) \ge \lambda_2(X) \ge \ldots \ge \lambda_n(x)$.\\
$f_k(x) = \sum_{1}^n \lambda_i(x)$.\\
Equivalent characterization

\begin{align*}
f_k(x) & = \max\{ \sum_{i} v_i^T Xv_i | v_i \perp v_j , i \neq j\} \\
& =  \max\{ tr( V^TXV | V^T V = I_k \} \\
\max \{tr(VV^TX) \} \text{by circularity}
\end{align*}
Note $\langle A,B\rangle  = tr(A,B)$ is true for symmetric matrix. \\
$\langle A,A\rangle  = |A |_F^2 = \sum_{i} A_{ii}^2$
\end{example}

\section{Support Function}
Take a set $C \in \R^n$, not necessarily convex.The support function is $\sigma_C = \R^n \to \bar{\R}$. $\sigma_C(x) = \sum \{ \langle x,u\rangle  | u \in C\}$.
\includegraphics[scale=0.5]{1_1.png}
\begin{fact}
The support function binds the supporting hyper-plane.
\end{fact}

Supporting functions are
\begin{itemize}
\item Positively homogeneous\\
$\sigma_C(\alpha x) = \alpha \sigma_C(x) \forall \alpha \rangle  0$ \\
$\sigma_C(\alpha x ) = \sup_{u \in C} \langle \alpha x, u\rangle  = \alpha \sup_{u \in C} \langle x, u\rangle  = \alpha \sigma_C(x)$
\item Sub-linear( a special case of convex, linear combination holds $\forall \alpha$.\\
$\sigma_C(\alpha x + (1 - \alpha) y ) = \sup_{u \in C} \langle \alpha x + (1 - \alpha) y,u\rangle  \le \alpha\sup_{u \in C}\langle x,u\rangle  + (1 - \alpha)\sup_{u \in C}\langle y,u\rangle  $
\end{itemize}
\begin{example}[L2-norm]
$\| x \| = \sup_{u \in C} \{ \langle x, u \rangle, u \in \R^n \}$.\\
$\|x \|_p = \sup \{ \langle x, u \rangle, u \in B_q \}$ where $\frac{1}{p} + \frac{1}{q} = 1$. $B_q = \{ \|x \|_q \le 1\}$.\\
The norm is
\begin{itemize}
\item Positive homogeneous
\item sub-linear
\item If $0 \in C$, $\sigma_C$ is non-negative.
\item If $C$ is central-symmetric, $\sigma_C(0) = 0$ and $\sigma_C(x) = \sigma_C(-x)$
\end{itemize}
\end{example}

\begin{fact}[Epigraph of a support function]
$epi \space \sigma_C = \{ (x,t) | \sigma_C(x) \le t\}$.
Suppose $(x,t) \in epi \space \sigma_C$. Take any  $\alpha > 0$. $\alpha(x,t) = (\alpha x, \alpha t)$.\\
$\alpha \sigma_C(x) = \alpha \sigma_C(x) \le \alpha t$. $\alpha(x,c) \in epi
\sigma_C$\\
\includegraphics[]{1_2}
\end{fact}

\section{Operations Preserve Convexity of Functions}
\begin{itemize}
\item Positive affine transformation \\
$f_1,f_2,\ldots,f_k \in \space cvx \R^n$.\\
$f = \alpha_1 f_1 + \alpha_2 f_2 + \ldots + \alpha_k f_k$
\item Supremum of functions. Let $\{ f_i \}_{i \in I}$ be arbitrary family of functions. If $\exists x \sup_{j \in J} f_j(x) < \infty \Leftrightarrow f(x) = \sup_{j \in J} f_j(x) $\\
\includegraphics[]{1_3}
\item Composition with linear map.\\
$f \in cvx \R^n$, $A:\R^n \to \R^m$ is a linear map.
$f \circ A (x) = f(Ax) \in cvx \R^n$\\
\begin{align*}
f \circ A (x) & = f(A(\alpha x + (1-\alpha) y)) \\
& = f(A \alpha x + (1-\alpha) A y) \\
& \le \alpha f(Ax) + (a - \alpha) f(Ay)
\end{align*}
\end{itemize}

\end{document}


\section{Properties}

Properties are special non-instantiable types that can be inherited by other types but that will not be inherited by their subtypes.
Properties can be used wherever an inheritance operator is legal.
Their meaning is given by external tools.
The Language defines several properties that are used to influence the behaviour of the Tyr compiler.
Properties can be compared to attributes in C++ or annotations in Java.

\subsection{Predefined Properties}

\subsubsection{native}
States that the defined entity is implemented by the compiler.
If the defined entity is unknown to the compiler, an error will be issued and compilation will be aborted without producing a result.

\paragraph{Usage Restrictions}
Only types, classes and type members.

\subsubsection{CT}
Requires, that the value stored in the entity is a compile time constant.
For instance, an integer literal or the name of a type can be supplied.
This property is used to allow compile-time evaluation of type-level functions.

\paragraph{Usage Restrictions}
Variables, parameters, values.

\subsubsection{covariant}
$\texttt{type T(V : Type <: covariant)} \Rightarrow \forall u,v \in \texttt{Type}. u <: v \Rightarrow T(u) <: T(v)$.
This means that results of a type-level function use an inheritance hierarchy that equals their arguments.

\paragraph{Usage Restrictions}
Type parameters.

\subsubsection{contravariant}

$\texttt{type T(V : Type <: contravariant)} \Rightarrow \forall u,v \in \texttt{Type}. u <: v \Rightarrow T(v) <: T(u)$.
This means that results of a type-level function use an inheritance hierarchy that equals the opposite of their arguments.

\paragraph{Usage Restrictions}
Type parameters.

\subsubsection{generic}
States that only one implementation should be used to represent all values for a given type variable, i.e. the type variable is only used for type checking.
The representation will use the super type of the type variable.

\paragraph{Usage Restrictions}
Type parameters with a super type with known representation.

\subsubsection{public}
\subsubsection{protected}
\subsubsection{private}


\subsection{Estimating other priors}

\subsubsection{Estimating \(P(k|T)\) - Which variables we split by, given the tree size}

\subsubsection{Estimating \(P(r|T, k)\) - The cutoff, given the tree size and the variables we are splitting by}

\subsubsection{Estimating \(P(\theta | T, k, r)\)}


% !TEX root = ../zeth-protocol-specification.tex

\chapter{Fuzzy message detection}\label{appendix:fmd}

As explained in~\ref{zeth-protocol:zeth-receive} and~\ref{client-security:syncing}, in order to receive $\zethnotes$, a $\zeth$ user must listen on a broadcast channel, and try to decrypt all encrypted events emitted by the $\mixer$ contract. While providing the best potential for indistinguishability (all users scan the chain data and expose the same behavior), such routine is particularly expensive to carry out, especially for computationally restricted users (i.e.~users with computationally limited devices).

As a way to trade-off the users' anonymity and the cost of the message detection routine in privacy-preserving protocols, Beck et al.~\cite{DBLP:journals/iacr/BeckLMG21} introduced the notion of \emph{fuzzy message detection schemes}. These protocols allow the delegation of message detection to untrustworthy servers, without revealing precisely which messages belong to the receiver, by allowing receivers to enforce false-positive detection rates.
Such schemes provide a promising avenue for reconciliating recipient anonymity (via \emph{key ambiguity} and message \emph{detection ambiguity}) and the performance of the $\zethnotes$ receiving algorithm that currently needs to run on a machine belonging to (or trusted by) the recipient.

Nevertheless, the selection of the fuzzy detection parameters for $\zeth$ is a challenge, especially the selection of the false-positive rate.
Under the scheme presented in \cite{DBLP:journals/iacr/BeckLMG21}, not only is this parameter public (an additional ``leakage'' of information\footnote{limited to one server (in the best case), or to the whole network (in the worst case --- if the adversary broadcasts all its known information)}, including to potentially adversarial nodes), but this parameter is likely to be set to different values by different users, based on the number of payments they receive through $\zeth$.  This, coupled with the existing gas-related leakages, will increase the set of information leakages in the protocol, the consequences of which are hard to properly estimate. Furthermore, letting such parameters be set by users raises other challenges for wallet developers, user experience (UX) engineers and documentation engineers. In fact, any degree of liberty given to the user increases the potential for ``deviation'' from the ``expected/indistinguishable'' behavior. Hence, UX/documentation/wallet engineers must be able to suggest sensible default values for such parameters, must extensively document the purpose of these parameters and must extensively educate the end-users to maximize the chances of adequate parameter selections. While feasible, such tasks largely rely on modeling efforts\footnote{See e.g.~\url{https://git.openprivacy.ca/openprivacy/fuzzytags-sim}}, which simplify real-world systems and can only be used to simulate a limited set of situations.
Moreover, not being able to easily (i.e.~without distributing new keys) update the false-positive rate over time is problematic in the context of $\zeth$ as it does not allow users to have adaptable false-positive probabilities to account for potential spikes in the number of payments they receive (e.g.~a merchant during sales).

On the other hand, and as mentioned above, being able to use \emph{fuzzy message detection schemes} in $\zeth$ would also widen the user base of the protocol, which, as a consequence, would widen the anonymity set.


\chapter{Machine Learning and Image Classification}
\input{6DL/IntroML}


\documentclass{documentation}

\title{Sylver Package}

\author{Joshua Maglione}
\address{Universit\"at Bielefeld}
\email{jmaglione@math.uni-bielefeld.de}

\author{James B. Wilson}
\address{Colorado State University}
\email{james.wilson@colostate.edu}

\version{1.0}
\date{\today}
\copyrightyear{2016--2019}

\input{preamble.tex}

%-----------------------------------------------------------------------------
\begin{document}

\frontmatter

\dominitoc
\maketitle
\tableofcontents

\mainmatter

\chapter{Introduction}

\chapter{Invariants for bilinear tensors}

The following intrinsics are specialized for tensors of valence 3, but equivalent intrinsics for general tensors are presented in the proceeding subsection.

\index{AdjointAlgebra}
\begin{intrinsics}
AdjointAlgebra(t) : TenSpcElt -> AlgMat
\end{intrinsics}

Returns the adjoint $*$-algebra of the given Hermitian bilinear map $t$, represented on $\End(U_2)$.
This is using algorithms from {\sc StarAlge}, see the \texttt{AdjointAlgebra} intrinsic in \cite{BW:StarAlge}.
If the current version of {\sc StarAlge} is not attached, the default {\sc Magma} version will be used instead.

\begin{example}[AdjointAlge]

Given the context of \cite{BW:isometry}, we construct a tensor from a $p$-group and compute its adjoint algebra.
\begin{code}
> G := SmallGroup(3^7, 7000);
> t := pCentralTensor(G);
> t;
Tensor of valence 3, U2 x U1 >-> U0
U2 : Full Vector space of degree 4 over GF(3)
U1 : Full Vector space of degree 4 over GF(3)
U0 : Full Vector space of degree 3 over GF(3)
\end{code}

Unlike other intrinsics that compute invariants of tensors, \texttt{AdjointAlgebra} exploits the fact that $t$ is Hermitian so that the adjoint algebra is faithfully represented on $\End(U_2)=\End(U_1)$.
\begin{code}
> A := AdjointAlgebra(t);
> A;
Matrix Algebra of degree 4 and dimension 4 with 4 generators over GF(3)
> A.1;
[1 0 0 0]
[0 0 0 0]
[0 0 0 0]
[0 0 0 1]
\end{code}

Because $A$ is constructed from algorithms in {\sc StarAlge}, we can apply other algorithms from that package specifically dealing with the involution on $A$.
See \textsc{StarAlge} \cite{BW:StarAlge} for descriptions of the intrinsics.
\begin{code}
> RecognizeStarAlgebra(A);
true
> SimpleParameters(A);
[ <"symplectic", 2, 3> ]
> Star(A);
Mapping from: AlgMat: A to AlgMat: A given by a rule [no inverse]
\end{code}
\end{example}

\index{LeftNucleus!bilinear}
\begin{intrinsics}
LeftNucleus(t) : TenSpcElt -> AlgMat
    op : BoolElt : false
\end{intrinsics}

Returns the left nucleus of the bilinear map $t$ as a subalgebra of $\End(U_2)\times \End(U_0)$.
In previous versions of TensorSpace (and eMAGma), the left nucleus was returned as a subalgebra of $\End(U_2)^\op\times \End(U_0)^\op$.
To enable this, set the optional arugment \texttt{op} to \texttt{true}.

\index{MidNucleus!bilinear}
\begin{intrinsics}
MidNucleus(t) : TenSpcElt -> AlgMat
\end{intrinsics}

Returns the mid nucleus of the bilinear map $t$ as a subalgebra of $\End(U_2)\times \End(U_1)^\op$.

\index{RightNucleus!bilinear}
\begin{intrinsics}
RightNucleus(t) : TenSpcElt -> AlgMat
\end{intrinsics}

Returns the right nucleus of the bilinear map $t$ as a subalgebra of $\End(U_1)\times \End(U_0)$.

\begin{example}[GoingNuclear]

We will verify a theorem from \cite{FMW:densors} and \cite{Wilson:LMR}: all the nuclei of a tensor embed into the derivation algebra.
We construct the tensor given by $(3\times 4\times 5)$-matrix multiplcation.
\begin{code}
> K := Rationals();
> A := KMatrixSpace(K, 3, 4);
> B := KMatrixSpace(K, 4, 5);
> C := KMatrixSpace(K, 3, 5);
> F := func< x | x[1]*x[2] >;
> t := Tensor([A, B, C], F);
> t;
Tensor of valence 3, U2 x U1 >-> U0
U2 : Full Vector space of degree 12 over Rational Field
U1 : Full Vector space of degree 20 over Rational Field
U0 : Full Vector space of degree 15 over Rational Field
\end{code}

Because matrix multiplication is associative, the left, middle, and right nuclei contain $\mathbb{M}_3(\mathbb{Q})$, $\mathbb{M}_4(\mathbb{Q})$, and $\mathbb{M}_5(\mathbb{Q})$ respectively.
In fact, the following computation shows that this is equality.
\begin{code}
> L := LeftNucleus(t : op := true);
> M := MidNucleus(t);
> R := RightNucleus(t);
> Dimension(L), Dimension(M), Dimension(R);
9 16 25
> D := DerivationAlgebra(t);
> Dimension(D);
49
\end{code}

Now we will embed these nuclei into the derivation algebra of $t$.
\begin{code}
> Omega := KMatrixSpace(K, 47, 47);
> Z1 := ZeroMatrix(K, 20, 20);
> L_L2, L2 := Induce(L, 2);
> L_L0, L0 := Induce(L, 0);
> embedL := map< L -> Omega | x :->
>     DiagonalJoin(<Transpose(x @ L_L2), Z1, Transpose(x @ L_L0)>) >;
>
> Z0 := ZeroMatrix(K, 15, 15);
> M_M2, M2 := Induce(M, 2);
> M_M1, M1 := Induce(M, 1);
> embedM := map< M -> Omega | x :->
>     DiagonalJoin(<x @ M_M2, -Transpose(x @ M_M1), Z0>) >;
>
> Z2 := ZeroMatrix(K, 12, 12);
> R_R1, R1 := Induce(R, 1);
> R_R0, R0 := Induce(R, 0);
> embedR := map< R -> Omega | x :->
>     DiagonalJoin(<Z2, x @ R_R1, x @ R_R0>) >;
>
> Random(Basis(L)) @ embedL in D;
true
> Random(Basis(M)) @ embedM in D;
true
> Random(Basis(R)) @ embedR in D;
true
\end{code}
\end{example}

\chapter{Invariants of general multilinear maps}

The following functions can be used for general tensors.

\index{Centroid!tensor}
\begin{intrinsics}
Centroid(t) : TenSpcElt -> AlgMat
Centroid(t, A) : TenSpcElt, {RngIntElt} -> AlgMat
\end{intrinsics}

Returns the $A$-centroid of the tensor as a subalgebra of $\prod_{a\in A}\End(U_a)$, where $A\subseteq [\vav]$.
If no $A$ is given, it is assumed that $A=[\vav]$.
If $t$ is contained in a category where coordinates $a$ and $b$ (also contained in $A$) are fused together, then the corresponding operators on those coordinates will be equal.

\begin{example}[Centroid]

The centroid $C$ of a tensor $t$ is the largest ring for which $t$ is $C$-linear, see \cite{FMW:densors}*{Theorem~D}.
To demonstrate this, we will construct the tensor given by multiplication of the splitting field of $f(x)=x^4-x^2-2$ over $\mathbb{Q}$.
However, this field won't explicitly be given with the tensor data.
\begin{code}
> A := MatrixAlgebra(Rationals(), 4);
> R<x> := PolynomialRing(Rationals());
> F := sub< A | A!1, CompanionMatrix(x^4-x^2-2) >;
> F;
Matrix Algebra of degree 4 with 2 generators over Rational Field
> t := Tensor(F);
> t;
Tensor of valence 3, U2 x U1 >-> U0
U2 : Full Vector space of degree 4 over Rational Field
U1 : Full Vector space of degree 4 over Rational Field
U0 : Full Vector space of degree 4 over Rational Field
\end{code}

The centroid is the field $\mathbb{Q}(\sqrt{2},i)$.
\begin{code}
> C := Centroid(t);
> C;
Matrix Algebra of degree 12 with 4 generators over Rational Field
> sub< C | C.1 > eq C;
true
> forall{ c : c in Generators(C) | IsInvertible(c) };
true
> IsCommutative(C);
true
> MinimalPolynomial(C.1);
x^4 + 2*x^2 - 8
> Factorization(MinimalPolynomial(C.1));
[
    <x^2 - 2, 1>,
    <x^2 + 4, 1>
]
\end{code}
\end{example}

\index{DerivationAlgebra!tensor}
\begin{intrinsics}
DerivationAlgebra(t) : TenSpcElt -> AlgMatLie
DerivationAlgebra(t, A) : TenSpcElt, {RngIntElt} -> AlgMatLie
\end{intrinsics}

Returns the $A$-derivation Lie algebra of the tensor as a Lie subalgebra of $\prod_{a\in A}\End(U_a)$, where $A\subseteq [\vav]$.
If no $A$ is given, it is assumed that $A=[\vav]$.
If $t$ is contained in a category where coordinates $a$ and $b$ (also contained in $A$) are fused together, then the corresponding operators on those coordinates will be equal.

\index{Nucleus}
\begin{intrinsics}
Nucleus(t, a, b) : TenSpcElt, RngIntElt, RngIntElt -> AlgMat
Nucleus(t, A) : TenSpcElt, SetEnum -> AlgMat
\end{intrinsics}

Returns the $A$-nucleus, for $A=\{a,b\}$ ($a\ne b$), of the tensor as a subalgebra of $\End(U_i)\times \End(U_j)$,
where $i=\max(a,b)$ and $j=\min(a,b)$.
If $j>0$, then replace $\End(U_j)$ with $\End(U_j)^\op$.
If $t$ is contained in a category where coordinates $a$ and $b$ are fused together, then the corresponding operators on those coordinates will not be forced to be equal.

\begin{example}[RestrictDerivation]

In a previous example, we embeded the nuclei of a tensor into the derivation algebra.
For a tensor $t: U_{\vav}\times \cdots\times U_1\rightarrowtail U_0$, the derivation algebra is represented in $\Omega=\prod_{a\in[\vav]}\mathfrak{gl}(U_a)$.
We will restrict the derivation algebra to $\prod_{c\notin\{a,b\}} \mathfrak{gl}(U_c)$ for distinct $a,b\in[\vav]$.
From \cite{FMW:densors}*{Lemma~4.11}, the kernel of this restriction is equal to Nuc$_{\{a,b\}}(t)^-$.
We will just verify that the dimensions match.

We will construct a tensor given by matrix multiplcation:
\[ \mathbb{M}_{3\times 4}(\mathbb{F}_2)\times \mathbb{M}_{4\times 2}(\mathbb{F}_2) \times \mathbb{M}_{2\times 2}(\mathbb{F}_2) \rightarrowtail \mathbb{M}_{3\times 2}(\mathbb{F}_2) .\]
\begin{code}
> A := KMatrixSpace(GF(2), 3, 4);
> B := KMatrixSpace(GF(2), 4, 2);
> C := KMatrixSpace(GF(2), 2, 2);
> D := KMatrixSpace(GF(2), 3, 2);
> trip := func< x | x[1]*x[2]*x[3] >;
> t := Tensor([A, B, C, D], trip);
> t;
Tensor of valence 4, U3 x U2 x U1 >-> U0
U3 : Full Vector space of degree 12 over GF(2)
U2 : Full Vector space of degree 8 over GF(2)
U1 : Full Vector space of degree 4 over GF(2)
U0 : Full Vector space of degree 6 over GF(2)
\end{code}

Now we will compute the derivation algebra of \texttt{t}.
We choose $a=3$ and $b=2$, so the $\{3,2\}$-nucleus is $\mathbb{M}_{4\times 4}(\mathbb{F}_2)$.
\begin{code}
> D := DerivationAlgebra(t);
> Dimension(D);
32
> N32 := Nucleus(t, 3, 2);
> N32;
Matrix Algebra of degree 20 with 16 generators over GF(2)
\end{code}

To construct the restriction of $\Der(t)$ into $\mathfrak{gl}(U_1)\times\mathfrak{gl}(U_0)$ we will use the \texttt{Induce} function.
\begin{code}
> Omega_10 := KMatrixSpace(GF(2), 10, 10);
> D_vs := sub< KMatrixSpace(GF(2), 30, 30) | Basis(D) >;
> pi1, D1 := Induce(D, 1);
> pi0, D0 := Induce(D, 0);
> res := hom< D_vs -> Omega_10 |
>     [<x, DiagonalJoin(x @ pi1, x @ pi0)> : x in Basis(D)] >;
> res;
Mapping from: ModMatFld: D_vs to ModMatFld: Omega_10
> Kernel(res);
KMatrixSpace of 30 by 30 matrices and dimension 16 over GF(2)
\end{code}
\end{example}

\index{SelfAdjointAlgebra}
\begin{intrinsics}
SelfAdjointAlgebra(t, a, b) : TenSpcElt, RngIntElt, RngIntElt -> ModMatFld
\end{intrinsics}

Returns the self-adjoint elements of the $ab$-nucleus of $t$ as a subspace of $\End(U_a)$, with $a,b\in[\vav]$ and $a\ne b$.
It is not required that $t$ be in a tensor category with coordinates $a$ and $b$ fused.
Unlike other invariants associated to tensors, the self-adjoint algebra is not currently stored with the tensor.

\index{TensorOverCentroid}
\begin{intrinsics}
TensorOverCentroid(t) : TenSpcElt -> TenSpcElt, Hmtp
\end{intrinsics}

If the given tensor $t$ is framed by $K$-vector spaces, then the returned tensor is framed by $E$-vector spaces where $E$ is the residue field of the centroid.
The returned homotopism is an isotopism of the $K$-tensors.
This only works if the centroid of $t$ is a finite commutative local ring.
We employ the algorithms developed by Brooksbank and Wilson \cite{BW:Module-iso} to efficiently determine if a matrix algebra is cyclic, see Appendix~\ref{append:cyclic}.

\begin{example}[CentroidUnipotent]

In the context of groups, centroids can be used to recover an underlying field of a matrix group, even if the given group is not input as such.
Here we will construct the exponent-$p$ central tensor of the Sylow 2-subgroup of $\GL(3,\GF(2^{10}))$.
We will not print the \texttt{GrpPC} version of this group as the number of relations is very large.
\begin{code}
> U := ClassicalSylow(GL(3, 2^10), 2);
> U.3;
[       1    $.1^2        0]
[       0        1        0]
[       0        0        1]
> G := PCPresentation(UnipotentMatrixGroup(U));
> #G eq 2^30;
true
> t := pCentralTensor(G);
> t;
Tensor of valence 3, U2 x U1 >-> U0
U2 : Full Vector space of degree 20 over GF(2)
U1 : Full Vector space of degree 20 over GF(2)
U0 : Full Vector space of degree 10 over GF(2)
\end{code}

Even though our tensor right now is $\mathbb{F}_2^{20}\times \mathbb{F}_2^{20}\rightarrowtail\mathbb{F}_2^{10}$, we know it is the 2-dimensional alternating form over $\GF(2^{10})$.
We will construct the centroid, and then rewrite our tensor over the centroid to get the tensor we expect.
\begin{code}
> C := Centroid(t);
> C;
Matrix Algebra of degree 50 and dimension 10 with 1 generator over GF(2)
> IsCyclic(C) and IsSimple(C);
true
> s := TensorOverCentroid(t);
> s;
Tensor of valence 3, U2 x U1 >-> U0
U2 : Full Vector space of degree 2 over GF(2^10)
U1 : Full Vector space of degree 2 over GF(2^10)
U0 : Full Vector space of degree 1 over GF(2^10)
\end{code}
\end{example}

\backmatter

\begin{bibdiv}
\begin{biblist}

\end{biblist}
\end{bibdiv}

\printindex

\end{document}


    \filetitle{arwm}{Adaptive random-walk Metropolis posterior simulator}{poster/arwm}

	\paragraph{Syntax}\label{syntax}

\begin{verbatim}
[Theta,LogPost,ArVec,PosUpd] = arwm(Pos,NDraw,...)
[Theta,LogPost,ArVec,PosUpd,SgmVec,FinalCov] = arwm(Pos,NDraw,...)
\end{verbatim}

\paragraph{Input arguments}\label{input-arguments}

\begin{itemize}
\item
  \texttt{Pos} {[} poster {]} - Initialised posterior simulator object.
\item
  \texttt{NDraw} {[} numeric {]} - Length of the chain not including
  burn-in.
\end{itemize}

\paragraph{Output arguments}\label{output-arguments}

\begin{itemize}
\item
  \texttt{Theta} {[} numeric {]} - MCMC chain with individual parameters
  in rows.
\item
  \texttt{LogPost} {[} numeric {]} - Vector of log posterior density (up
  to a constant) in each draw.
\item
  \texttt{ArVec} {[} numeric {]} - Vector of cumulative acceptance
  ratios.
\item
  \texttt{PosUpd} {[} poster {]} - Posterior simulator object with its
  properties updated so to capture the final state of the simulation.
\item
  \texttt{SgmVec} {[} numeric {]} - Vector of proposal scale factors in
  each draw.
\item
  \texttt{FinalCov} {[} numeric {]} - Final proposal covariance matrix;
  the final covariance matrix of the random walk step is
  Scale(end)\^{}2*FinalCov.
\end{itemize}

\paragraph{Options}\label{options}

\begin{itemize}
\item
  \texttt{'adaptProposalCov='} {[} numeric \textbar{}
  \emph{\texttt{0.5}} {]} - Speed of adaptation of the Cholesky factor
  of the proposal covariance matrix towards the target acceptanace
  ratio, \texttt{targetAR}; zero means no adaptation.
\item
  \texttt{'adaptScale='} {[} numeric \textbar{} \emph{\texttt{1}} {]} -
  Speed of adaptation of the scale factor to deviations of acceptance
  ratios from the target ratio, \texttt{targetAR}.
\item
  \texttt{'burnin='} {[} numeric \textbar{} \emph{\texttt{0.10}} {]} -
  Number of burn-in draws entered either as a percentage of total draws
  (between 0 and 1) or directly as a number (integer greater that one).
  Burn-in draws will be added to the requested number of draws
  \texttt{ndraw} and discarded after the posterior simulation.
\item
  \texttt{'estTime='} {[} \texttt{true} \textbar{} \emph{\texttt{false}}
  {]} - Display and update the estimated time to go in the command
  window.
\item
  \texttt{'firstPrefetch='} {[} numeric \textbar{} \emph{\texttt{Inf}}
  {]} - First draw where parallelised pre-fetching will be used;
  \texttt{Inf} means no pre-fetching.
\item
  \texttt{'gamma='} {[} numeric \textbar{} \emph{\texttt{0.8}} {]} - The
  rate of decay at which the scale and/or the proposal covariance will
  be adapted with each new draw.
\item
  \texttt{'initScale='} {[} numeric \textbar{} \texttt{1/3} {]} -
  Initial scale factor by which the initial proposal covariance will be
  multiplied; the initial value will be adapted to achieve the target
  acceptance ratio.
\item
  \texttt{'lastAdapt='} {[} numeric \textbar{} \emph{\texttt{Inf}} {]} -
  Last point at which the proposal covariance will be adapted;
  \texttt{Inf} means adaptation will continue until the last draw. Can
  also be entered as a percentage of total draws (a number strictly
  between 0 and 1).
\item
  \texttt{'nStep='} {[} numeric \textbar{} *\texttt{1} {]} - Number of
  pre-fetched steps computed in parallel; only works with
  \texttt{firstPrefetch=} smaller than \texttt{NDraw}.
\item
  \texttt{'progress='} {[} \texttt{true} \textbar{}
  \emph{\texttt{false}} {]} - Display progress bar in the command
  window.
\item
  \texttt{'saveAs='} {[} char \textbar{} \emph{empty} {]} - File name
  where results will be saved when the option \texttt{'saveEvery='} is
  used.
\item
  \texttt{'saveEvery='} {[} numeric \textbar{} \emph{\texttt{Inf}} {]} -
  Every N draws will be saved to an HDF5 file, and removed from
  workspace immediately; no values will be returned in the output
  arguments \texttt{Theta}, \texttt{LogPost}, \texttt{AR},
  \texttt{Scale}; the option \texttt{'saveAs='} must be used to specify
  the file name; \texttt{Inf} means a normal run with no saving.
\item
  \texttt{'targetAR='} {[} numeric \textbar{} \emph{\texttt{0.234}} {]}
  - Target acceptance ratio.
\end{itemize}

\paragraph{Description}\label{description}

The function \texttt{poster/arwm} returns the simulated chain of
parameters and the corresponding value of the log posterior density. To
obtain simulated sample statistics for each parameter (such as posterior
mean, median, percentiles, etc.) use the function
\href{poster/stats}{\texttt{poster/stats}} to process the simulated
chain and calculate the statistics.

The properties of the posterior object returned as the 4th output
argument are updated so that they capture the final state of the
posterior simulations. This can be used to initialize a next simulation
at the point where the previous ended.

\subparagraph{Parallelised ARWM}\label{parallelised-arwm}

Set \texttt{'nStep='} greater than \texttt{1}, and
\texttt{'firstPrefetch='} smaller than \texttt{NDraw} to start a
pre-fetching parallelised algorithm (pre-fetched will be all draws
starting from \texttt{'firstPrefetch='}); to that end, a pool of
parallel workers (using e.g. \texttt{matlabpool} from the Parallel
Computing Toolbox) must be opened before calling \texttt{arwm}.

With pre-fetching, all possible paths \texttt{'nStep='} steps ahead
(i.e.~all possible combinations of reject/accept) are pre-evaluated in
parallel, and then the resulting path is selected. Adapation then occurs
only every \texttt{'nStep='} steps, and hence the results will always
somewhat differ from a serial run. Identical results can be obtained by
turning down adaptation before pre-fetching starts, i.e.~by setting
\texttt{'lastAdapt='} smaller than \texttt{'firstPrefetch='} (and,
obviously, by re-setting the random number generator).

\paragraph{References}\label{references}

\begin{itemize}
\item
  Brockwell, A.E., 2005. ``Parallel Markov Chain Monte Carlo Simulation
  by Pre-Fetching,'' CMU Statistics Dept. Tech. Report 802.
\item
  Strid, I., 2009. ``Efficient parallelisation of Metropolis-Hastings
  algorithms using a prefetching approach,'' SSE/EFI Working Paper
  Series in Economics and Finance No. 706.
\end{itemize}

\paragraph{Example}\label{example}


\documentclass[main.tex]{subfiles}
\begin{document}

\section{Weak-field GR}

\marginpar{Monday\\ 2021-4-19, \\ compiled \\ \today}

This is the limit of GR for weak gravitational fields: the metric is assumed to be in the form of the Minkowski one plus a perturbation.
We are seeking the equations of motion under this assumption.

How do we quantify the term ``small''?
We assume that there is a \textbf{global inertial coordinate system} such that
%
\begin{align}
g_{\mu \nu } = \eta_{\mu \nu } + h_{\mu \nu }
\,,
\end{align}
%
where, like in the rest of the course, we will use the letters \(\alpha \), \(\beta \), \(\gamma \) or \(\mu \), \(\nu \) for the coordinates \(x^{\mu }\); while letters like \(a\), \(b\) represent the abstract notation.

The term ``small'', then, means that each component of \(h_{\mu \nu }\) has an absolute value which is much smaller than 1.
We are using the metric signature \(\eta_{\mu \nu }= \diag{-1, +1, +1, +1}\).

What does this approximation describe?
\begin{enumerate}
    \item Newtonian gravity;
    \item gravito-electric / magnetic effects (this will be discussed in more detail later, an example is the Lense-Thirring effect);
    \item propagation of gravitational waves.
\end{enumerate}

In the case of the gravitational field around the Sun, in terms of orders of magnitude we have\footnote{We make the \(c\) explicit here for clarity, but we will use geometric units \(c = G = 1\) for the rest of the course.}
%
\begin{align}
\abs{h_{\mu \nu }} \sim \frac{\phi }{c^2} \sim \frac{G M_{\odot}}{c^2 R_{\odot}} \sim \num{e-6}
\,.
\end{align}

From a field-theoretic point of view:
\begin{enumerate}
    \item \(\eta \) is a background metric;
    \item \(h\) is the ``main'' field;
    \item the metric does \emph{not} backreact on the matter (\(T_{\mu \nu }\)).
\end{enumerate}

The metric perturbation \(h\) transform like a tensor on flat spacetime under Lorentz transformations: if \(\Lambda^{\top} \eta \Lambda = \eta \), then the coordinates change like \(x = \Lambda x'\), then the full metric transforms like
%
\begin{align}
g_{\mu ' \nu '} &= \pdv{x^{\mu }}{x^{\mu '}} \pdv{x^{\nu }}{x^{\nu '}} g_{\mu \nu }  \\
&= \Lambda^{\mu}{}_{\mu '} \Lambda^{\nu }{}_{\nu '} \qty(\eta_{\mu \nu } + h_{\mu \nu } )  \\
&= \eta_{\mu '\nu '} +  \Lambda^{\mu}{}_{\mu '} \Lambda^{\nu }{}_{\nu '}  h_{\mu \nu }
\,,
\end{align}
%
therefore the transformation for \(h\) is
%
\begin{align}
h_{\mu \nu } \to h_{\mu ' \nu '} = \Lambda^{\mu }{}_{\mu ' } \Lambda^{\nu }{}_{\nu '} h_{\mu \nu }
\,.
\end{align}

Mind the notation: the meaning of \(h_{\mu ' \nu '}\) is \(h_{\mu \nu } (x')\).

\subsection{Symmetry of linearized GR}

Full GR is diffeomorphism invariant, while linearized GR is \emph{infinitesimal} diffeomorphism invariant.
The relevant transformations are
%
\begin{align}
x^{\mu } \to x^{\mu '} = x^{\mu } + \xi^{\mu } (x^{\alpha })
\,,
\end{align}
%
where the vector field \(\xi \) is selected so that \(\abs{\partial_{\mu } \xi^{\alpha }} \sim \abs{h_{\mu \nu }} \ll 1\).

The Jacobian of this transformation is
%
\begin{align}
\pdv{x^{\mu '}}{x^{\mu }} = \delta^{\mu '}{}_{\mu} + \partial_{\mu } \xi^{\mu '}
\,,
\end{align}
%
while the inverse Jacobian is
%
\begin{align}
\pdv{x^{\mu }}{x^{\mu '}} + \delta^{\mu }{}_{\mu '} - \partial_{\mu '} \xi^{\mu } + \order{\abs{\partial \xi }^2}
\,,
\end{align}
%
since \((\mathbb{1} + \delta ) (\mathbb{1} - \delta ) = \mathbb{1} + \order{ \delta^2}\).

Under this change of coordinates, we have
%
\begin{align}
g_{\mu ' \nu '} &=
\pdv{x^{\mu }}{x^{\mu '}}
\pdv{x^{\nu }}{x^{\nu '}}
g_{\mu \nu }  \\
&\sim (\delta \delta - \partial \delta - \partial \delta + \partial \partial ) (\eta + h) = \delta \delta \eta + h - \partial \delta - \partial \delta  + \order{\delta^2 } \\
&= \delta^{\mu }_{\mu '} \delta^{\nu }_{\nu '} \eta_{\mu \nu } - \partial_{\mu '} \xi^{\mu } \delta^{\nu }_{\nu '} \eta_{\mu \nu } - \partial_{\nu '} \xi^{\nu } \delta^{\mu }_{\mu '}
+ \delta^{\mu }_{\mu '} \delta^{\nu }_{\nu '} h_{\mu \nu }  \\
&= \eta_{\mu' \nu' } + h_{\mu ' \nu '} - 2 \partial_{(\mu '} \xi_{\nu ')}
\,,
\end{align}
%
therefore we have our transformation law:
%
\begin{align}
h_{\mu' \nu' } = h_{\mu \nu } + 2 \partial_{(\mu } \xi_{\nu )}
\,.
\end{align}

This can also be written in terms of the Lie derivative as
%
\begin{align}
h_{\mu \nu } \to h_{\mu \nu } + \mathscr{L}_{\xi } \eta_{\mu \nu }
\,.
\end{align}

This is the analogous of a gauge transformation in electromagnetism: \(A_{\alpha } \to A_{\alpha } + \partial_{\alpha } \chi \), where \(A\) is the vector potential.

\subsection{Equations of motion}

The equations of motion will come through plugging \(g = \eta + h\) into the EFE \(G_{a b} = 8 \pi T_{ab}\) and keeping only the linear order in \(h\).

We will need the following quantities:
%
\begin{align}
g^{\mu \nu } &= \eta^{\mu \nu } + h^{\mu \nu } + \order{h^2}  \\
\Gamma^{\mu }_{\alpha \beta } &= \frac{1}{2} \eta^{\mu \lambda } \qty(\partial_{\alpha } h_{\lambda \beta } + \partial_{\beta } h_{\lambda \alpha } - \partial_{\lambda } h_{\alpha \beta } ) + \order{h^2}  \\
R_{\mu \nu } &= \partial \Gamma - \partial \Gamma + \order{h^2}
\,,
\end{align}
%
where we already simplified the expressions by removing the higher-order terms. The result is
%
\begin{align}
R_{\mu \nu } = \partial^{\alpha } \partial_{(\mu } h_{\nu ) \alpha }
- \frac{1}{2} \partial_{\lambda } \partial^{\lambda } h_{\mu  \nu } - \frac{1}{2} \partial_{\mu } \partial_{\nu } h + \order{h^2}
\,,
\end{align}
%
where \(h = h^{\alpha }_{\alpha } = \eta^{\alpha \beta } h_{\alpha \beta }\). Note that we are allowed to use \(\eta \) instead of \(g\) to lower indices. The Einstein tensor reads
%
\begin{align}
G_{\mu \nu } &= R_{\mu \nu } - \frac{1}{2}  \eta_{\mu \nu } R  \\
&= \partial^{\alpha } \partial_{(\mu } h_{\nu )} - \frac{1}{2} \partial_{\lambda } \partial^{\lambda } h_{\mu \nu } \partial_{\mu } \partial_{\nu } h - \frac{1}{2} \eta_{\mu \nu } \partial^{\alpha } \partial^{\beta } h_{\alpha \beta } + \frac{1}{2} \eta_{\mu \nu } \partial_{\lambda } \partial^{\lambda } h
\,,
\end{align}
%
which can be simplified if we consider the trace-reversed metric
%
\begin{align}
\overline{h}_{\mu \nu } = h_{\mu \nu} - \frac{1}{2} \eta_{\mu \nu } h
\,,
\end{align}
%
so that \(\overline{h} = \eta^{\mu \nu }h_{\mu \nu } - \eta^{\mu \nu } \eta_{\mu \nu } h / 2 = - h\).
See equation 2.13 in the notes for a full explanation, but the idea is to insert \(\overline{h}_{\mu \nu } \) and \(\overline{h}\) into \(G_{\alpha \beta }\) and to make some simplifications. We get
%
\begin{align}
G_{\mu \nu } = - \frac{1}{2} \eta_{\alpha \beta } \partial^{\alpha } \partial^{\beta } \overline{h}_{\mu \nu } + \partial^{\alpha } \partial_{(\mu } \overline{h}_{\nu ) \alpha } - \frac{1}{2} \eta_{\mu \nu } \partial^{\alpha } \partial^{\beta } \overline{h}_{\alpha \beta }
\,,
\end{align}
%
which is in the form \(\square_{\eta } \overline{h}_{\mu \nu } + \dots \partial^{\alpha } \overline{h}_{\alpha \beta }\). We still have gauge freedom, so we can simplify the equation a great deal by setting \(\partial^{\alpha } \overline{h}_{\alpha \beta } = 0\) --- the Hilbert, or Lorentz gauge.

With this choice, we have
%
\boxalign{
\begin{align}
\square_{\eta } \overline{h}_{\mu \nu } = - \frac{16G}{c^{4}} T_{\mu \nu }
\,,
\end{align}}
%
a relatively simple tensor wave equation.

Is is always possible to impose the Hilbert gauge? Yes: we can make an infinitesimal coordinate transformation to send a generic \(h_{\mu \nu }\) to \(h_{\mu \nu } + 2 \partial_{(\mu  } \xi_{\nu )}\), so that \(h \to h + 2 \eta^{\alpha \beta } \partial_{(\alpha } \xi_{\beta) }\).
Therefore,
%
\begin{align}
\overline{h}_{\mu \nu } \to \overline{h}_{\mu \nu } + 2 \partial_{(\mu } h_{\nu )} - \eta_{\mu \nu } \partial_{\alpha } \xi^{\alpha }
\,,
\end{align}
%
and we can send
\todo[inline]{check indices here}
%
\begin{align}
\partial^{\alpha } \overline{h}_{\mu \alpha } \to \partial^{\alpha } \overline{h}_{\mu \alpha } + \square \xi_{\mu } + \partial^{\mu } \partial_{\nu } \xi_{\mu } + \partial_{\nu } \partial^{\lambda } \xi_{\lambda }
\,,
\end{align}
%
so if we set \(\square \xi_{\mu } = - \partial^{\alpha } \overline{h}_{\mu \alpha } = v_\mu \) we can reduce ourselves to the Hilbert gauge from any starting point.
All we need to do is solve the wave equation \(\square \xi_{\mu } = v_\mu \).

Now, to linear order \(T_{\mu \nu }\) does not depend on \(h\).
So, we can find formal solutions using Green's functions, like in electromagnetism.

The Bianchi identities are now given by \(\partial_{\nu } G^{\mu \nu } = 0\), so \(\partial_{\nu } T^{\mu \nu } = 0\), which gives us the EOM for matter --- note that this is a partial, not a covariant derivative! This means that there is no backreaction on the metric.

The linear EFE correspond to the equations of motion of a massless spin-2 field.

\subsection{Weak-field solutions}

Let us consider a \emph{static source}: suppose that \(T_{\mu \nu } = \rho t_\mu t_\nu \), where \(t^{\mu } = (\partial_{t})^{\mu }\) is the time vector along the time direction of the global inertial coordinate system while \(\rho \) is an energy density.

If \(t^{\mu } = (1, 0, 0, 0)\) then \(T_{00} = \rho \) while \(T_{0i} = 0 = T_{ij}\).

In this case, then, the stress-energy tensor is time-independent: therefore also on the other side we will have \(\partial_{t} \overline{h}_{\mu \nu } = 0\).

Therefore, the left-hand side of the equation will read \(\nabla^2 \overline{h}_{\mu \nu } = - 16 \pi \rho  \) for \(\mu = \nu = 0\) and \(\nabla^2 h_{\mu \nu } = 0\) for all the other components.

These Poisson equations can be solved as boundary-value problems if we assume that \(h_{\mu \nu } \to 0 \) for \(r \gg R\).

This looks very similar to the Newton equation \(\nabla^2 \phi = 4 \pi \rho\); therefore \(\overline{h}_{00} = - 4 \phi \), while \(\overline{h}_{\mu \nu } = 0\) for all other components.

We can reconstruct the metric using the fact that \(\overline{h} = 4 \phi   \), so
%
\begin{align}
h_{\mu \nu } = \overline{h}_{\mu \nu } - \frac{1}{2} \eta_{\mu \nu } \overline{h} = - 4 \phi t_\mu t_\nu - \frac{1}{2} \eta_{\mu \nu } 4 \phi
\,,
\end{align}
%
so the metric reads
%
\begin{align}
g_{\mu \nu } = \eta_{\mu \nu } (1 - 2 \phi ) - 4 \phi t_\mu t_\nu
\,,
\end{align}
%
therefore
%
\begin{align}
g =  - (1 + 2 \phi ) \dd{t^2} + ( 1 - 2 \phi ) \delta_{ij} \dd{x^{i}} \dd{x^{j}}
\,.
\end{align}

We know that far away from the source, the Newtonian field decays like \(\phi \approx - M / r + \order{r^{-2}}\).

Therefore, this metric approximation already includes special relativity as well: we have \(g \to \eta \) for large \(r\), but also \(g = \eta \) for \(M = 0\).

The geodesic equation for this weak field metric reads
%
\begin{align}
\dv[2]{x^{i}}{t} = - \partial^{i}\phi
\,.
\end{align}

However, these Newtonian equations of motion are
\emph{not} consistent with \(\partial_{\mu } T^{\mu \nu } = 0\).
These describe the motion of the source which generates gravity,
whereas the Newtonian EOM describe the motion of test particles in the weak-field metric.

The dual meaning of the full EFE --- matter deforms the spacetime, the spacetime shapes the trajectories of matter --- \emph{cannot} be realized at linear order.

\end{document}