\section{The Category \dpg} \label{sec:DoPeGDO}

\subsection{Motivation, conventions, generating functions}

This section may seem like an awful way to start a topology paper ---
it's all about formula-based technicalities. Here are its redeeming features (beyond its usefulness for the
later parts of the paper):
\begin{itemize}
\item Did you know that quadratic forms (aka ``Gaussians'') form a category in a natural way?
(Theorem~\ref{thm:GDO}).
\item Did you know that Feynman diagrams arise in pure algebra in a completely natural way?
\end{itemize}

\begin{motivation} \label{mot:PBW}
The ``PBW Principle'' says that many algebras $U$ are isomorphic, as vector spaces, to
polynomial rings (hence as algebras they are ``polynomial rings with funny multiplications''). Many times
one needs to understand maps between algebras. Primarily, the algebra's own structure: the multiplication
map $m\colon U\otimes U\to U$, perhaps a co-multiplication $\Delta\colon U\to U\otimes U$, and more. Sometimes
one may care about specific special elements in $U$ or some tensor power thereof; say, $R\in U\otimes
U=\Hom(U^{\otimes\emptyset}\to U^{\otimes 2})$. So we need to understand the category of maps between
algebras and their tensor powers, and hence, by PBW, the category of maps between polynomial rings. This
category is way too big --- one can encode an infinite amount of information into a map between polynomial
rings (no matter the base fields) --- and so no finite computer can fully store a general such map. Hence we
develop a theory of ``maps between polynomial rings that can be described using finite formulas (of a
certain kind)'' and we are lucky that the maps we care about later in this paper can indeed be described by
formulas of that kind. Those maps/formulas are ``{\bf Do}cile {\bf Pe}rturbed
{\bf G}aussian {\bf D}ifferential {\bf O}perators'', and they make a category, \dpg, which is the main
object of study for this section.
\end{motivation}

\begin{convention} Throughout this paper we will use lower case Latin letters such as $z$, $y$, $b$, $a$,
$x$, and $t$ to denote the generators of polynomial rings. Each such generator comes with a dual (whose
purpose will be explained shortly), and the dual will always be denoted by the corresponding Greek letter:
$z^\ast=\zeta$, $y^\ast=\eta$, $b^\ast=\beta$, $a^\ast=\alpha$, $x^\ast=\xi$, and $t^\ast=\tau$. If $C$ is a
finite set, we will denote by $z_C=\{z_c\}_{c\in C}$ the set of variables denoted by the letter $z$ with an
index $c\in C$; likewise there's $y_C$, $x_C$, etc. We will regard $z_C$ sometimes as a set and sometimes as
a column vector, as appropriate. We extend duality to indexed variables:
$z^\ast_C=\zeta_C=\{z^\ast_c=\zeta_c\}_{c\in C}$. We will sometimes treat $\zeta_C$ (or $\eta_C$, etc) as a
row vector.
\end{convention}

Next, we establish a bijection
$\calG\colon\Hom(\bbQ[z_A]\to\bbQ[z_B])\to\bbQ[z_B]\llbracket\zeta_a\rrbracket$ between linear maps from
polynomials in variables $z_A$ to polynomials in variables $z_B$ ($A$ and $B$ are finite sets) and a certain
class of power series in the output variables and the duals of the input variables (more precisely, power
series in the Greek variables corresponding to the inputs, with coefficients that are polynomials in the
Latin variables corresponding to the outputs).

\begin{definition} Let $A$ and $B$ be finite sets and let $L\colon\bbQ[z_A]\to\bbQ[z_B]$ be linear. Let
\begin{equation} \label{eq:calG1}
  \calL = \calG(L)
  \coloneqq \sum_{n\in\bbN^A}\frac{\zeta_A^n}{n!}L(z_A^n)
  \in \bbQ[z_B]\llbracket\zeta_a\rrbracket
\end{equation}
be the exponential generating function of the values of $L$. Here $\bbN$ denotes the non-negative integers,
$n=(n_a)_{a\in A}$ is a multi-index, $\zeta_A^n\coloneqq\prod_{a\in A}\zeta_a^{n_a}$ and likewise
$z_A^n\coloneqq\prod_{a\in A}z_a^{n_a}$, and $n!\coloneqq\prod_{a\in A}n_a!$. Extending $L$ without changing
its name to an operator $L\colon\bbQ[z_A]\llbracket\zeta_a\rrbracket\to\bbQ[z_B]\llbracket\zeta_a\rrbracket$
by treating the $\zeta_A$'s as scalars, and recalling the definition of the exponential function, we find
that~\eqref{eq:calG1} can also be written as
\[ \calL = \calG(L) = L\left(\bbe^{\zeta_A\cdot z_A}\right), \]
where $\zeta_A\cdot z_A\coloneqq\sum_{a\in A}\zeta_az_a$.
\end{definition}

\begin{proposition} $\calG\colon\Hom(\bbQ[z_A]\to\bbQ[z_B])\to\bbQ[z_B]\llbracket\zeta_a\rrbracket$ is a
bijection. If $\calL\in\bbQ[z_B]\llbracket\zeta_a\rrbracket$ and $p\in\bbQ[z_A]$ then 
\[ \calG^{-1}(\calL)(p)
  = \left.p(\partial_{\zeta_a})\calL(\zeta_a,z_b)\right|_{\zeta_a=0}
  = \left.\calL(\partial_{z_a},z_b)p(z_a)\right|_{z_a=0}
\]
\qed
\end{proposition}

\begin{example} Consider $L_i\colon\bbQ[z]\to\bbQ[z]$ for $i=1,2,3,4$,
where $L_1(p)=p$ is the identity, $L_2(p)=p(z+1)$ is the shift,
$L_3(p)=p'$ is differentiation, and $L_4(p)=\int_0^zp$ is definite
integration. Then
\[ \calG(L_1)=\bbe^{\zeta z},
  \qquad \calG(L_2)=\bbe^{\zeta(z+1)},
  \qquad \calG(L_3)=\zeta\bbe^{\zeta z},
  \qquad\text{and}\qquad \calG(L_4)=(\bbe^{\zeta z}-1)/\zeta.
\]
\qed
\end{example}

Linear maps between polynomial rings can be composed, and it is useful to know how their corresponding
generating functions compose\footnotemarkT:

\footnotetextT{Below and throughout we use ``$\act$'' for left-to-right composition: $L\act M=M\circ L$.}

\begin{proposition} Let $A$, $B$, and $C$ be finite
sets, and let $L\in\Hom(\bbQ[z_A]\to\bbQ[z_B])$ and
$M\in\Hom(\bbQ[z_B]\to\bbQ[z_C])$. Then, with $b$ standing for all
elements of $B$,
\begin{equation} \label{eq:LMcomposition}
  \calG(L\act M)
  = \left(\calG(L)|_{z_b\to\partial_{\zeta_b}}\calG(M)\right)_{\zeta_b=0}
  = \left(\calG(M)|_{\zeta_b\to\partial_{z_b}}\calG(M)\right)_{z_b=0}.
\end{equation}
\qed
\end{proposition}

\subsection{Gaussian Differential Operators}

In the examples we care about (see Motivation~\ref{mot:PBW}) the generating functions turn out to be
perturbed Gaussians, whose perturbations are in some sense ``docile''\footnotemarkT. Hence we seek to define
a category \dpg\ of docile perturbed Gaussian generating functions, with ``differential operator''
compositions as in the above proposition. We start with the unperturbed version, \gdo:

\footnotetextT{Or perhaps, we care about those examples precisely because their generating functions are
docile perturbed Gaussians.}

\begin{definition} \label{def:GDO}
Let $\Omega$ be some ring of ``scalars''. \gdo\ is the category with
objects finite sets and, if $A$ and $B$ are finite, with $\mor(A\to B)$
the set of ``Gaussians in $\zeta_A\cup z_B$'':
\[ \mor(A\to B) = \left\{\omega\bbe^Q\right\}, \]
where $\omega\in\Omega$ is a scalar and where $Q$ is a
``small''\footnotemarkT\ quadratic expression in $\zeta_A\cup z_B$ with
scalar coefficients. In general we decompose quadratics in $\zeta_A\cup z_B$ into a Greek-Latin part $E$,
and Greek-Greek part $F$, and a Latin-Latin part $G$:
\[ Q = \sum_{i\in A,j\in B}E_{ij}\zeta_iz_j
  + \frac12\sum_{i,j\in A}F_{ij}\zeta_i\zeta_j
  + \frac12\sum_{i,j\in B}G_{ij}z_iz_j.
\]

\footnotetextT{The word ``small'' can be interpreted in several different
ways (all algebraic, none analytic) and may depend on the ground ring
$\Omega$. For now, it means ``whatever it takes to ensure that $I-F_2G_1$
and $I-G_1F_2$ are invertible\footnotemarkT, in the formulas that follow''. This will
be clarified in Remark~\ref{rem:MeaningOfSmall}.}

\footnotetextT{Note that in general $(I-AB)^{-1}=I+A(I-BA)^{-1}B$, so $I-F_2G_1$
and $I-G_1F_2$ are always invertible at the same time.}

With this we define the composition of $\omega_1\bbe^{Q_1}\in\mor(A\to B)$ and $\omega_2\bbe^{Q_2}$ to be
$\omega\bbe^Q$, with
\begin{equation} \label{eq:gdocompositions} \begin{aligned}
  E &= E_1(I-F_2G_1)^{-1}E_2, &
  F &= F_1+E_1F_2(I-G_1F_2)^{-1}E_1^T, \\
  G &= G_2+E_2^TG_1(I-F_2G_1)^{-1}E_2, &
  \omega &= \omega_1\omega_2\det(I-F_2G_1)^{-1},
\end{aligned} \end{equation}
where $(E,F,G)$ and $(E_i,F_i,G_i)$ are the Greco-Roman decompositions of $Q$ and of $Q_i$ as above.
Finally, the identity morphism in $\mor(A\to A)$ is declared to be $\bbe^{\zeta_A\cdot z_A}$.

\end{definition}

\begin{theorem} \label{thm:GDO}
(i) \gdo\ is indeed a category (the composition law is associative, the identities are identities).
\newline (ii) The explicit composition law of~\eqref{eq:gdocompositions} agrees with the ``differential
operator'' one of~\eqref{eq:LMcomposition}.
\end{theorem}

\begin{proof} Part (i) can be verified by explicit matrix computations. It
can also be implemented and tested, and seeing that we are committed
to computability, we do that below the line\footnotemarkC. Finally,
part (i) follows from part (ii) and the fact that the composition law
of~\eqref{eq:LMcomposition} is obviously associative. Hence we concentrate
on proving (ii). We do it in two ways: pictorial, right below, for those who
are familiar with diagrammatic algebra, and pure algebraic, on page~\pageref{pf:GDO:algebraic}. \qed

\end{proof}

\footnotetextC{We test that the composition law of \gdo\ is indeed associative, by defining it general and
verifying associativity on random (and hence likely generic) morphisms. First, we define the composition law of
two morphisms. The program first determines $E_i$, $F_i$, and $G_i$ from $Q_i$ ($i=1,2$) by taking partial
derivatives, and then outputs the scalar $\omega$ and quadratic $Q$, with equations~\eqref{eq:gdocompositions}
converted nearly literally into code:

\mathinclude{GDOCompositions/CompositionLaw}

Next we implement ``random morphisms'' (\verb"RM") by picking their quadratic parts to have small
random integer coefficients. We also set $M_1$, $M_2$, and $M_3$ to be random morphisms in
$\mor(\{1,2\}\to\{1,2,3\})$, $\mor(\{1,2,3\}\to\{1,2,3\})$, and $\mor(\{1,2,3\}\to\{1,2\})$, respectively:

\dialoginclude{GDOCompositions/RandomM}

Just to get an appreciation of what compositions look like, we compute $(M_1\act M_2)\act M_3$:

\shortdialoginclude{GDOCompositions/LeftAssociation}

Finally, we verify that composition is associative:

\shortdialoginclude{GDOCompositions/Associativity}

The last \verb"True" above is an in-practice proof of Theorem~\ref{thm:GDO},~(i).
}

% \needspace{50mm} % needspace fails here, at least in the presence of footnoteC!
\parpic[r]{\input{figs/GDOMorphism.pdf_t}}
\noindent{\it Pictorial proof of Theorem~\ref{thm:GDO}, (ii).} This proof assumes familiarity with the kind of
diagrammatics that occurrs with Feynman diagrams in quantum field theory and/or with exponentials of connected
diagrams as they occurr in, say,~\cite{Bar-NatanGaroufalidisRozanskyThurston:Aarhus}. Pictorially, we view
morphisms in $\mor_\gdo(A\to B)$ as in the picture on the right: we put the Greek input variables corresonding
to $A$ on the left, the Latin output variable corresponding to $B$ on the right, we indicate the scalar
coefficient $\omega$ at the top, and we use the bulk of the picture to indicate $Q$ and its Greco-Roman
decomposition, with an obvious ``Greek facing'' placement of $F$, ``Latin facing'' placement of $G$, and
``across the divide'' placement of $E$. Note that $Q$ is exponentiated and that exponentials are ``reservoirs
of multiple copies'' $\bbe^x=1+x+xx/2+xxx/6+\ldots$. We emphasize this by drawing $E$, $F$, and $G$ as
having multiple shadows.

\parpic[r]{\input{figs/GDOComposition.pdf_t}}
With this language, a composition as in~\eqref{eq:LMcomposition} of
a pair of morphisms as on the right is interpreted as ``sum over all
possible contractions of latin-side ends in $\bbe^{Q_1}$ with greek-side
ends in $\bbe^{Q_2}$ (provided their labels, which are elements of $B$,
agree)''. Thus to figure out, say, the $E$ part of the output, we need to
figure out all the ways to travel from $A$ to $C$ across the composition
of $\bbe^{Q_1}$ and $\bbe^{Q_2}$ by carrying out such contractions.

\parpic[r]{\input{figs/E.pdf_t}}
The most obvious way to travel across is the direct route: contract $E_1$
with $E_2$. This contributes a term proportional to $E_1E_2$ to the
output $E$. Another possibility is to travel along $E_1$, then $F_2$, then $F_1$, then $E_2$, producing a term
proportional to $E_1F_2G_1E_2$. Another possibility is to take the $F_2G_1$ detour twice, producing a term 
proportional to $E_1(F_2G_1)^2E_2$. In general, and with proper accounting of the combinatorial factors (it
turns out that all proportionality factors are $1$), we get 
\[ E = \sum_{r=0}^\infty E_1(F_2G_1)^rE_2 = E_1(I-F_2G_1)^{-1}E_2, \]
where the last equality was obtained by summing a geometric series.

Similar reasonings justify the formulas for $F$ and for $G$.

\parpic[r]{\input{figs/FGCycles.pdf_t}}
Yet there is one further contribution to $\bbe^{Q_1}\act\bbe^{Q_2}$,
coming from closed $F_2G_1$ cycles as on the right (but of an arbitrary
length $r$). This contribution is a scalar that modifies $\omega_1\omega_2$,
and it is
$ \exp\left(\sum_{r=1}^\infty\frac{1}{r}\tr(F_2G_1)^r\right)
  = \exp(-\tr\log(1-F_2G_1))
  = \det(1-F_2G_1)^{-1},
$
justifying the last part of Equation~\eqref{eq:gdocompositions}. Note that in the last formula we used the
familar quantum field theory dictum to ``divide each diagram by the order of its symmetry group'' to get the
$1/r$ factor, and that throughout the proof we regarded only connected diagrams and exponentiated the result,
as per the dictum ``the logarithm of the partition function is generated by connected diagrams''.
\endpar{pictorial}

\subsection{Baby \dpg}

In this section we introduce a ``baby'' version of \dpg, in which the most interesting features of the
``mature'' versions are present, yet some inconveniencies regarding weights are censored.

\begin{definition} \label{def:DoPeGDO}
Let $\Omega$ be some ring of ``scalars'' and let
$\eps$ be a formal parameter. Like \gdo, let $\dpg_b$ be the category with
objects finite sets and, if $A$ and $B$ are finite, with $\mor(A\to B)$
the set of ``docile perturbed Gaussians in $\zeta_A\cup z_B$'':
\[ \mor(A\to B) = \left\{\omega\bbe^{Q+P}\right\}, \]
where $\omega$ and $Q$ are $\eps$-independent and otherwise as in Definition~\ref{def:GDO}, and where $P$ is
a power series in $\eps$ of the form $P=\sum_{k\geq 1}P^{(k)}\eps^k$ and where each $P^{(k)}$ is a polynomial
in $\zeta_A\cup z_B$ satisfying the ``docility condition'':
\[ \deg P^{(k)}\leq 2k+2. \]
The composition law of $\dpg_b$ is ``whatever is compatible
with~\eqref{eq:LMcomposition}'' (so this definition becomes complete
only following the discussion of Feynman diagrams below, or in
Section~\ref{ssec:PDE}). \endpar{Def.~\ref{def:DoPeGDO}}
\end{definition}

We now seek to understand compositions. With the same diagrammatic language as before, we seek to determine
$\omega$, $Q=(E,F,G)$ and $P$, so that the following would hold, where composition is ``all possible
contractions'':
\begin{equation} \label{eq:DoPeGDOCompositions}
  \begin{array}{c} \input{figs/DoPeGDOCompositions.pdf_t} \end{array}
\end{equation}
Looking only at the $\eps$-independent part, it is clear that the composition law for $\omega$ and for $Q$ is
the same as for \gdo~\eqref{eq:gdocompositions} (so \dpg\ is an ``extension'' of \gdo). We just have to find
$P=\sum_{k\geq 1}P^{(k)}\eps^k$ as a function of $Q_{1,2}$ and $P_{1,2}$.

Well, $P^{(k)}$ must get $k$ factors of $\eps$ and it can only get them
from $P_1$ and $P_2$. So $P^{(k)}$ is a sum of diagrams that have at most
$k$ vertices\footnotemarkT. These vertices can be connected to each other
(including self-connections), or to the outside, either directly, or by
travelling along $E_{1,2}$ lines, or by travelling along $F_2G_1$ or $G_1F_2$ cycles
as before. The latter cycles produce geometric series that sum to either $(I-F_2G_1)^{-1}$ or
$(I-G_1F_2)^{-1}$. We arrive at the following theorem, which we state in a slightly informal manner as a more
rigorous treatment follows in Section~\ref{ssec:PDE}:

\footnotetextT{Less than $k$ if a single vertex brings along more
than one factor of $\eps$. Namely, if it comes from $P_{1,2}^{(l)}$, where $l\geq 2$.}

\parpic[r]{\input{figs/FD.pdf_t}}
\begin{theorem}
\picskip{5}
In a composition as in~\eqref{eq:DoPeGDOCompositions} the term $P^{(k)}$ in $P$ is the sum of all
connected Feynman diagrams as on the right, each divided by the order of its automorphism group, and in which the
vertices are determined by $P_1$ and $P_2$ and in which there are five types of propagators (all sampled on
the right):

\begin{enumerate}
\item A $P_1$-to-$P_2$ propagator which equals $(I-F_2G_1)^{-1}$.
\item A $P_1$-to-$P_1$ propagator which equals $(I-F_2G_1)^{-1}F_2$.
\item A $P_2$-to-$P_2$ propagator which equals $G_1(I-G_1F_2)^{-1}$.
\item A greek-to-$P_2$ propagator which equals $E_1(I-F_2G_1)^{-1}$.
\item A $P_1$-to-latin propagator which equals $(I-F_2G_1)^{-1}E_2$.
\end{enumerate}

The figure here depicts a contribution to $P^{(4)}$. In general the valencies of vertices may be higher and
self-contractions of two edges coming out of the same vertex are allowed.
\end{theorem}

{\red MORE.}

\subsection{Algebra by means of Partial Differential Equations} \label{ssec:PDE}

{\red MORE.}

\subsection{Full \dpg}

{\red MORE.}
