text:
\refstepcounter{section} \label{app:sand_sure}
\section*{\fref{app:sand_sure}: Derivation of SURE in \fref{eq:sure}}

For deriving SURE as in \fref{eq:sure}, we follow the procedure in \cite[App.~A]{ghods19a}, with the following modifications: Instead of $\yhat = \hhat+\ehat$, we use $\rhat = \alpha\hhat + \dhat$. In other words, where~\cite{ghods19a} uses $\yhat\sim\CN(\hhat,\Eo\bI_B)$, we replace it by $\rhat\sim\CN(\alpha\hhat,\Do\bI_B)$. Instead of $g(\yhat) = \mu(\yhat) - \yhat$, we use $g(\rhat) = \mu(\rhat) - \rhat/\alpha$.


text:
\begin{document}

\maketitle

\begin{abstract}
 Cosetal extensions of monoids generalise extensions of groups, special Schreier extensions of monoids and Leech's normal extensions of groups by monoids. They share a number of properties with group extensions, including a notion of Baer sum when the kernel is abelian. However, unlike group extensions (with fixed kernel and cokernel) there may be nontrivial morphisms between them. We explore the structure of the category of cosetal extensions and relate it to an analogue of second cohomology groups. Finally, the order structure and additive structures are combined to give an indexed family of inverse semigroups of extensions. These in turn can be combined into an inverse category.
\end{abstract}

\setcounter{section}{-1}
\section{Introduction}

It is well understood that from each extension of groups $\normalext{N}{k}{G}{e}{H}$ with abelian kernel, a unique action $\phi$ can be extracted. These actions then partition the set of isomorphism classes of extensions. Each set in the partition can be shown to be isomorphic to the second cohomology group $\mathcal{H}^2(H,N,\phi)$ whose elements are equivalence classes of factor sets and whose operation corresponds to the Baer sum of extensions. (See \cite{maclane2012homology} for more details.)

The construction of the action above usually makes explicit use of conjugation, which presents an obstacle in generalising these ideas to the context of monoids.

Much work has gone into generalising these ideas to the context of monoids --- usually by restricting to extensions of monoids that behave sufficiently similarly to those of groups.
Such approaches include the monoid extensions of Leech \cite{leech1982extending}, the Schreier extensions in \cite{redei1952verallgemeinerung,tuen1976nonabelianextensions} and the special Schreier extensions of \cite{martins2013semidirect,martins2016baer}.
Only the case of special Schreier extensions with abelian kernel has been shown to proceed as in the classical case described above where an action can be extracted and a second cohomology group can be defined in terms of equivalence classes of factor sets.

Special Schreier extensions are those whose kernel equivalence split extensions are the so-called Schreier split extensions \cite{martins2013semidirect}, which can in turn
be thought of as the split extensions of monoids corresponding to semidirect products.

In \cite{faul2019characterisation} a notion of a weak semidirect product was introduced and was shown to correspond precisely to the \emph{weakly Schreier split extensions} and are associated to a weak notion of action.
In \cite{faul2020baer} special Schreier extensions were generalised to \emph{cosetal extensions} --- extensions whose corresponding kernel equivalence split extension is only required to be weakly Schreier. This is equivalent to requiring that the extension $\normalext{N}{k}{G}{e}{H}$ satisfy that whenever $e(g) = e(g')$, there exist $n \in N$ such that $g = k(n)g'$.
Cosetal extensions always have group kernel and a weakly Schreier split extension is cosetal if and only if its kernel is a group.
In addition to generalising special Schreier extensions, cosetal extensions also generalise Leech's normal extensions of groups by monoids.

We have recently become aware that cosetal extensions were first studied in a rather dense paper by Fleischer \cite{fleischer1981monoid}, which does not appear to be well known. However, Fleischer does not discuss the Baer sums studied in \cite{faul2020baer}.

For cosetal extensions with abelian kernel a weak action can be extracted. Parameterising by these `actions' allows for the definition of an analogue of the second cohomology groups and a Baer sum of cosetal extensions.
Unlike the usual actions of groups or monoids, these weak actions form a nontrivial poset. This paper is concerned with the interplay of this poset structure and the second cohomology groups.

\section{Background}
In this section we will discuss the basic theory of weakly Schreier extensions as developed in \cite{faul2019characterisation}, though it is presented here in a slightly different way.
We will also give an overview of the `second cohomology groups' for cosetal extensions with abelian kernel from \cite{faul2020baer}.
(We call these second cohomology groups by analogy to the group case, but do note that a comprehensive cohomology theory has not yet been developed in this context. This is a topic for further research.)

\subsection{Weakly Schreier split extensions}
Between any two monoids $X$ and $Y$ we have the constant $1$ homomorphism which we (somewhat confusingly) write as $0_{X,Y}$ and call the \emph{zero morphism} from $X$ to $Y$. This name is justified by the fact that if $f\colon X' \to X$ and $g\colon Y \to Y'$ we have $0_{X,Y}f = 0_{X',Y}$ and $g0_{X,Y} = 0_{X,Y'}$
and so a zero morphism behaves like $0$ with respect to composition.

Equalisers and coequalisers exist in the category $\Mon$ of monoids. Thus, for any morphism $f\colon X \to Y$ we can ask for the equaliser of $f$ with $0_{X,Y}$ or the coequaliser of $f$ with $0_{X,Y}$; the former is called the kernel of $f$ and the latter the cokernel.

The kernel of $f$ can be shown to be the inclusion of the submonoid of elements sent by $f$ to $1$. The cokernel of $f$ is the quotient map corresponding to the congruence generated by $f(x) \sim 1$. The existence of kernels and cokernels allows us to define extensions in $\Mon$.

\begin{definition}
    A diagram $\normalext{N}{k}{G}{e}{H}$ of monoids is an \emph{extension} when $k$ is the kernel of $e$ and $e$ is the cokernel of $k$.

    A morphism of extensions (of $H$ by $N$) is a homomorphism $f\colon G_1 \to G_2$ making the following diagram commute.
    \begin{center}
    \begin{tikzpicture}[node distance=2.0cm, auto]
    \node (A) {$N$};
    \node (B) [right of=A] {$G_1$};
    \node (C) [right of=B] {$H$};
    \node (D) [below of=A] {$N$};
    \node (E) [right of=D] {$G_2$};
    \node (F) [right of=E] {$H$};
    \draw[normalTail->] (A) to node {$k_1$} (B);
    \draw[-normalHead] (B) to node {$e_1$} (C);
    \draw[normalTail->] (D) to node {$k_2$} (E);
    \draw[-normalHead] (E) to node {$e_2$} (F);
    \draw[->] (B) to node {$f$} (E);
    \draw[double equal sign distance] (A) to (D);
    \draw[double equal sign distance] (C) to (F);
    \end{tikzpicture}
    \end{center}
\end{definition}

A \emph{split extension} is an extension $\normalext{N}{k}{G}{e}{H}$ equipped with a monoid homomorphism $s\colon H \to G$ splitting $e$. A morphism of split extensions is a morphism of the underlying extensions commuting with the sections.

Split extensions of groups are particularly well behaved.
If $\splitext{N}{k}{G}{e}{s}{H}$ is a split extension of groups, then it is the case that for all $g \in G$, there exists a unique $n \in N$ such that $g = k(n)se(g)$. When this condition is imposed on a split extension of monoids we get the \emph{Schreier split extensions} of \cite{bourn2015Sprotomodular}. If we do away with the uniqueness requirement we obtain the weakly Schreier extensions first defined in \cite{bourn2015partialMaltsev}.

\begin{definition}
    A split extension $\splitext{N}{k}{G}{e}{s}{H}$ is \emph{weakly Schreier} if for all $g \in G$ there exists an $n \in N$ such that $g = k(n)se(g)$.
\end{definition}

There are many naturally occurring examples of weakly Schreier split extensions --- for instance, Artin glueings of frames \cite{sga4vol1,faul2019artin} and $\lambda$-semidirect products of inverse monoids \cite{billhardt1992wreath,faul2020lambda}.

In the category of groups, split extensions between $H$ and $N$ are in one-to-one correspondence with semidirect products of $H$ and $N$ which themselves correspond to actions of $H$ on $N$. The characterisation of weakly Schreier extensions makes extensive use of the ideas behind this correspondence, so let us discuss it now in some depth.

If $\splitext{N}{k}{G}{e}{s}{H}$ is a split extension of groups then the fact that there is a unique $n$ such that $g = k(n)se(g)$ means that the function $f\colon N \times H \to G$, where $f(n,h) = k(n)s(h)$, is a bijection of sets. We would like to equip the set $N \times H$ with a group structure so that $f$ is a morphism of split extensions as in the diagram

\begin{center}
   \begin{tikzpicture}[node distance=2.0cm, auto]
    \node (A) {$N$};
    \node (B) [right of=A] {$N \times H$};
    \node (C) [right of=B] {$H$};
    \node (D) [below of=A] {$N$};
    \node (E) [right of=D] {$G$};
    \node (F) [right of=E] {$H$};
    \draw[normalTail->] (A) to node {$k'$} (B);
    \draw[transform canvas={yshift=0.5ex},-normalHead] (B) to node {$e'$} (C);
    \draw[transform canvas={yshift=-0.5ex},->] (C) to node {$s'$} (B);
    \draw[normalTail->] (D) to node {$k$} (E);
    \draw[transform canvas={yshift=0.5ex},-normalHead] (E) to node {$e$} (F);
    \draw[transform canvas={yshift=-0.5ex},->] (F) to node {$s$} (E);
    \draw[->] (B) to node {$f$} (E);
    \draw[double equal sign distance] (A) to (D);
    \draw[double equal sign distance] (C) to (F);
   \end{tikzpicture}
\end{center}
where $k'(n) = (n,1)$, $e'(n,h) = h$ and $s'(h) = (1,h)$. Since $f(n,h)f(n',h') = k(n)s(h)k(n')s(h')$, we require that $f((n,h)(n',h')) = k(n)s(h)k(n')s(h')$.
Notice that there exists a unique $x \in N$ such that $s(h)k(n) = k(x)s(h)$, namely $x = s(h)k(n)s(h)\inv$.
Denote $x$ by $\alpha(h,n)$ and observe that $f(n\alpha(h,n'),hh') = k(n)k\alpha(h,n')s(h)s(h') = k(n)s(h)k(n')s(h')$. Consequently, if we define $(n,h)(n',h') = (n\alpha(h,n'),hh')$, then $f$ becomes an isomorphism of groups and, in fact, an isomorphism of split extensions. Moreover, the map $\alpha$ is a group action of $H$ on $N$ and all actions give rise to split extensions by the above procedure.

This result generalises to Schreier split extensions of monoids, which are in correspondence with monoid actions of $H$ on $N$. (These actions play the same role as conjugation in the group case.) The situation is not as simple for weakly Schreier split extensions, though we do obtain a correspondence for a suitable weakening of action.

If $\splitext{N}{k}{G}{e}{s}{H}$ is a weakly Schreier extension, then $f\colon (n,h) \mapsto k(n)s(h)$ is no longer a bijection, but only a surjection. Notice however that if $E$ is the equivalence relation on $N \times H$ defined by ${(n,h) \sim (n',h')} \iff k(n)s(h) = k(n')s(h')$, then $f$ factors through $(N \times H)/E$ to give a bijection. As before, we would like for this bijection to be an isomorphism and so we must find a suitable multiplication for $(N \times H)/E$.

Before we do so, let us first discuss the equivalence relation $E$. There are a number of properties $E$ always satisfies, which gives rise to the following definition.

\begin{definition}
    An equivalence relation $E$ on $N \times H$ is \emph{admissible} if
    \begin{enumerate}[start=0]
        \item $(n,h) \sim (n',h')$ implies $h = h'$,
        \item $(n,1) \sim (n',1)$ implies $n = n'$,
        \item $(n,h) \sim (n',h)$ implies $(xn,h) \sim (xn',h)$ and
        \item $(n,h) \sim (n',h)$ implies $(n,hy) \sim (n',hy)$.
    \end{enumerate}
\end{definition}

The first condition says two pairs will only be related if they agree in the second component. This allows us to reformulate an admissible equivalence relation as a particular $H$-indexed equivalence relation on $N$: each $h \in H$ gives an equivalence relation on $N$ written $n \sim^h n'$.

\begin{definition}\label{def:admissible_indexed_equivalence_relation}
    An $H$-indexed equivalence relation $E$ on $N$ is admissible if
    \begin{enumerate}
        \item $n \sim^1 n'$ implies $n = n'$,
        \item $n \sim^h n'$ implies $xn \sim^h xn'$,
        \item $n \sim^h n'$ implies $n \sim^{hy} n'$.
    \end{enumerate}
\end{definition}

For the remainder of the paper we will make use of this new perspective and consider admissible $H$-indexed equivalence relations on $N$.

For each equivalence relation $\sim^h$ we can quotient $N$ to get $N/{\sim^h}$ whose elements we write as $[n]_h$. It clear that $(N \times H)/E$ is isomorphic to $\bigsqcup_{h \in H}(N/{\sim^h})$ where $[(n,h)]$ corresponds to $([n]_h,h)$. For convenience we will later omit the subscript in the first component, as it is completely determined by the second component.

Now let us return to our weakly Schreier extension $\splitext{N}{k}{G}{e}{s}{H}$. We know that we have a corresponding admissible $H$-indexed equivalence relation $E$ and that $\bigsqcup_{h \in H}(N/{\sim^h})$ is isomorphic to $G$ via $\overline{f}([n],h) = k(n)s(h)$.

Now by the weakly Schreier condition and the axiom of choice, we know that there exists a set map $q \colon G \to N$ such that $g = kq(g)se(g)$ for all $g \in G$.
As before we can define a map $\alpha\colon H \times N \to N$ such that $\alpha(h,n) = q(s(h)k(n))$. Notice that $\overline{f}([n\alpha(h,n')],hh') = k(n)k\alpha(h,n')s(h)s(h') = k(n)s(h)k(n')s(h')$ which implies that $\overline{f}$ is an isomorphism with respect to the multiplication $([n],h)([n'],h') = ([n\alpha(h,n')],hh')$. Furthermore, it is easy to see this gives an isomorphism of extensions.

We can characterise the functions $\alpha$ arising in this way as follows.
\begin{definition}\label{def:compatible_action}
    A map $\alpha\colon H \times N \to N$ is a \emph{compatible action} with respect to an admissible $H$-indexed equivalence relation $E$ if it satisfies the following conditions.
    \begin{enumerate}
        \item $n \sim^h n'$ implies $n\alpha(h,x) \sim^h n'\alpha(h,x)$ for all $x \in N$,
        \item $n \sim^h n'$ implies $\alpha(x,n) \sim^{xh} \alpha(x,n')$ for all $x \in H$,
        \item $\alpha(h,nn') \sim^h \alpha(h,n)\cdot \alpha(h,n')$,
        \item $\alpha(hh',n) \sim^{hh'} \alpha(h,\alpha(h',n))$,
        \item $\alpha(h,1) \sim^h 1$,
        \item $\alpha(1,n) \sim^1 n$.
    \end{enumerate}
    We say that the $H$-indexed equivalence relation and the candidate action are \emph{compatible}
    and call $(E, \phi)$ a \emph{compatible pair}.
\end{definition}

Compatible pairs give a full characterisation of weakly Schreier extensions.
\begin{proposition}
    Let $N$ and $H$ be monoids and $(E, \phi)$ be a compatible pair. Then $\bigsqcup_{h \in H}(N/{\sim^h})$ becomes a monoid when equipped with unit $([1],1)$ and a product given by
    \[
        ([n],h) \cdot ([n'],h') = ([n\alpha(h,n')],hh').
    \]
    We denote this monoid by $N \rtimes_{E,\phi} H$.
\end{proposition}

\begin{theorem}
    Let $N$ and $H$ be monoids and $(E,\phi)$ a compatible pair. Then the diagram \[\splitext{N}{k}{N \rtimes_{E,\phi} H}{e}{s}{H}\]
    where $k(n) = ([n],1)$, $e([n],h) = h$ and $s(h) = ([1],h)$ is a weakly Schreier extension. Furthermore, every weakly Schreier extensions is isomorphic to one of this form.
\end{theorem}

In general there can be many actions compatible with an $H$-indexed equivalence relation $E$ that give rise to the same monoid. This can be remedied by considering equivalence classes of actions where $\phi \sim \phi'$ if and only if $\phi(h,n) \sim^h \phi'(h,n)$ for all $h \in H$ and $n \in N$. This then gives a complete characterisation of weakly Schreier extensions.

A final point worth emphasising regards morphisms between weakly Schreier extensions. In the group setting we have the split short five lemma, which says that a morphism of split extensions is an isomorphism, and moreover, any such isomorphism is unique.
A similar result holds in the generalisation to Schreier split extensions of monoids. In our setting it does not. However, we show below that all morphisms between two such extensions must be unique.

Consider a morphism of split extensions.
\begin{center}
   \begin{tikzpicture}[node distance=2.0cm, auto]
    \node (A) {$N$};
    \node (B) [right=1.2cm of A] {$N \rtimes_{E,\phi} H$};
    \node (C) [right=1.2cm of B] {$H$};
    \node (D) [below of=A] {$N$};
    \node (E) [below of=B] {$N \rtimes_{E',\phi'} H$};
    \node (F) [below of=C] {$H$};
    \draw[normalTail->] (A) to node {$k_1$} (B);
    \draw[transform canvas={yshift=0.5ex},-normalHead] (B) to node {$e_1$} (C);
    \draw[transform canvas={yshift=-0.5ex},->] (C) to node {$s_1$} (B);
    \draw[normalTail->] (D) to node {$k_2$} (E);
    \draw[transform canvas={yshift=0.5ex},-normalHead] (E) to node {$e_2$} (F);
    \draw[transform canvas={yshift=-0.5ex},->] (F) to node {$s_2$} (E);
    \draw[->] (B) to node {$f$} (E);
    \draw[double equal sign distance] (A) to (D);
    \draw[double equal sign distance] (C) to (F);
   \end{tikzpicture}
\end{center}
Since $fk_1 = k_2$ and $fs_1 = s_2$, we have that $f([n],1) = ([n],1)$ and $f([1],h) = ([1],h)$. Now it is not hard to see that $([n],h) = ([n],1)([1],h)$ and so, since $f$ preserves the multiplication, we find that $f([n],h) = ([n],h)$. This unique map will only be well defined when $E \subseteq E'$ and when $\phi(h,n) \sim_{E'}^h \phi'(h,n)$. This makes the category of weakly Schreier extensions a preorder. This is equivalent to a poset $\WAct(H,N)$ whose objects are compatible pairs $(E,[\phi]_E)$.
Here $(E,[\phi]_E) \le (E',[\phi']_{E'})$ if and only if $E \subseteq E'$ and $[\phi]_{E'} = [\phi']_{E'}$. Notice this means that we can then always rewrite such an inequality as $(E,[\phi]_E) \le (E,[\phi]_{E'})$ with the same representative action.

\subsection{Cosetal extensions and Baer sums}
We now turn our attention to general (non-split) extensions.
In all that follows we assume that the kernel $N$ is abelian group. Let us begin by briefly describing the situation in the category of groups.

For an extension of groups $\normalext{N}{k}{G}{e}{H}$ note that $e(gk(n)g\inv) = 1$ and so there exists an element $\theta(g,n)$ such that $k\theta(g,n) = gk(n)g\inv$.
This map $\theta$ is an action of $G$ on $N$. Now for any set-theoretic section $s$ of $e$ we can define $\phi \colon H \times N \to N$ by $\phi(h,n) = \theta(s(h),n)$.
It turns out that each choice of splitting gives the same map $\phi$, and furthermore, that $\phi$ is a group action of $H$ on $N$. As above, this action satisfies the important identity that $k\phi(h,n)s(h) = s(h)k(n)$.

One can show that if $e(g) = e(g')$, there is a unique $n \in N$ such that $g = k(n)g'$. Now notice that $e(s(hh')) = e(s(h)s(h'))$, so that there exists an $x \in N$ such that $k(x)s(hh') = s(h)s(h')$. Define a map $g_s \colon H \times H \to N$ that chooses these elements so that $kg_s(h,h')s(hh') = s(h)s(h')$. We call $g_s$ the \emph{associated factor set} of $s$.

Observe that $g_s(h,1) = 1 = g_s(1,h)$. Furthermore, we have that $g_s(x,y)g_s(xy,z) = \phi(x,g_s(y,z))g_s(x,yz)$. Any map $g$ satisfying the above equations is called a \emph{factor set}. It
is not hard to see that the set of factor sets is an abelian group under pointwise multiplication.

Now let $\normalext{N}{k}{G}{e}{H}$ be an extension and $s$ an arbitrary set-theoretic section of $e$. Let $\phi$ be the associated action and $g_s$ the factor set associated to $s$. We now define $N \rtimes_\phi^{g_s} H$, a generalisation of the semidirect product whose underlying set is $N \times H$ and with multiplication given by
\[
    (n,h)(n',h') = (n\phi(h,n')g_s(h,h'),hh').
\]
The function $f\colon N \rtimes_\phi^{g_s} H \to G$ given by $f(n,h) = k(n)s(h)$ can be easily seen to be a bijection. Furthermore, the following calculation shows that it preserves the multiplication.
\begin{align*}
    f((n,h)(n',h'))     &= f(n\phi(h,n')g(h,h'),hh') \\
                        &= k(n)k\phi(h,n')kg(h,h')s(hh') \\
                        &= k(n)\phi(h,n')s(h)s(h') \\
                        &= k(n)s(h)k(n')s(h') \\
                        &= f(n,h)f(n',h')
\end{align*}

If $\phi$ is an action of $H$ on $N$ and $g$ is a factor set, then $N \rtimes_\phi^g H$ can always be made into an extension with associated action $\phi$. Thus, it seems likely that extensions can be characterised by actions and factor sets. The only hurdle is that our above calculation made use of an arbitrary splitting $s$. If instead we chose a different splitting $s'$, we would get a different factor set $g_{s'}$ which would give back the same extension. Therefore, we need to take a quotient of the abelian group of factor sets.

The appropriate subgroup to quotient by is the subgroup of \emph{inner factor sets}: factor sets of the form $\delta t(h,h') = \phi(h,t(h'))t(hh')\inv t(h)$ where $t\colon H \to N$ is any identity preserving function. The resulting quotient group is the second cohomology group $\mathcal{H}^2(H,N,\phi)$, which by the above arguments can be easily seen to correspond to the set of isomorphism classes of extensions with action $\phi$. The bijection endows this set with a natural abelian group structure.

In this paper, we are concerned with cosetal extensions of monoids with abelian kernel.
\begin{definition}
    An extension $\normalext{N}{k}{G}{e}{H}$ of monoids is (right) \emph{cosetal} if whenever $e(g) = e(g')$ there exists an $n \in N$ such that $g = k(n)g'$.
\end{definition}

These are precisely the extensions for which $H$ can be considered to be the monoid of right cosets of $N$ with the usual multiplication. A weakly Schreier split extension is cosetal if and only if it has group kernel.

If $\normalext{N}{k}{G}{e}{H}$ is a cosetal extension and $s$ is a set-theoretic section of $e$, then we can define an $H$-indexed equivalence relation $E$ by $n \sim^h n'$ if and only if $k(n)s(h) = k(n')s(h)$. This will be admissible, and moreover, any other section $s'$ will induce the same $H$-indexed equivalence relation. In this way we can associate a uniquely-defined admissible $H$-indexed equivalence relation to each cosetal extension.

Now note that $e(s(h)) = e(s(h)k(n))$ and thus by the cosetal property there exists an element $x \in N$ such that $k(x)s(h) = s(h)k(n)$. Let us denote such an element $x$ by $\phi(h,n)$.
It can be shown that $\phi\colon H \times N \to N$ is compatible action for the associated equivalence relation $E$.
Note that $\phi$ is not necessarily unique, but any other action constructed in this way will be equivalent to $\phi$ with respect to $E$.

Thus, to each cosetal extension we can associate an admissible equivalence relation $E$ and a compatible class of actions $[\phi]$.
An alternate way of viewing this is that we associate a weak semidirect product is to each cosetal extension, as one might associate a semidirect product to extensions in the group setting.

As in the group case, for each set-theoretic splitting $s$ of $e$ we can consider an associated factor set $g_s$ satisfying $kg_s(h,h')s(hh') = s(h)s(h')$. This motivates our approach to the generalisation of the second cohomology groups.

The isomorphism classes of cosetal extensions can be partitioned according to the value of $(E,[\phi])$ in each case.
Let us call each component $\Cext(H,N,E,[\phi])$.
We can characterise each extension in $\Cext(H,N,E,[\phi])$ with a relaxed notion of a factor set.
This is a function $g \colon H \times H \to N$ such that $g(h,1) \sim^h 1 \sim^h g(1,h)$ and $g(x,y)g(xy,z) \sim^{xyz} \phi(x,g(y,z))g(x,yz)$. Given $(E,[\phi])$ and a factor set $g$ we can construct a monoid $N \rtimes_{E,\phi}^g H$ with underlying set $\bigsqcup_{h \in H}N/{\sim_h}$ and multiplication given by
\[
    ([n],h)([n'],h') = ([n\phi(h,n')g(h,h')],hh').
\]
We obtain a cosetal extension \normalext{N}{k}{N \rtimes_{E,\phi}^g H}{e}{H} where $k$ and $e$ are the obvious morphisms.

As discussed above, if we start with a cosetal extension $\normalext{N}{k}{G}{e}{H}$ and take an arbitrary section $s$, we can associate to it a factor set $g_s$ and can show that $N \rtimes_{E,\phi}^{g_s} H$ is isomorphic to $G$ and that this can further be extended to an isomorphism of extensions.

The same issue of multiple factor sets giving rise to the same extension occurs and it is again solved by quotienting by an appropriate notion of a inner factor set where we say $g \equiv g'$ if and only if there exists an inner factor set $\delta t$ such that $(\delta t + g')(h,h') \sim^{hh'} g(h,h')$ for all $h, h' \in H$. This gives rise to the second cohomology group $\mathcal{H}^2(H,N,E,[\phi])$ which is then isomorphic to $\Cext(H,N,E,[\phi])$.

\subsection{Relation to Leech and special Schreier extensions}

Let us discuss the relationship between cosetal extensions and other notions of monoid extension found in the literature.
In \cite{leech1982extending} Leech considers extensions of groups by monoids $\normalext{N}{k}{G}{e}{H}$ in which $N$ is a normal subgroup of $G$ in the sense that $N$ is a subgroup of the group of units of $G$ and $gN = Ng$ for all $g \in G$. It is easy to see that every such extension is cosetal. However, the following example demonstrates that not all cosetal extensions are Leech extensions, even when the kernel is an abelian group.

\begin{example}
 Let $\mathbbm{2}=\{\top,\bot\}$ denote the two-element meet-semilattice and consider the action $\alpha\colon \mathbbm{2} \times \Z \to \Z$ defined by $\alpha(\top,n) = n$ and $\alpha(\bot,n) = 0$. We may construct the semidirect product $\Z \rtimes_\alpha \mathbbm{2}$ and the extension $\normalext{\Z}{k}{\Z \rtimes_\alpha \mathbbm{2}}{e}{\mathbbm{2}}$ in which $k(n) = (n,\top)$ and $e(n,x) = x$.

 Explicitly, the multiplication in $\Z \rtimes_\alpha \mathbbm{2}$ is given by $(n,\top)\cdot (n',h) = (n+n',h)$ and $(n,\bot)\cdot (n', h) = (n, \bot)$. The right coset $\Z\cdot(0,\bot)$ is then $\Z \times \{\bot\}$, while the left coset $(0,\bot)\cdot\Z$ is $\{(0,\bot)\}$.
 Thus this extension is not a Leech extension, but it is cosetal as it is a (weakly) Schreier split extension with group kernel.
\end{example}

The special Schreier extensions of \cite{martins2016baer} are extensions $\normalext{N}{k}{G}{e}{H}$ such that whenever $e(g) = e(g')$ there exists a \emph{unique} element $n \in N$ such that $k(n)g' = g$. Of course, every special Schreier extension is cosetal.
The following example from \cite{faul2020baer} exhibits a Leech extension, and hence a cosetal extension, which is not special Schreier. Thus, cosetal extensions constitute a nontrivial simultaneous generalization of Leech's extensions of groups by monoids and special Schreier extensions of monoids.

\begin{example}
 Let $\Z_\infty$ be the monoid obtained by adjoining an absorbing element $\infty$ to the integers under addition. Consider the extension $\normalext{\Z}{k}{\Z_\infty}{e}{\mathbbm{2}}$ in which $k(n) = n$ and $e(n) = \top$ for $n \in \Z$ and $e(\infty) = \bot$. Because $Z_\infty$ is commutative, it is clear that this is a Leech extension. However, it is not special Schreier as $n+\infty = \infty$ for all $n \in \Z$ and so uniqueness fails.
\end{example}

\section{Natural morphisms between the second cohomology groups}

Throughout this section, the kernel $N$ will be assumed to be an abelian group.
In the setting of special Schreier extensions there is an assignment of monoid actions $\phi$ of $H$ on $N$ to abelian groups $\mathcal{H}^2(H,N,\phi)$.
Since the set of actions $\Act(H,N)$ can be thought of as a discrete category, this assignment gives rise immediately to a functor $L_{H,N}\colon \Act(H,N) \to \Ab$.

For the theory of cosetal extensions we get an assignment of compatible pairs $(E,[\phi])$ to the abelian groups $\mathcal{H}^2(H,N,E,[\phi])$.
But in this case $\WAct(H,N)$ is a preorder and so functoriality of this assignment is a nontrivial property. In this section we demonstrate that it is indeed functorial and use it investigate the morphisms of cosetal extensions.

\subsection{The functor}\label{sec:the_functor_L}
Suppose that $(E,[\phi]) \leq (E', [\phi])$. We would like to find a relationship between $\mathcal{H}^2(H,N,E,[\phi])$ and $\mathcal{H}^2(H,N,E',[\phi])$.

\begin{proposition}\label{prop:grouphomo}
    If $(E,[\phi]) \leq (E', [\phi])$ then the map $\ell \colon \mathcal{H}^2(H,N,E,[\phi]) \to \mathcal{H}^2(H,N,E',[\phi])$ sending $[g]_E$ to $[g]_{E'}$ is a group homomorphism.
\end{proposition}

\begin{proof}
    Let us begin by showing that $\ell$ is well-defined.

    As $g$ is a factor set, we have $g(x,y)g(xy,z) \sim_E^{xyz} \phi(x,g(y,z))g(x,yz)$.
    Now since $E \subseteq E'$, we see that this identity is automatically satisfied with respect to $E'$ and so $g$ is also a factor set with respect to $E'$.

    Recall that two factor sets are equivalent in $\mathcal{H}^2(H,N,E,[\phi])$ if there exists an inner factor set $\delta t$ such that $g(h,h') \sim_E^{hh'} (\delta t + g')(h,h')$ for all $h,h' \in H$.
    But since $E \subseteq E'$, this is also satisfied with respect to $E'$. Thus, $g \equiv_{E'} g'$ and the mapping is well defined.

    It is clear from the definition that the mapping preserves the identity and addition.
\end{proof}

It is not hard to see that this makes the assignment of compatible pairs to the cohomology groups into a functor.
\begin{definition}
 We obtain a functor $L_{H,N}\colon \WAct(H,N) \to \Ab$ that sends $(E,[\phi])$ to $\mathcal{H}^2(H,N,E,[\phi])$ and yields the morphism $\ell\colon \mathcal{H}^2(H,N,E,[\phi]) \to \mathcal{H}^2(H,N,E',[\phi])$ described above for $(E,[\phi]) \le (E',[\phi])$.
\end{definition}

\subsection{Morphisms of cosetal extensions}
There is the immediate question of whether the extension corresponding to a cohomology class $[g]_E \in \mathcal{H}^2(H,N,E,[\phi])$ is in any way related to the extension corresponding to $\ell([g]) \in \mathcal{H}^2(H,N,E',[\phi])$.

\begin{proposition}\label{prop:canonical_map_between_extensions}
    Suppose $(E,[\phi]) \le (E',[\phi])$ and take $[g] \in \mathcal{H}^2(H,N,E,[\phi])$.
    Consider the extensions $\normalext{N}{k'}{N \rtimes_{E,\phi}^g H}{e'}{H}$ and $\normalext{N}{k}{N \rtimes_{E',\phi}^g H}{e}{H}$ associated $[g]$ and $\ell([g])$ respectively. Then the map $\lambda\colon N \rtimes_{E,\phi}^g H \to N \rtimes_{E',\phi}^{g} H$ defined by $\lambda([n],h) = ([n],h)$ is a morphism of extensions.
\end{proposition}
\begin{proof}
    This map is well-defined, since $E \subseteq E'$, and it is immediate that the identity $([1],1)$ is preserved. Preservation of multiplication follows from the following trivial calculation.
    \begin{align*}
        \lambda(([n],h)([n'],h')) &= \lambda([n\phi(h,n')g(h,h')],hh') \\
                            &= [n\phi(h,n')g(h,h')],hh') \\
                            &= ([n],h)([n'],h') \\
                            &= \lambda([n],h)\lambda([n'],h')
    \end{align*}
    We then clearly have $\lambda k = k'$ and that $e'\lambda = e$, which completes the proof.
\end{proof}

We can now ask a converse to the above question: if $f$ is a morphism between cosetal extensions, is there any way to relate their associated cohomology classes?

Consider the following morphism of extensions.
\begin{center}
   \begin{tikzpicture}[node distance=2.0cm, auto]
    \node (A) {$N$};
    \node (B) [right of=A] {$G_1$};
    \node (C) [right of=B] {$H$};
    \node (D) [below of=A] {$N$};
    \node (E) [right of=D] {$G_2$};
    \node (F) [right of=E] {$H$};
    \draw[normalTail->] (A) to node {$k_1$} (B);
    \draw[-normalHead] (B) to node {$e_1$} (C);
    \draw[normalTail->] (D) to node {$k_2$} (E);
    \draw[-normalHead] (E) to node {$e_2$} (F);
    \draw[->] (B) to node {$f$} (E);
    \draw[double equal sign distance] (A) to (D);
    \draw[double equal sign distance] (C) to (F);
   \end{tikzpicture}
\end{center}
To find the associated $H$-indexed equivalence relation for $\normalext{N}{k_1}{G_1}{e_1}{H}$, we take an arbitrary set-theoretic splitting $s$ of $e_1$ and define $n \sim^h n'$ if and only if $k_1(n)s(h) = k_1(n')s(h)$.

Notice that if $s$ is such a splitting, then $e_2fs = e_1s = 1$ and so $fs$ is a splitting of $e_2$. This observation allows us to prove many of the results that follow.

\begin{lemma}
    Let $f$ be a morphism of extensions as in the following diagram.
    \begin{center}
       \begin{tikzpicture}[node distance=2.0cm, auto]
        \node (A) {$N$};
        \node (B) [right of=A] {$G_1$};
        \node (C) [right of=B] {$H$};
        \node (D) [below of=A] {$N$};
        \node (E) [right of=D] {$G_2$};
        \node (F) [right of=E] {$H$};
        \draw[normalTail->] (A) to node {$k_1$} (B);
        \draw[-normalHead] (B) to node {$e_1$} (C);
        \draw[normalTail->] (D) to node {$k_2$} (E);
        \draw[-normalHead] (E) to node {$e_2$} (F);
        \draw[->] (B) to node {$f$} (E);
        \draw[double equal sign distance] (A) to (D);
        \draw[double equal sign distance] (C) to (F);
       \end{tikzpicture}
    \end{center}
    If $E_1$ and $E_2$ are the equivalence relations associated to $\normalext{N}{k_1}{G_1}{e_1}{H}$ and $\normalext{N}{k_2}{G_2}{e_2}{H}$ respectively, then $E_1 \subseteq E_2$.
\end{lemma}

\begin{proof}
    Let $s$ be a splitting of $e_1$ and suppose that $n \sim_{E_1}^h n'$. This means that $k_1(n)s(h) = k_1(n')s(h)$. Now recall that $fs$ splits $e_2$ and consider the following sequence of equalities.
    \begin{align*}
        k_2(n)fs(h) &= fk_1(n)fs(h) \\
                    &= f(k_1(n)s(h)) \\
                    &= f(k_1(n')s(h)) \\
                    &= k_2(n')fs(h).
    \end{align*}
    Thus, $n \sim_{E_2}^h n'$ and hence $E_1 \subseteq E_2$.
\end{proof}

Using similar ideas we can show that the same action can be extracted from both extensions.

\begin{lemma}
    Let $f$ be a morphism of extensions as in the following diagram.
    \begin{center}
       \begin{tikzpicture}[node distance=2.0cm, auto]
        \node (A) {$N$};
        \node (B) [right of=A] {$G_1$};
        \node (C) [right of=B] {$H$};
        \node (D) [below of=A] {$N$};
        \node (E) [right of=D] {$G_2$};
        \node (F) [right of=E] {$H$};
        \draw[normalTail->] (A) to node {$k_1$} (B);
        \draw[-normalHead] (B) to node {$e_1$} (C);
        \draw[normalTail->] (D) to node {$k_2$} (E);
        \draw[-normalHead] (E) to node {$e_2$} (F);
        \draw[->] (B) to node {$f$} (E);
        \draw[double equal sign distance] (A) to (D);
        \draw[double equal sign distance] (C) to (F);
       \end{tikzpicture}
    \end{center}
    There exists a map $\phi$ such that $\normalext{N}{k_1}{G_1}{e_1}{H}$ belongs to
    $\Cext(H,N,E_1,[\phi])$ and $\normalext{N}{k_2}{G_2}{e_2}{H}$ belongs to $\Cext(H,N,E_2,[\phi])$.
\end{lemma}
\begin{proof}
    Suppose that $s$ splits $e_1$ and that $(E_1,\phi)$ is the compatible pair associated to
    $\normalext{N}{k_1}{G_1}{e_1}{H}$. This means that $k_1\phi(h,n)s(h) = s(h)k_1(n)$. Applying $f$ to both sides yields $fk_1\phi(h,n)fs(h) = fs(h)fk_1(h)$ and hence $k_2\phi(h,n)fs(h) = fs(h)k_2(n)$. This shows that $\phi$ is compatible with $\normalext{N}{k_2}{G_2}{e_2}{H}$ as required.
\end{proof}

Thus, if $f$ is a morphism of extensions, we know that the extensions must correspond to cohomology classes in $\mathcal{H}^2(H,N,E_1,[\phi])$ and $\mathcal{H}^2(H,N,E_2,[\phi])$ with $(E_1,[\phi]) \le (E_2,[\phi])$. But in this situation, \cref{prop:grouphomo} supplies us with a map $\ell\colon \mathcal{H}^2(H,N,E_1,[\phi]) \to \mathcal{H}^2(H,N,E_2,[\phi])$. We now show that $\ell$ must map the one extension to the other.

\begin{lemma}
    Let $f$ be a morphism of extensions as in the following diagram.
    \begin{center}
       \begin{tikzpicture}[node distance=2.0cm, auto]
        \node (A) {$N$};
        \node (B) [right of=A] {$G_1$};
        \node (C) [right of=B] {$H$};
        \node (D) [below of=A] {$N$};
        \node (E) [right of=D] {$G_2$};
        \node (F) [right of=E] {$H$};
        \draw[normalTail->] (A) to node {$k_1$} (B);
        \draw[-normalHead] (B) to node {$e_1$} (C);
        \draw[normalTail->] (D) to node {$k_2$} (E);
        \draw[-normalHead] (E) to node {$e_2$} (F);
        \draw[->] (B) to node {$f$} (E);
        \draw[double equal sign distance] (A) to (D);
        \draw[double equal sign distance] (C) to (F);
       \end{tikzpicture}
    \end{center}
    If $\normalext{N}{k_1}{G_1}{e_1}{H}$ corresponds to $[g]_E \in \mathcal{H}^2(H,N,E_1,[\phi])$, then $\normalext{N}{k_2}{G_2}{e_2}{H}$ corresponds to $\ell([g]_E) \in \mathcal{H}^2(H,N,E_2,[\phi])$.
\end{lemma}

\begin{proof}
    Suppose that $s$ is a splitting of $e_1$ and then let $g_s$ be the associated factor set. We will show that $g_s$ is also a factor set associated to the splitting $fs$ of $e_2$.

    We know that $k_1g_s(h,h')s(hh') = s(h)s(h')$. Now simply apply $f$ to both sides to get $fk_1g_s(h,h')fs(hh') = fs(h)fs(h')$. This of course gives $k_2g_s(h,h')fs(hh') = fs(h)fs(h')$. This shows that $g_s$ is also an associated factor set of $fs$, which completes the proof.
\end{proof}

Together these results give the following theorem.
\begin{theorem}\label{prop:existence_of_morphisms_of_cosetal_extensions}
        Let $\normalext{N}{k_1}{G_1}{e_1}{H}$ be a cosetal extension corresponding to $[g_1]_{E_1} \in \mathcal{H}^2(H,N,E_1,[\phi_1])$ and let $\normalext{N}{k_2}{G_2}{e_2}{H}$ be a cosetal extension corresponding to $[g_2]_{E_2} \in \mathcal{H}^2(H,N,E_2,[\phi_2])$. Then
        there exists a morphism $f$ of extensions as in the following diagram
    \begin{center}
       \begin{tikzpicture}[node distance=2.0cm, auto]
        \node (A) {$N$};
        \node (B) [right of=A] {$G_1$};
        \node (C) [right of=B] {$H$};
        \node (D) [below of=A] {$N$};
        \node (E) [right of=D] {$G_2$};
        \node (F) [right of=E] {$H$};
        \draw[normalTail->] (A) to node {$k_1$} (B);
        \draw[-normalHead] (B) to node {$e_1$} (C);
        \draw[normalTail->] (D) to node {$k_2$} (E);
        \draw[-normalHead] (E) to node {$e_2$} (F);
        \draw[->] (B) to node {$f$} (E);
        \draw[double equal sign distance] (A) to (D);
        \draw[double equal sign distance] (C) to (F);
       \end{tikzpicture}
    \end{center}
    if and only if $(E_1,[\phi_1]) \le (E_2,[\phi_2])$ and if  $[g_1]_{E_2} = [g_2]_{E_2}$.
\end{theorem}

Notice that this implies that the only morphisms between extensions belonging to $\Cext(H,N,E,[\phi])$ are endomorphisms. In fact, we can show that they are all automorphisms.

\begin{proposition}\label{prop:automorphism}
    If $f$ is an endomorphism of the cosetal extension $\normalext{N}{k}{N \rtimes_{E,\phi}^g H}{e}{H}$, then $f$ is an automorphism.
\end{proposition}

\begin{proof}
    Let $s$ be a splitting of $e$.
    Since $f$ is an endomorphism of extensions, we have $fk = k$ and $ef = e$. Note that $f([n],h) = f(k(n)s(h)) = fk(n)fs(h) = k(n)fs(h)$. Because $ef = e$, we know $efs(h) = h$ and so $fs(h) = [f^*(h),h]$ for some $f^*(h) \in N$. Thus, $f([n],h) = ([f^*(h)n],h)$.

    It is now easily seen that $([n],h) \mapsto ([f^*(h)^{-1}n],h)$ provides an inverse function.
\end{proof}

In particular, we arrive at the following parameterised version of the short five lemma.

\begin{theorem}
        If $f$ is a morphism of extensions as in the following diagram
    \begin{center}
       \begin{tikzpicture}[node distance=2.0cm, auto]
        \node (A) {$N$};
        \node (B) [right of=A] {$G_1$};
        \node (C) [right of=B] {$H$};
        \node (D) [below of=A] {$N$};
        \node (E) [right of=D] {$G_2$};
        \node (F) [right of=E] {$H$};
        \draw[normalTail->] (A) to node {$k_1$} (B);
        \draw[-normalHead] (B) to node {$e_1$} (C);
        \draw[normalTail->] (D) to node {$k_2$} (E);
        \draw[-normalHead] (E) to node {$e_2$} (F);
        \draw[->] (B) to node {$f$} (E);
        \draw[double equal sign distance] (A) to (D);
        \draw[double equal sign distance] (C) to (F);
       \end{tikzpicture}
    \end{center}
    where $\normalext{N}{k_1}{G_1}{e_1}{H}$ and $\normalext{N}{k_2}{G_2}{e_2}{H}$ belong to $\Cext(H,N,E,[\phi])$, then $f$ is an isomorphism.
\end{theorem}

We can extend the ideas in \cref{prop:automorphism} to give a full characterisation of the automorphisms of extensions in terms of an obvious generalisation of \emph{crossed homomorphisms} from the theory of group extensions.

Let $\normalext{N}{k}{N \rtimes_{E,\phi}^g H}{e}{H}$ belong to $\Cext(H,N,E,[\phi])$.
Notice that any automorphism $f$ must send $([n],h)$ to $([f^*(h)n],h)$, where $f^*(h)\colon H \to N$. We then ask for which functions $t^* \colon H \to N$ the map $t([n],h) = ([t^*(h)n],h)$ is a homomorphism.
For $t$ to preserve the unit we need that $t^*(1) = 1$.
For it to preserve the multiplication we need for $t(([n],h)([n'],h')) = ([t^*(hh')n\phi(h,n')g(h,h')],hh')$
and $t([n],h)t([n'],h') = ([t^*(h)n\phi(h,t^*(h'))\phi(h,n')g(h,h')],hh')$
to be equal. This happens when
\[
    t^*(hh')n\phi(h,n')g(h,h') \sim^{hh'} t^*(h)n\phi(h,t^*(h'))\phi(h,n')g(h,h').
\]
Now multiplying on the left by $n\inv \phi(h,n')\inv g(h,h')\inv$ gives $t^*(hh') \sim^{hh'} t^*(h)\phi(h,t^*(h'))$,
which is the natural weakening of a crossed homomorphism to our setting.

\begin{definition}
    A function $t^* \colon H \to N$ is a crossed homomorphism relative to $(E,\phi)$ when
    \[
        t^*(hh') \sim^{hh'} t^*(h)\phi(h,t^*(h')).
    \]
\end{definition}

We have shown above that crossed homomorphisms give rise to automorphisms of extensions and that every endomorphism arises in this way.
However, it is possible for two crossed homomorphisms to yield the same endomorphism. To remedy this we quotient the set of crossed homomorphisms with the equivalence relation defined by $t^*_1 \sim t^*_2 \iff t^*_1(h) \sim^h t^*_2(h)$.

\begin{definition}
Let $\mathcal{Z}^1(H,N,E,[\phi])$ denote the set of equivalence classes of crossed homomorphisms. This inherits an abelian group structure from the pointwise multiplication of crossed homomorphisms.
\end{definition}

\begin{theorem}
    If $\Gamma$ is a cosetal extension $\normalext{N}{k}{G}{e}{H}$ in $\mathcal{H}^2(H,N,E,[\phi])$, then there is a bijection between $\End(\Gamma)$ and $\mathcal{Z}^1(H,N,E,[\phi])]$.
    Moreover, this an isomorphism of monoids.
\end{theorem}

The same approach allows us to characterise arbitrary morphisms. Let $f$ be a morphism of extensions as in the following diagram.
\begin{center}
   \begin{tikzpicture}[node distance=2.0cm, auto]
    \node (A) {$N$};
    \node (B) [right=1.2cm of A] {$N \rtimes_{E,\phi}^g H$};
    \node (C) [right=1.2cm of B] {$H$};
    \node (D) [below of=A] {$N$};
    \node (E) [below of=B] {$N \rtimes_{E',\phi}^g H$};
    \node (F) [below of=C] {$H$};
    \node (G) [left=0.3cm of A] {$\Gamma\colon$};
    \node (H) [left=0.3cm of D] {$\Psi\colon$};
    \node (blank) [right=0.3cm of C] {};
    \draw[normalTail->] (A) to node {$k_1$} (B);
    \draw[-normalHead] (B) to node {$e_1$} (C);
    \draw[normalTail->] (D) to node {$k_2$} (E);
    \draw[-normalHead] (E) to node {$e_2$} (F);
    \draw[->] (B) to node {$f$} (E);
    \draw[double equal sign distance] (A) to (D);
    \draw[double equal sign distance] (C) to (F);
   \end{tikzpicture}
\end{center}

Then by a similar argument we have that $f([n],h) = ([t^*(h)n],h)$ where $t^* \colon H \to N$ is a crossed homomorphism relative to the admissible $H$-indexed equivalence relation $E'$. Thus, we arrive at the following result.

\begin{theorem}
Let $\Gamma$ and $\Psi$ be cosetal extensions as above. Then $\Hom(\Gamma,\Psi)$ is bijective to $\mathcal{Z}^1(H,N,E',\phi)$ under the assumptions of \cref{prop:existence_of_morphisms_of_cosetal_extensions} (and empty otherwise).
Here an element of $\mathcal{Z}^1(H,N,E',\phi)$ is sent to the composition of the corresponding automorphism on $\Psi$ and the map $\lambda\colon \Gamma \to \Psi$ as defined in \cref{prop:canonical_map_between_extensions}.
In particular, $\lambda$ corresponds to the the identity of $\mathcal{Z}^1(H,N,E',\phi)$.
\end{theorem}

\begin{remark}
 Composition with an automorphism in the codomain corresponds to translation in the group $\mathcal{Z}^1(H,N,E',\phi)$ by the associated crossed homomorphism.
 A crossed homomorphism from the domain naturally gives one in the codomain and
 composition with an automorphism in the \emph{domain} corresponds to translation by this corresponding crossed homomorphism.
\end{remark}

\section{Parameterisation by actions alone}

In \cite{faul2019characterisation} and \cite{faul2020baer} weakly Schreier and cosetal extensions are characterised in terms of admissible equivalence relations, compatible actions, and in the latter case, cohomology classes. Instead of starting with an admissible equivalence relation and then specifying an action compatible with it,
it is also possible to start by specifying a candidate action and then choosing a compatible equivalence relation. By \cref{prop:existence_of_morphisms_of_cosetal_extensions} we know that different extensions admit morphisms between them only when they have the same action and cohomology class and so it can be helpful to consider all the compatible equivalence relations corresponding to a given candidate action.
To start we will not require $N$ to be an abelian group.

\begin{proposition}
    Let $N$ and $H$ be monoids and let $\alpha\colon H \times N \to N$ be an arbitrary function.
    The equivalence relations compatible with $\alpha$ are closed under inhabited pointwise intersections.
\end{proposition}
\begin{proof}
    All of the conditions for $\alpha$ to be compatible in \cref{def:compatible_action} and conditions (2) and (3) in \cref{def:admissible_indexed_equivalence_relation} are implications from one of the equivalence relations to another and so they are clearly closed under arbitrary pointwise intersections. Furthermore, condition (1) of \cref{def:admissible_indexed_equivalence_relation} is clearly downwards closed and hence closed under inhabited pointwise intersections.
\end{proof}

The equivalence relations compatible with a given map $\alpha\colon H \times N \to N$ are not closed under arbitrary meets in general, since it might happen that no such equivalence relation exists at all. For instance, it is shown in \cite{faul2019characterisation} that when $H$ is a group, only true actions are compatible with any equivalence relation.

\begin{definition}
 We say a function $\alpha\colon H \times N \to N$ is \emph{valid} if it is compatible with some $H$-indexed equivalence relation.
\end{definition}

Validity is, in fact, the \emph{only} obstruction to the compatible equivalence relations forming a complete lattice. To show this, we will prove that when the set is nonempty, it has a largest element.
We start by finding an indexed equivalence relation which contains every indexed equivalence relation compatible with $\alpha$.

\begin{proposition}
    Let $\alpha\colon H \times N \to N$ be compatible with an $H$-indexed equivalence relation $E$.
    Then whenever $n \sim_E^h n'$, we have $\forall x, y\in H.\ \left[ xhy = 1 \implies \alpha(x,n) = \alpha(x,n') \right]$.
\end{proposition}
\begin{proof}
    Suppose that $n \sim_E^h n'$ and consider $x,y \in H$ such that $xhy = 1$.
    Since $n \sim_E^h n'$, we have that $n \sim_E^{hy} n'$. Now applying the second compatibility condition, we obtain $\alpha(x,n) \sim_E^{xhy} \alpha(x,n')$. But $xhy = 1$ and so $\alpha(x,n) = \alpha(x,n')$ as required.
\end{proof}

This suggests the following definition.

\begin{definition}
    Given a function $\alpha\colon H \times N \to N$, we call the associated $H$-indexed equivalence relation $E_\alpha$ defined by
    \[
        n \sim_\alpha^h n' \iff \forall x, y\in H.\ \left[ xhy = 1 \implies \alpha(x,n) = \alpha(x,n')\right]
    \]
    the associated \emph{coarse equivalence relation}.
\end{definition}
Note that this is indeed an $H$-indexed equivalence relation.

\begin{theorem}
    If $\alpha$ is compatible with any $H$-indexed equivalence relation $E$, then it is compatible with the coarse equivalence relation $E_\alpha$.
\end{theorem}
\begin{proof}
    Let us begin by showing that $E_\alpha$ is admissible.
    Suppose $n \sim^1_\alpha n'$ and observe that $x\cdot 1\cdot y = 1$ when $x = 1 = y$. Thus, $\alpha(1,n) = \alpha (1,n')$. Since $\alpha$ is compatible with $E$, we get that $n \sim^1_E n'$ and hence $n = n'$.

    Next we must show that if $n \sim_\alpha^h n'$ then $an \sim_\alpha^h an'$. Now suppose $n \sim_\alpha^h n'$ and $xhy = 1$. We know that $\alpha(x,n) = \alpha(x,n')$. Consider
    \begin{align*}
        \alpha(x,an)    &\sim_E^x \alpha(x,a)\alpha(x,n) \\
                        &\sim_E^x \alpha(x,a)\alpha(x,n') \\
                        &\sim_E^x \alpha(x,an').
    \end{align*}
    It follows that $\alpha(x,an) \sim_E^{xhy} \alpha(x,an')$. But $xhy = 1$ and so we find $\alpha(x,an) = \alpha(x,an')$.

    Finally, we must show that if $n \sim_\alpha^h n'$ then $n \sim^hh' n'$. Suppose $n \sim_\alpha^h n'$ and $xhh'y' = 1$. Then for $y = h'y'$ we have that $xhy = 1$. Thus, by assumption we get that $\alpha(x,n) = \alpha(x,n')$ and hence $E_\alpha$ is admissible.

    Now we show that $\alpha$ is compatible with $E_\alpha$. Notice that because $E \subseteq E_\alpha$ and $\alpha$ is compatible with $E$, we immediately have that conditions (3)--(6) hold. So we need only check conditions (1) and (2).

    To prove condition (1) we must show that if $n \sim_\alpha^h n'$ then $n\alpha(h,a) \sim_\alpha^h n'\alpha(h,a)$ for all $a \in N$. Suppose $xhy = 1$. By assumption we have $\alpha(x,n) = \alpha(x,n')$. We must show that $\alpha(x,n\alpha(h,a)) = \alpha(x, n'\alpha(h,a))$.
    With respect to $E$ we have
    \begin{align*}
        \alpha(x,n\alpha(h,a))  &\sim_E^x \alpha(x,n) \cdot \alpha(x,\alpha(h,a)) \\
                                &\sim_E^x \alpha(x,n') \cdot \alpha(x,\alpha(h,a)) \\
                                &\sim_E^x \alpha(x,n'\alpha(h,a)).
    \end{align*}
    As above, it follows that $\alpha(x,n\alpha(h,a)) = \alpha(x,n'\alpha(h,a))$ since $x(hy)=1$.

    Finally, for condition (2) we must show that if $n \sim_\alpha^h n'$ then $\alpha(b,n) \sim_\alpha^{bh} \alpha(b,n')$ for all $b \in H$. Suppose $n \sim_\alpha^h n'$ and $xbhy = 1$. We must show $\alpha(x,\alpha(b,n)) = \alpha(x,\alpha(b,n'))$. Notice that by assumption $\alpha(xb,n) = \alpha(xb,n')$.
    Now consider
    \begin{align*}
        \alpha(x,\alpha(b,n))   &\sim_E^{xb} \alpha(xb,n) \\
                                &\sim_E^{xb} \alpha(xb,n') \\
                                &\sim_E^{xb} \alpha(x,\alpha(b,n')).
    \end{align*}
    Because $xb(hy) = 1$, we then find $\alpha(x,\alpha(b,n)) = \alpha(x,\alpha(b,n'))$, as required.
\end{proof}

\begin{corollary}\label{prop:compatible_quotients_complete_lattice}
 The equivalence relations compatible with any valid map $\alpha\colon H \times N \to N$ form a complete lattice.
\end{corollary}

The existence of the coarsest compatible equivalence relation was proved in \cite{faul2019characterisation} under the assumption that whenever $xh \in H$ is right invertible, so is $h$. In this case, every valid $\alpha$ has the same coarsest equivalence relation given by $n \sim^h n' \iff \forall y\in H.\ \left[ hy = 1 \implies n = n' \right]$. The following example gives a coarsest compatible equivalence relation, which does not satisfy these conditions.

\begin{example}
 Let $H$ be the bicyclic monoid $B = \langle p, q \mid pq = 1 \rangle$, $N$ the group $\Z^\omega$ of integer sequences under addition and $\alpha$ the true action $\alpha\colon H \times N \to N$ defined by \[\alpha(q, s)_n = \begin{cases} s_{n-1} & n > 0 \\ 0 & n = 0 \end{cases}\] and $\alpha(p, s)_n = s_{n+1}$.

 We can show that $x(q^a p^b)y = 1$ if and only if $x = p^{a+i}$ and $y = q^{b+i}$ for some $i \ge 0$
 and hence the coarse equivalence relation is given by $s \sim_\alpha^{q^a p^b} s' \iff \forall n \ge a.\ s_n = s'_n$.

 The resulting weak semidirect product can be expressed as the set of pairs of the form $(s, q^a p^b)$ where $s\colon \N \cap [a,\infty) \to \Z$ with unit $(0, 1)$ and multiplication given by
 \[
  (s, q^a p^b) \cdot (s', q^{a'} p^{b'}) = (n \mapsto s_n + s'_{n+b-a}, q^{a+a'-\min(b,a')}p^{b+b'-\min(b,a')}).
 \]
 The kernel sends $s$ to $(s,1)$ and the cokernel sends $(s,x)$ to $x$.
\end{example}

By \cref{prop:compatible_quotients_complete_lattice} the equivalence relations compatible with a valid map $\alpha\colon H \times N \to N$ are closed under \emph{joins}. These correspond to meets in the order of the associated quotients. In \cite{faul2019artin} we showed that for Artin glueings of frames this meet operation can be interpreted as a kind of Baer sum.
Of course, there is a different notion of Baer sum for cosetal extensions with abelian kernel, in which case the equivalence relation is fixed beforehand.
We might attempt to gain some insight into the interaction of the equivalence relations and cohomology classes by combining them into a single structure. From here on we again assume $N$ is always an abelian group.

\begin{definition}
 Let $N$ be an abelian group and fix a valid action $\phi\colon H \times N \to N$.
 We define $\widetilde{H}^2_\phi(H,N)$ to be the set of pairs $(E,[g])$ where $E$ is an $H$-indexed equivalence relation compatible with $\alpha$ and $[g] \in \mathcal{H}^2(H, N, E, [\phi])$.

 We define an operation $(E_1, [g_1]) + (E_2, [g_2]) = (E_1 \vee E_2, \ell_1([g_1]) + \ell_2([g_2]))$
 on $\widetilde{H}^2_\phi(H,N)$ where the maps $\ell_{1,2}\colon \mathcal{H}^2(H,N,E_{1,2},[\phi]) \to \mathcal{H}^2(H,N,E_1 \vee E_2,[\phi])$ are defined as in \cref{prop:grouphomo}
 and we define a constant $0 = (\bot, 0) \in \widetilde{H}_\phi(H,N)$ where $\bot$ is the finest equivalence relation compatible with $\phi$.
\end{definition}

\begin{theorem}
 The algebra $\widetilde{\mathcal{H}}^2_\phi(H,N)$ is an inverse monoid where $(E, [-g])$ is the inverse of $(E,[g])$.
\end{theorem}
\begin{proof}
 The axioms are all routine calculations.
\end{proof}

\begin{remark}
The addition of this monoid appears to be related to the notion of Baer sum considered in \cite{stepp1971semigroup, fulp1971structure} in the special case of central extensions (which are precisely the cosetal extensions where the candidate action $\phi$ is trivial).
\end{remark}

This inverse monoid allows us to understand the relationship between all cosetal extensions of $H$ by $N$ with a given fixed valid action $\phi$. Of course, the choice of $\phi$ for a given extension is not unique, since it is only defined up to a quotient and so, unlike the cohomology groups $\mathcal{H}^2(H, N, E, [\phi])$, the objects $\widetilde{\mathcal{H}}^2_\phi(H,N)$ no longer partition the extensions,
though if the sum of two elements is taken in different monoids, the results will be compatible.

Furthermore, suppose we are given extensions with compatible pairs satisfying $(E_1, \phi_1), (E_2, \phi_2) \le (E_3, \phi_3)$, but where $\phi_1$ and $\phi_2$ are distinct with respect to $E_1$ and $E_2$.
In this case, we could analyse the relationship between the first and third extensions in $\widetilde{\mathcal{H}}^2_{\phi_1}(H,N)$ and between the second and the third in $\widetilde{\mathcal{H}}^2_{\phi_2}(H,N)$,
but there is no inverse monoid that would allow us to analyse all three.

One way to address this problem is to define the following \emph{category}.
\begin{definition}
 We define a category $\widetilde{\mathcal{H}}^2(H, N)$ whose objects are given by valid actions of $H$ on $N$ and where the morphisms from $\phi$ to $\phi'$ are given by pairs of the form $(E, [g])$ where $E$ is an $H$-indexed equivalence relation compatible with $\phi$ and $\phi'$ and with respect to which $\phi$ and $\phi'$ are equivalent and $[g] \in \mathcal{H}^2(H, N, E, [\phi])$. Composition is given by multiplication in $\widetilde{\mathcal{H}}^2_\phi(H, N)$.
\end{definition}

The inverse monoids $\widetilde{\mathcal{H}}^2_\phi(H,N)$ are then simply the endomorphism monoids in this category, but it also allows us to move from one of these inverse monoids to another as necessary. The category $\widetilde{\mathcal{H}}^2(H, N)$ is an example of what is known as an \emph{inverse category}.

\begin{definition}
 An inverse category is a category for which every morphism $f\colon X \to Y$ has a unique `inverse' $g\colon Y \to X$ such that $fgf = f$ and $gfg = g$.
\end{definition}

Any inverse category can be encoded as a certain kind of ordered groupoid (see \cite{deWolf2017}).
Applying this construction in our case, we obtain a category whose objects are compatible pairs $(E, \phi)$ and where the homset $\Hom((E, \phi), (E', \phi'))$ is given by $\mathcal{H}^2(H, N, E, [\phi])$ when $E = E'$ and $\phi \sim_E \phi'$ and is empty otherwise. Composition is given by multiplication in the obvious way. The order on objects is defined by $(E_1, \phi_1) \preceq (E_2, \phi_2)$ if and only if $E_1 \supseteq E_2$ and $\phi_1 = \phi_2$ and the order on morphisms is defined by $[g_1] \preceq [g_2]$ for $[g_{1,2}]\colon (E_{1,2}, \phi_{1,2}) \to (E_{1,2}, \phi'_{1,2})$
if and only if $E_1 \supseteq E_2$, $\phi_1 = \phi_2$, $\phi'_1 = \phi'_2$ and $[g_1] = \ell([g_2])$.

This order is somewhat too strict, since it distinguishes between compatible pairs with equivalent actions. This motivates the following definition.

\begin{definition}
 The ordered groupoid $\widehat{\mathcal{H}}^2(H, N)$ has compatible pairs $(E, [\phi])$ as objects with the reverse of the usual order. Similarly to the groupoid above, the morphisms from $(E,[\phi])$ to $(E',[\phi'])$ exist when $E = E'$ and $\phi$ is equivalent to $\phi'$ and are given by elements of $\mathcal{H}^2(H, N, E, [\phi])$. Composition is given in the obvious way and the morphisms can be ordered in an analogous way to above.
\end{definition}

Alternatively, we can apply the Grothendieck construction (see \cite[B.1.3.1]{elephant1} for details) to the functor $L_{H,N}\colon \WAct(H,N) \to \Ab$ from \cref{sec:the_functor_L} (composed with the inclusion $\Ab \hookrightarrow \Cat$) to obtain a category ${\int} L_{H,N}$ consisting of compatible pairs $(E, [\phi])$ as objects and with morphisms from $(E_1,[\phi])$ to $(E_2,[\phi])$ given by elements of $\mathcal{H}^2(H, N, E_2, [\phi])$ for $E_1 \subseteq E_2$.
The underlying groupoid of $\widehat{\mathcal{H}}^2(H, N)$ is then simply the \emph{core} (i.e.\ the groupoid of invertible morphisms) of ${\int} L_{H,N}$ equipped with the order induced by the reverse of the order on $\WAct(H,N)$.

The functoriality of these cohomology groups, inverse monoids and categories with respect to $H$ and $N$ will be explored in a later paper.

\bibliographystyle{abbrv}
\bibliography{bibliography}

\end{document}

config: arxiv


TITLE: How to prove this identity on exponential generating function of harmonic numbers
QUESTION [3 upvotes]: I came across the following problem, let $N![z^N]A(z)$ denote the coefficient of an exponential generating function (EGF) $A(z)$. The EGF is similar to an ordinary generating function (OGF) $A'(z)$ except that instead of the series $A'(z)=\sum_0^Na_Nz^N$ for an OGF, we have $A(z)=a_Nz^N/N!$ for an EGF $A(z)$.
For instance, for EGF $A(z)=e^z$, we have $N![z^N]A(z)=N![z^N]e^z=1$, i.e. the EGF coefficients of $e^z$ are $1$ for all $N \in \mathbb{N}$, i.e. the coefficients of the set $ \{z^0/0!,z^1/1!,z^2/2!,...,z^N/N! \}$ are all $1$ for any $N$ given $e^z$. Similarly, for EGF $A(z)=1/(1-z)$, we have $N!z[^N](1/(1-z))=N!$.
Now, given the following EGF $A(z)$:
$$
A(z)=e^z\int^z_0\frac{1-e^{-t}}{t}dt
$$
We are supposed to get $N![z^N]A(z)=H_N$, where $H_N$ is the $N$th harmonic number, i.e.
$$
N![z^N]e^z\int^z_0\frac{1-e^{-t}}{t}dt = H_N
$$
I could not think of a way to prove the above statement. The problem gave a hint that proving this statement involves forming a differential equation for the EGF $H(z)=\sum_{N \geq 0}H_Nz^N/N!$...
Any help?

REPLY [1 votes]: Here is a proof involving forming a differential equation.

Let $H_n$ be the $n^\text{th}$ harmonic number. In particular, $H_0=0$ and $H_n=\frac1n+H_{n-1}$ for $n\geq 1$.
Define the series $B(t)=\sum_{n\geq 0} H_{n+1}\frac{t^n}{n!}$.
Let $A(z) = \int_0^z B(t)dt$.
One observation is that:
$$A(t)=\sum_{n\geq 0} H_n\frac{t^n}{n!}\label{1} \tag{1}.$$
With that in mind:
\begin{align*}
  B(t)
  &= \sum_{n\geq 0} H_{n+1}\frac{t^n}{n!} \\
  &= \sum_{n\geq 0}\left(\frac1{n+1} + H_n\right)\frac{t^n}{n!} \\
  &= t^{-1}\sum_{n\geq 1}\frac{t^n}{n!} + \sum_{n\geq 0}H_n\frac{t^n}{n!} \\
  &= t^{-1}(e^t-1) + \int_0^t B(s)ds. \\
\end{align*}
In other words, $A'(t)-A(t) = t^{-1}(e^t-1)$. This is a $1^\text{st}$ order linear ODE.
By multiplying both sides by the integrating factor $e^{-t}$, we get:
\begin{align*}
[e^{-t}A(t)]' = t^{-1}(1-e^{-t}).
\end{align*}
Integrate both sides from $t=0$ to $t=z$ and rearrange to find:
$$A(z)=e^z\int_0^z \frac{1-e^{-t}}{t}dt.$$
Using (\ref{1}), we can see that $n![z^n]A(z)=H_n$.


TITLE: Categorial definition of subsets
QUESTION [11 upvotes]: I cannot see why this definition http://en.wikipedia.org/wiki/Subobject
is equivalent to subsets in the category of sets. I am confused by the following facts,
1) the partial order is defined between morphism, and not objects (which are the sets in the category of sets), but the subset relation must hold between sets (i.e. objects)
2) why are there three objects involved, when for a subsetrelation just two sets are involved?
How does this defintion makes sense for example for $\{ 1 \} \subset \{ 1,2,3 \}$?

REPLY [2 votes]: 1) the partial order is defined between morphisms, and not objects
  (which are the sets in the category of sets), but the subset relation
  must hold between sets (i.e. objects)

There is an unfortunate notational confusion here, which experienced category theorists untangle mentally, but it helps to spell out explicitly for beginners.
When we write $u : S \to A$, we mean that there is a morphism $\langle S, A, u \rangle$ in the collection $\textbf{Mor}_C$ of the category.  In other words, the morphisms carry with them their own source and target objects (the $S$ and the $A$ in this case).  So, as you can see, when we are defining a partial order on morphisms, the source objects $S$ are also involved.  (Using triples $\langle S, A, u\rangle$ is one way of formalizing what morphisms are.  There are also other ways, but they will get more complicated in this context.)
Since the partial order is being defined only between morphisms that lead into $A$, we can mentally erase the $A$ in the data, and regard the morphisms as just being pairs $\langle S, u\rangle$.  So, we are saying $S$ is an object that "looks like" a subset of $A$, and $u$ is the way to interpret its elements as the elements of $A$.
So, $\langle S, u\rangle \leq \langle T, v\rangle$ means that $S$ and $T$ "look like" subsets of $A$, we have ways of interpreting their elements as those of $A$ and, further, there is also a monomorphism $w : S \to T$ which allows us to interpret the elements of $S$ as the elements of $T$ in a way that is consistent with $u$ and $v$.
Moreover, $\langle S, u\rangle \equiv \langle T, v\rangle$ means that $S$ and $T$ are isomorphic in a way that is consistent with the chosen interpretations $u$ and $v$.

2) why are there three objects involved, when for a subsetrelation
  just two sets are involved?

You want to think of the objects in a category as types rather than as sets.  You can only talk about the equality of two elements within the same type.  So, the normal set-theoretic locution $S \subseteq T \iff (\forall x.\, x \in S \to x \in T)$ is incoherent from a types point of view.  It involves taking an element of type $S$ (viz., $x$) and talking about its equality with the elements of type $T$.  A type-correct way of saying $S \subseteq T$ is
$$\forall x : S.\, \exists y : T.\, u(x) =_A v(y)$$
In other words, to talk about $S$ being a subset of $T$, we need a larger set $A$, of which both $S$ and $T$ are part (intuitively), and we have ways of interpreting the elements of $S$ and $T$ as elements of $A$ (provided by the monomprhisms $u$ and $v$.)  This is precisely what is meant by $\langle S, u\rangle \leq \langle T, v\rangle$.


TITLE: Proving number of digits d to represent integer n in base B?
QUESTION [7 upvotes]: I am interested in learning about proofs for discrete mathematics. One recurring fact I find in the literature is that

the number of digits $d$ required to represent integer $N$ in base $B$ is  $\log_B{n}$

I am unhappy with this on two fronts. The first is that no source I have come across actually proves this claim. The second, I do not think the claim is true, and I am trying to prove this in a few ways but am finding slightly different results.
If we have a $d$ digit string in base $B$, this is an element of the set $\{0,1,\dots,B-1\}^{d}$ which has $B^d$ elements. This means we can represent exactly $0,1,\dots,B^{d}-1$ using $d$ digits; solving for $N$ gives $d=\lceil \log_B{(N+1)}\rceil$.
An alternative way to see this is that the largest integer we can represent is $\sum_{i=0}^{d-1}(B-1)*B^i$, which is also $B^d-1$ and gives the same result.
Why then, do sources describe this as $\log_B(n)$? An alternative representation that is equally confusing is $\lfloor\log_BN\rfloor+1$; this requires a proof that $$\lfloor\log_BN\rfloor+1 = \lceil \log_B{(N+1)}\rceil$$
which I cannot seem to resolve; unless I am on the wrong track entirely.

REPLY [2 votes]: This is what I use for this calculation, supposing a to be in it's base 10 representation, and we wish to determine the digits of it's base b representation, we can compute this as follows:
Start with the Kronecker delta:
$$\delta \left( x,y \right) =\cases{1&$x=y$\cr 0&$x\neq y$\cr}\quad\qquad\quad\qquad\quad\qquad\quad\qquad\quad\qquad\quad\qquad\quad\qquad\quad\quad\quad\quad\quad\quad\quad\text{                             (1)}$$
The computation of the digits of a number 'a' in base 'b' can be done in a computable integer sequence, in that we already know the exact length of the sequence which is of course the number of digits in total. The expression for this computation is:
$$d_{{n}} \left( a,b \right) =\sum _{k=1}^{ \Bigl\lfloor
 {\frac {
\ln  \left( a \right) }{\ln  \left( b \right) }}\Bigr\rfloor +1} \left(
\delta \left( n,k \right) -b\delta \left( n,k+1 \right)  \right)
 \Bigl\lfloor{a{b}^{k-  {\Bigl\lfloor\frac {\ln  \left( a\right)
  }{\ln  \left( b \right) }\Bigr\rfloor}  -1}} \Bigr\rfloor
\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad$$
For example,
$a=12345$
in base $b=10:$ will, evaluate to the arithmetic progression with initial value of 1 and d=1 of length 5:
$$\left\{ d_{{1}} \left( 12345,10 \right) ,d_{{2}} \left( 12345,10
 \right) ,d_{{3}} \left( 12345,10 \right) ,d_{{4}} \left( 12345,10
 \right) ,d_{{5}} \left( 12345,10 \right)  \right\} = \left\{ 1,2,3,4,
5 \right\}
$$
As far as proof that the number of digits that are needed to represent a number in another base, say b=2, the value $\Bigl\lfloor\frac {\ln  \left( n\right)
  }{\ln  \left( b \right) }\Bigr\rfloor+1$ is the same thing as the floor of $\log_B(n) +1$.So whatever resource simply stated $\log_B(n)$ is wrong. But I am unclear as to what you mean by the statement "Solving for N gives $d=\operatorname{ceil}(\log_B(N+1))$". If you can demonstrate this part, then I think that effectively serves as proof for what you are asking.


TITLE: Second Fundamental Form of Torus
QUESTION [0 upvotes]: I want to prove that the mean curvature vector of the flat Torus $T^n=S^1\times S^1\times ...\times S^1\subset\mathbb{R}^{2n}$ is zero. But my calculations show me to the contrary that the mean curvature doesn't vanishes.
Regards

REPLY [3 votes]: The usual embedding $x(s,t)=(\cos s, \sin s,\cos t,\sin t)$ does induce a flat metric. However, this does not mean that the second fundamental form vanishes. For example, the cylinder $x(s,t)=(\cos s,\sin s,t)$ in $\mathbb R^3$ is flat (i.e., has Gaussian curvature $0$) but does not have vanishing second fundamental form. Vanishing second fundamental form would mean a totally geodesic submanifold. You're asking for less ... that the mean curvature (vector) vanish. But, no, the flat torus in $\mathbb R^{2n}$ does not have zero mean curvature vector, as it is not a minimal submanifold. Now there are minimal embeddings of, for example, the torus $T^2$ in $S^3$, as opposed to $\mathbb R^4$.


TITLE: Most significant bit of integer multiplication and binary decision diagrams
QUESTION [15 upvotes]: Let $x$ and $y$ two binary numbers with $n$ bits and $z = x \cdot y\ $ the binary number (length $2n$) of the product of $x$ and $y$. We want to compute the most siginifcant bit $z_{2n-1}$ of the product $z = z_{2n-1} \ldots z_0$.
In order to analyse the complexity of this function in the model of binary decision diagrams (in particular read-once branching programs) I try to look for some equivalent expressions for the case $z_{2n-1} = 1$. The first obvious thing is $z_{2n-1} = 1 \Leftrightarrow x \cdot y \geq 2^{2n-1}$ (here $x$ and $y$ are the corresponding integers to the binary numbers). I want to get an intuition what happens if I set some input bits constant. E.g. if I set the most significant input bit from $x$ and $y$ to 0 I get the constant 0 function. But bits with lower significance haven't such an influence on the result.
Are there any other equivalent expressions for the case $z_{2n-1} = 1$ which help more to see what happens if I fix some input bits? Are there any refined methods to compute the product of two binary numbers which can help? Or do you have some other approach to this problem?

REPLY [5 votes]: An interesting source is D. E. Knuth: The Art of Computer Programming, Volume 4, Fascicle 1, Bitwise Tricks & Techniques; Binary Decision Diagrams, Addison-Wesley, Pearson Education 2009
On page 96, there is a BDD for all bits of z = x⋅y, where x and y have 3 bits. It shows, that in the case of 3 bits, BDD representing the most significant bit has 7 non-terminal nodes. See the image bellow, I have redraw it using your indices x = (x2,x1,x0) and y = (y2,y1,y0).
On page 140 in Knuth's book, there is a question (no. 183) about BDD representing the most significant bit for multiplication of two numbers with infinitely many bits (it is called "limiting leading bit function") - this is similar to what you are loking for! The answer on page 223 gives first levels of the resulting BDD and discusses the number of nodes on all levels, but unfortunatelly it does not give algorithm to construct such a BDD.

Fig. 1: The most significant bit for multiplication of (x2,x1,x0) * (y2,y1,y0)


TITLE: Interesting facts about the numbers 1 - 31
QUESTION [1 upvotes]: I'm a maths teacher and want to create a calendar for my classroom.
I'm looking to compile some interesting facts about each of the numbers 1 through to 31.
The hard part is they must be at a level where 11-18 year-olds can understand them.
Along the lines of: 2 is the smallest prime number, only even prime number.
$ $
Any help would be greatly appreciated.

REPLY [4 votes]: Very interesting idea- I like it. How about these:
$1$ is the only number with one factor, or the only number which is the factorial of two numbers ($0!=1!=1)$
$2$ is the only even prime
$3$ is the best integer approximation of $\pi$ and $e$.
Every even square is a multiple of $4$.
$5$ is the only odd number for which every number ending in it is composite.
$6$ is the smallest perfect number
$7$ is the smallest number that cannot be represented as the sum of three integer squares (e.g. $6=2^2+1^2+1^2$). Or $\frac n7$ always features the same digits in the same order with the start varying.
$8$ is the only Fibonacci Number besides $1$ that is a perfect cube.
$9$ is roughly $2\pi+e$
$10$ is the sum of the first three primes, the first four factorials, and the first four positive integers.
The powers of $11$ can be found by Pascal's Triangle.
$12$ is the smallest sublime number, of which there are only two known.
$13$ is the smallest emirp.
$14$ is the smallest satisfier of the Shapiro Inequality.
$15$ is $1|5$ and $1+2+3+4+5$
$16$ is the smallest perfect fourth power besides $0$ and $1$
$17\approx12\sqrt2$ and so we can use it to approximate $\sqrt2$
$18$ is the first non-square number expressible as $p\cdot q^2$, with $p,q$ integers and $q>p$
Any natural number can be made by summing $19$ $4$th powers.
The product of the divisors $(1,2,4,5,10)$ with the proper divisors $(2,4,5,10)$ of $20$ is $20$.
$21$ is a triangular number.
$22\approx7\pi$, thus $\pi\approx\frac{22}{7}$ is used where a fractional approximation is needed.
$23$ is the smallest number irrepresentable as the sum of nine or fewer positive cubes.
$a=24$ is the largest  and only non-trivial solution to $1^2+2^2+...+a^2=b^2$
If the last two digits of a number are a multiple of $25$, the number is a multiple of $25$.
$26$ is the only number of both the form $a^2+1$ and the form $a^3-1$.
$27$ is the only integer that is three times the sum of its digits. Or the first significant input of the Collatz Conjecture.
$28$ is the only known number which is the sum of the first $a$ primes, the first $b$ non-negative integers, and the sum of the first $c$ non-primes. (Here, $a=7, b=5, c=5$)
$29$ cannot be made using addition, subtraction, multiplication and division with $1,2,3,4$, suing each only once.
$30=(2220422932)^3+(-2218888517)^3+(-283059965)^3$, and was the first number that was significantly challenging to represent as the sum of three cubes.
$31,331,3331,33331,333331,3333331,33333331$ are all prime.


TITLE: Prove that $(4^p+1)/5$ is a composite integer for $p$ a prime greater than 5.
QUESTION [1 upvotes]: So far I have found that $(4^p+1)/5=\sum_{n=0}^{p-1} (-1)^n4^n$, not sure where to go from here. Was thinking about trying to find some base for which $(4^p+1)/5$ is not a pseudoprime but have had no luck.

REPLY [5 votes]: Set $x=\frac{1}{2}(p-1)\ge 2$, then
$$
1+4^p=(1+4\cdot 2^{4x}+2^{2x+2})-2^{2x+2}=(1+2^{2x+1}+2^{x+1})(1+2^{2x+1}-2^{x+1}).
$$


TITLE: A Way to make the following "proof" of the Hairy Ball Theorem rigorous?
QUESTION [23 upvotes]: I plan on giving a talk soon to undergraduates and I'd like to talk about the hairy ball theorem during the talk. I was trying to think of some sort of visually intuitive proof of this fact. (I already know several homotopical proofs), and this is roughly what I came up with:

Suppose you have a vector field on a sphere. It's seems reasonable that if it is nonvanishing, all of the integral curves will be circles. (I think that's true? I know either an integral curve is periodic, a point, or a line... and we're assuming it's not a point, and I just feel like you couldn't fit a line in there for some silly reason.)
If this is true then there is probably an integral curve with the smallest 'diameter,': a circle divides the sphere into two pieces (not easy to prove, but visually an audience could be convinced), and the 'diameter' is defined to be the smaller of the two different obvious ways one could define the diameter.
This curve can't be a point, so it has nonempty 'interior' (again using the Jordan curve theorem, and we pick the 'smaller' interior).
Pick a point in the interior and follow it's integral curve.
This integral curve has to be contained inside the 'smallest'.
Contradiction, since clearly the diameter of this one is less.

Obviously there are lots of things that are not at all obvious. But I would be happy if this argument COULD be made rigorous, even with lots of technical details, because then I wouldn't feel bad giving it without the details since it's very visual.

REPLY [1 votes]: To me 1. looks not intuitive at all. Why should all integral curves be periodic? I think it is really hard to prove this using some kind of real theorem. To have even one periodic orbit you have to put in some effort.
Of cause for logical reasons 1. is obviously true, since Hairy Ball theorem is true. But even one periodic orbit would prove Hairy ball theorem, so I don't see how you could proof that all orbits are periodic without exploiting that you have at least one.
I suggest an other approach:

There exists at least one periodic orbit. This is intuitive, you can assume the vector field to be smooth and normalized, then by compactness the curvature of the curve has a lower bound. Assume you have an orbit which is not periodic, then it is quite intuitive that the $\omega$-limit is a period orbit, since the orbit is not self intersecting and the curvature has a lower bound.
If you have a periodic orbit, then there is a fixed point. The intuitive case the equator is an integral curve and then try to push it down to south pole. So at some point all vectors have to point into the same direction. So you need to have a discontinuity or a zero.

Why is this true?

Since the vector field is non vanishing you have no fixed points, using compactness of the sphere you can apply Poincaré–Bendixson theorem which tells you that the $\omega$-limit of every orbit must be periodic.
Every closed trajectory contains within its interior a stationary point of the system.

A stupid thing you could do now is to assume you have a non vanishing vector field with a non periodic orbit, then use what I said before, you get a contradiction and can conclude all orbits are periodic.
Using this you could prove 2.: By Jordan Curve theorem you can recursively define curves. Start with $c_{i-1}$ then, this curve divides $\Bbb S^2$ into two areas pick a point $x_n$ in the area which has trivial intersection with $c_{i-2}$. The points $x_i$ determine the integral curves $c_i$. Further you can choose the $x_i$ carefully such that $\text{diam}(c_i)$ approaches a minimal diameter. The sequence $x_i$ has a limit point $x$ which defines an integral curve $c$ with minimal diameter.
To sum it up. My feeling is there is no reasonable way to prove 1. using a constructive method. Also it would be kind of strange to prove something like this since a single period orbit would imply a fixed point. But since Hairy Ball theorem is true you can prove it by contradiction, which to me is kind of odd since you don't get anything from this.
I think using Poincaré-Bendixson is a bit of cracking a nut with a sledgehammer, but kind of intuitive. Recently I posted a more elementary proof which has a similar idea behind it. I also sketched there what I want to do here.


TITLE: Solving $y^{(2)}-5y^{(1)}+4y=\frac{1}{e^x+1}.$
QUESTION [3 upvotes]: The equation is the following
$$ y^{(2)} - 5y^{(1)} + 4y =  \frac{1}{e^x + 1} $$
I’ve just started studying these kind of equations and I know of only two method to solve it, they both involve the following first step:
Find 2 independent solutions of the associated homogeneous equation. I have done it through the characteristic polynomial and obtained the following 2 solutions:
$$ y_1(x) = e^x \quad y_2(x)= e^{4x} $$
Now, 2 different possibilities I’m aware of are:
A) If the $f(x)$ on the right is of the kind $e^{kx}P_m(x)$, with $P_m$ polynomial of degree m, or of the kind $e^{kx}(P_m(x)\sin(\omega x)+R_k(x)\cos(\omega x))$, then we know that the equation admits certain solutions similar in form to the $f(x)$, that we need to specify finding the constants of the polynomials.
The $f(x)$ in this case doesn’t belong to either of the types, still I tried this method imposing $e^z = \frac{1}{e^x+1}$ but I couldn’t make it work.
B)The variation of parameters method. I solved the system to find $\gamma_1^{(1)}(x)$ and $\gamma_2^{(1)}(x)$ obtaining
$$ \gamma_1^{(1)}(x) = -\frac{1}{3(e^x+1)}$$
$$ \gamma_2^{(1)}(x) = \frac{1}{3e^{3x}(e^x+1)}$$
Still, I wasn’t able to integrate the second function. I searched online for a solution and it came out very complicated which tells me that this isn’t the way is was intended to be solved (cause it was part of an exam and it shouldn’t take more than half an hour).
Can you show me how it’s done? Thanks

REPLY [1 votes]: Both functions can be converted to rational integrands, and then handled by partial fractions, by substituting $u=e^x$.
We then have
$dx=du/u$
$\int\dfrac{dx}{e^x+1}=\int\dfrac{du}{u(u+1)}=\int\left(\dfrac{1}{u}-\dfrac{1}{u+1}\right)du$
$\int\dfrac{dx}{e^{3x}(e^x+1)}=\int\dfrac{du}{u^4(u+1)}=\int\left(\dfrac{1}{u^4}-\dfrac{1}{u^3}+\dfrac{1}{u^2}-\dfrac{1}{u}+\dfrac{1}{u+1}\right)du$
After which, integration is easy.


text:
\section{Proof of Theorem \ref{prop:oracle_bound}}\label{app:proofMC1}

Start by noting that
\[
	\hat \alpha_{n,f}^{\mathrm{or}} - P(f)  = P_n  (\eps_{n,f}) .
\]
As shown in Step~1 in Section~\ref{supp:prop:cover},  the residual class $\Ec_n$ is VC of parameters $\left( 2v  , A_n\right)$ with respect to the envelope $M_n$ with $A_n = 8 A \ninf{F} \ninf{q_n} ^{1/2} / {M_n} $.
Hence we can apply Proposition~\ref{prop:general term_Pn f} with $w_n = (2v) \vee 1$, $B_n = 8 \left(A\vee (3/4) \sqrt {\rme} \right) \ninf{F} \ninf{q_n} ^{1/2} / {M_n} \ge A_n$, $ \tau_n = \sigma_n $ and $ U_n = M_n \vee  (2\sigma_n) $. Condition~(i) of Proposition~\ref{prop:general term_Pn f} is easily met. Because $M_n \leq 2 \ninf {F}  \ninf{q_n}^{1/2}$ we have
\begin{equation*}
B_n  \geq 4 \left(A\vee \left((3/4) \sqrt {\rme}\right) \right)  \geq 3\sqrt {\rme}  .
\end{equation*}
Therefore Condition~(ii) of Proposition~\ref{prop:general term_Pn f} is also met. Since $w_n$ is constant, we obtain

	\begin{equation*}
		\supf  \left| P_n  (\eps_{n,f})  \right|
		= \Op\left(\sigma_n  \sqrt{ n^{-1} \log(\theta_n )} + U_n n^{-1} \log(\theta_n) \right), \qquad n\to\infty,
	\end{equation*}
	with $\theta_n = B_n \left(M_n \vee  \left(2\sigma_n\right) \right)  / \sigma_n  $. Note that $ \liminf_{n\to \infty } \theta_n >0$ and, since $M_n \vee (2\sigma_n) \le 2M_n$,
	\[
	\theta_n = \left( 8 \left(A\vee \left((3/4) \sqrt {\rme}\right) \right) \ninf{F} \ninf{q_n} ^{1/2}  \right)  \left(M_n \vee (2\sigma_n)\right) / \left(\sigma_n M_n\right)
	\leq A' \ninf{q_n} ^{1/2}  / \sigma_n,
	\]
	with  $A' =  16 \left( A\vee \left((3/4) \sqrt {\rme}\right) \right) \ninf{F}   $. From Condition~\ref{cond:qn}, it holds that $\log(\ninf{q_n} ) = \Oh(\log(n) ) $.
Using the fact that $ M_n^2  = \Oh ( \sigma_n^2  n / \log(n )  ) $, which is also $ \Oh ( \sigma_n^2 n ) $, and since by assumption $  M_n^{-1}  = \Oh ( n^{\alpha} )  $, we get $ \sigma_n^{-2}  = \Oh( n^{ 1 + 2 \alpha}) $ as $n \to \infty$. Consequently, $\log(\theta_n ) = \Oh ( \log(n))$ and we find that
	\[
	\supf  \left| P_n  (\eps_{n,f})  \right|
		= \Op\left(\sigma_n \sqrt{  n^{-1} \log( n )} + M_n n^{-1} \log(n) \right), \qquad n\to\infty.
	\]
Moreover, using again that $M_n ^2= \Oh ( \sigma_n ^2 n / \log (n )   )$ as $n \to \infty$, we find the stated rate.

\qed

\section{Proof of Theorem \ref{th:unif_cv}}\label{app:proofMC2}

Let $H_n = P(h_nh_n^\T)\in \reals^{(d_n+1)\times (d_n+1)} $ and $G_n = P(g_ng_n^\T)\in \reals^{d_n\times d_n}$. By assumption, both matrices are invertible. Using Equation~(22) in \cite{leluc2019control}, we obtain
\begin{equation*}
\left|\hat \alpha_{n,f}  - P(f) \right|
\leq \left| P_n  (\eps_{n,f})  \right|  +   \left| G_n^{1/2} \left(\hat \beta_{n,f} - \beta_{n,f}\right) \right|_2 \left| G_n^{-1/2} P_n( g_n ) \right|_2.
\end{equation*}
Since $h_n = (1, g_n^\T)^\T$, we have
\begin{equation*}
 \left|  H_n^{1/2} \begin{pmatrix}  \hat \alpha_{n,f} - \alpha_{n,f} \\ \hat \beta_{n,f} - \beta_{n,f} \end{pmatrix}   \right|_2 ^2
 = \left( \hat \alpha_{n,f} - \alpha_{n,f} \right)^2 + \left| G_n^{1/2}  \left(\hat \beta_{n,f} - \beta_{n,f} \right)    \right|_2 ^2  ,
\end{equation*}
which, combined with the identity~\eqref{eq:Lfdecomp}, gives
\begin{align*}
 \left| G_n^{1/2}  \left(\hat \beta_{n,f} - \beta_{n,f} \right)    \right|_2 ^2
 &\leq \left|  H_n^{1/2} \begin{pmatrix}  \hat \alpha_{n,f} - \alpha_{n,f} \\ \hat \beta_{n,f} - \beta_{n,f} \end{pmatrix}   \right|_2 ^2 \\
 &= L_f (\hat \alpha_{n,f} , \hat \beta_{n,f}) - L_f(  \alpha_{n,f},\beta_{n,f})
\end{align*}
with $ L_f(  \alpha , \beta )  = P [ ( f -  \alpha  -   \beta^{\T}h_n  )^2] $; note the slight change in notation of the excess risk due to the presence of an intercept. Consequently, we have shown that
\begin{equation*}
	\left| \hat \alpha _ {n,f} - P(f) \right|
	\leq \left| P_n  (\eps _{n,f})\right| +  \sqrt { L_f(\hat \alpha_{n,f} , \hat \beta_{n,f}) - L_f(  \alpha_{n,f},\beta_{n,f})   }  \left| G_n^{-1/2} P_n( g_n )  \right|_2,
\end{equation*}
and the rest of the proof consists in bounding the three terms on the right-hand side uniformly in $f \in \Fc$. First, using Corollary~\ref{cor:simple-rate} and the fact that $\gamma_n^2  \leq \sigma_n^2 \ninf {q_n} $, we get the uniform bound
	\begin{equation*}
	\sup_{f \in \Fc} \{ L_f(\hat \alpha_{n,f}, \hat{\beta}_{n,f}) - L_f(\alpha_{n,f}, \beta_{n,f}) \}
		= \Oh_{\pr}\left(   \sigma_n^2 \ninf {q_n}  \frac{ \log n}{n}  \right), \qquad n \to \infty.
	\end{equation*}
Second, using $\expec (| G_n^{-1/2} g_n|_2^2) = \operatorname{tr} ( G_n^{-1} G_n ) =  d_n$, we obtain
$\expec( | G_n^{-1/2} P_n( g_n )  |_2^2 ) = \Oh  (  { d_n/n}) $ and it follows by Markov's inequality that
\[
	\left| G_n^{-1/2} P_n(g_n)  \right|_2 = \Op  \left(  \sqrt  { d_n/n} \right), \qquad n \to \infty .
\]
Third, because $L_n^2 = \Oh (\gamma_n ^2 \sqrt{ n / \log (n ) }) $ implies $ M_n^2  = \Oh ( \sigma_n^2 \sqrt {n / \log(n ) } ) $, which is also  $\Oh ( \sigma_n^2  n / \log(n )  )$, we can apply Theorem~\ref{prop:oracle_bound} to get
\[
	\supf  \left| P_n  (\eps_{n,f})  \right|
		= \Op\left(\sigma_n \sqrt{  n^{-1} \log( n )} \right), \qquad n\to\infty.
\]
\qed


TITLE: Probably a simple uniform convergence question
QUESTION [0 upvotes]: I'm to show that the series $\sum_{n=0}^{\infty} \frac{cos(nx)}{n^2+1}$ converges uniformly on $\mathbb{R}$.
Does it suffice to say that since $| cos(nx)| \leq 1$ for all n $\in \mathbb{N}$ and all $x \in \mathbb{R}$
$\sum_{n=0}^{\infty} \frac{cos(nx)}{n^2+1} \leq \sum_{n=0}^{\infty} \frac{1}{n^2+1}$
the series $\sum_{n=0}^{\infty} \frac{1}{n^2+1}$ converges and so by Weierstrass' M-test
the series $\sum_{n=0}^{\infty} \frac{cos(nx)}{n^2+1}$ converges as well ?

REPLY [1 votes]: Yes: since you have, for all $x \in \mathbb{R}$ and $n \in \mathbb{N}$:
$$\left| \frac{\cos(nx)}{n^2+1} \right| \le \frac{1}{n^2+1}$$
and since $\sum_{n=1}^{\infty} \frac{1}{n^2+1}$ converges, you have uniform convergence by the Weierstrass M-test.


TITLE: Given 2 independent and binomially distributed random variables find $P[X_1 < X_2 ]$
QUESTION [0 upvotes]: Im studying for the Probability exam and there was this exercise i stumbeled upon that i needed some help with!
I found it in the solved exercise section which was solved by my professor.
The exercise goes like this:
Let$X_1$ and $X_2$ be 2 independent and Binomially distributed random variables with different parameters: $X_1\sim Bin(1,1/2)$ and $X_2\sim Bin(2,1/2)$
We have to find $P[X_1 < X_2]$
The professor immediately does this:
$P[X_1 < X_2]$=$P[X_1=0]⋅P[X_2 >0] + P[X_1=1]⋅P[X_2 >1]$
=$\frac 12 ⋅ \frac34+\frac 12⋅\frac14$
The first part i understand why he did what he did but i dont understand the 2nd part. How did he get the values there . Can you help me?
Edit: Im more interested in knowing HOW he did get the values

REPLY [2 votes]: If $Y \sim \text{Bin}(n, p)$, then $P(Y=k) = \binom{n}{k} p^k (1-p)^{n-k}$ for $0 \le k \le n$.

This allows you to compute $P(X_1=0)$ and $P(X_1=1)$ directly.
For the other terms, note that $P(X_2 > 0) = P(X_2=1) + P(X_2=2)$ and $P(X_2 > 1) = P(X_2=2)$.


TITLE: Reference for inequality for $\sum\limits_{d \mid n}\frac{\log d}{d}.$
QUESTION [4 upvotes]: Let $f(n)=\sum\limits_{d \mid n}\frac{\log d}{d}.$
It is not hard to see that $f(n)\ll(\log\log n)^2$.  Is there any reference for this inequality?
EDT 1: A possible answer is Analysis of the subtractive algorithm for greatest common divisors by Knuth D. E., Yao A. C. (Proc. Nat. Acad. Sci. USA
Vol. 72, No. 12, pp. 4720-4722).
EDT 2: Earlier this bound was proved by Ingham in Some Asymptotic Formulae in the Theory of Numbers (Journal of the London Mathematical Society,
V. 1-2, Issue 3, 1927, pp. 202-208).

REPLY [5 votes]: Let $n=p_1^{r_1}\cdots p_k^{r_k}$ be a prime factorization of $n$. We need to estimate
$$
\sum_{\substack{{e_1\leq r_1}\\{\cdots}\\{e_k\leq r_k}}}\frac{e_1\log p_1+\cdots +e_k \log p_k}{p_1^{e_1}\cdots p_k^{e_k}}
$$
We break these up and consider
$$
\sum_{\substack{{e_1\leq r_1}\\{\cdots}\\{e_k\leq r_k}}}\frac{e_1\log p_1}{p_1^{e_1}\cdots p_k^{e_k}}
$$
$$
\leq\left(1-\frac 1{p_2}\right)^{-1}\cdots \left(1-\frac 1{p_k}\right)^{-1}\sum_{e_1\leq r_1}\frac{e_1\log p_1}{p_1^{e_1}}
$$
$$
\leq\left(1-\frac 1{p_2}\right)^{-1}\cdots \left(1-\frac 1{p_k}\right)^{-1}\left(1-\frac1{p_1}\right)^{-2}\frac{\log p_1}{p_1}
$$
$$
=\left(1-\frac1{p_1}\right)^{-1}\left(1-\frac 1{p_2}\right)^{-1}\cdots \left(1-\frac 1{p_k}\right)^{-1}\frac{\log p_1}{p_1-1}
$$
Then the original sum is bounded by
$$
\ll\left(1-\frac1{p_1}\right)^{-1}\left(1-\frac 1{p_2}\right)^{-1}\cdots \left(1-\frac 1{p_k}\right)^{-1}\sum_{i\leq k} \frac{\log p_i}{p_i-1}
$$
$$
\ll \exp\left(\sum_{i\leq k} \left(\frac1{p_i}+O(\frac1{p_i^2}) \right)\right)\sum_{i\leq k} \frac{\log p_i}{p_i-1}
$$
$$
\ll \exp\left(\sum_{i\leq k}\frac1{p_i}\right)\sum_{i\leq k} \frac{\log p_i}{p_i-1} \ \ \ (*)
$$
Here, implied constants in $\ll$ are absolute.
Using the primorial $n=\prod_{p\leq k}p$, the Prime Number Theorem, and partial summation, we obtain
$$
\sum_{d|n}\frac{\log d}d \ll (\log k)^2 \ll (\log\log n)^2.
$$
In fact, the primorials are the smallest numbers that makes the sum (*) largest. Therefore, the stated bound holds for all $n$.


TITLE: Normal linear map properties
QUESTION [1 upvotes]: So I have a test and I might need to proof the following  theorem but I can not find a proof for that so I will appreciate any help you could give.
Let $V$ be an inner product system.
Let $T:V \rightarrow V$ and we know that $T=T^{*}$
assuming that $ \forall v \in V$ $<T(v),v>=0$
$==> T = 0$
And another question I wanted to ask.
I know that if $T(v_{1})= \lambda_{1}v_{1}$ and $T^{t}(v_{2})= \lambda_{2}v_{2}$
Then $<v_{1},v_{2}>=0$.
But if $T(v_{2})= \lambda_{2}v_{2}$ is still $<v_{1},v_{2}>=0$ ?
Thanks in advanced !!

REPLY [1 votes]: Try using polarization identities for the first one.
The second assertion is true for self adjoint operators if $\lambda_{1} \neq \lambda_{2}$. See it as follows.
$$ \lambda_{1}<v_{1},v_{2}> = <\lambda_{1}v_{1},v_{2}> = <Tv_{1},v_{2}> = <v_{1},Tv_{2}> = \lambda_{2}<v_{1},v_{2}> $$ as eigenvalues of a self adjoint operators are real.
Now if $\lambda_{1} \neq \lambda_{2}$, then $<v_{1},v_{2}> = 0$.


TITLE: Model building using PDE
QUESTION [1 upvotes]: Let $p(x,t)$ denote the number density of bacteria growing in a straight pipe (straight along the x-axis) through which water is streaming with a velocity $v(x)$ to the right. The growth may be modelled by a term linear in density. The growth rate $r$ depends on the illumination, hence $r = r(x)$. The initial density of bacteria is $p(x,0) = p_0 (x) $.
(a) Write down the continuity equation for the density $p(x,t) $ and a general current $j = j(p)$ with the growth term. Solve this PDE for vanishing velocity, $v = 0$, and constant rate $r = r_0$.

I have a final examination on PDE next month, was solving past exam papers and
tried the following:
Since bacteria growing in a pipe line can be represented as a flux flowing.
Rate that $q$ is flowing through the imaginary surface $S$ can be written as
$$\int \int_s j \space ds$$
which in a differential form can be written as
$$ \partial_t p + \nabla j = \delta$$
$\delta$ is the generation of $q$ per unit volume per unit time. In this question  $\delta$ is a growth term
hence $$\partial_t p + \nabla j = r$$
which is just the one-way wave equation, I am guessing the solution should look like
something like $p(x,t) = p_0 (x-v_0 t)$......
I am having some trouble finding the correct continuity equation and its solution, any help will be appreciated.

REPLY [3 votes]: Consider a point $z$ along the axis and let $h >0$.  Let's examine the interval $(z, z+h)$ and see what's happening to the concentration $p$.  First we have a velocity $v$ pushing the bacteria along.  This means we'll have an outward flux term
$$
F_{out} = (v(z+h) p(z+h,t) - v(z)p(z,t))
$$
with the signs chosen by the fact that $v$ is the velocity to the right.  By the fundamental theorem of calculus we can rewrite
$$
F_{out} = \int_z^{z+h} \partial_x(v(x)p(x,t))dx.
$$
Next we consider the growth of bacteria.  They reproduce at a rate $r$ that depends on where we are in the pipe.  At each point $x$ the bacterial creation is then $r(x) p(x,t)$.  When we add this up over the length of pipe we have that the creation of bacteria, $C$, is given by
$$
C = \int_{z}^{z+h} r(x) p(x,t) dx.
$$
Finally, we combine these by asserting that
$$
\frac{d}{dt} \int_z^{z+h} p(x,t) dx = - F_{out} + C,
$$
i.e. the change in the amount of bacteria equals the creation term minus the outward flux (or plus the inward flux, if you prefer).  Then
$$
\int_{z}^{z+h} \partial_t p(x,t) dx = \int_{z}^{z+h} [-\partial_x(v(x)p(x,t)) + r(x) p(x,t)]dx.
$$
Dividing both sides by $h$, sending $h \to 0$, and using the fact that $z$ was arbitrary then shows that
$$
\partial_t p(,t) + \partial_x(v(x) p(x,t)) = r(x) p(x,t),
$$
which is a transport-type equation for the evolution of $p$.  This can be expanded as
$$
\partial_t p + v \partial_x p = (r-\partial_x v) p
$$
to make it look more like the standard transport equation.
I will trail off here and leave the rest of the problem to you now that you know the proper PDE for the model.


TITLE: Show that $\frac{d^{n}}{dx^{n}}\left[ x^{n-1}f\left(\frac{1}{x}\right)\right]=\frac{(-1)^{n}}{x^{n+1}}f^{(n)}\left(\frac{1}{x}\right)$
QUESTION [2 upvotes]: How can I prove that
$$\frac{d^{n}}{dx^{n}}\left[ x^{n-1}f\left(\frac{1}{x}\right)\right]=\frac{(-1)^{n}}{x^{n+1}}f^{(n)}\left(\frac{1}{x}\right)$$
without using mathematical induction? For any $n\in\mathbb{N}$.

REPLY [1 votes]: Ok, my first answer was -- admittedly -- not that helpful so here's another one:

You can try to prove the result for a smaller class of functions $f$, say analytical functions.
Because the map $$T : f \mapsto \frac{d^n}{dx^n}[x^{n-1}f(1/x)] - \frac{(-1)^n}{x^{n+1}}f^{(n)}(1/x) $$
is linear in $f$, we may even try to prove the result for monomials $f(x) = x^N$ first.
$$ \frac{d^n}{dx^n}[x^{n-1}f(1/x)]
    = \frac{d^n}{dx^n}x^{n-1-N}
    = (n-1-N)^{\underline{n}}x^{-1-N}
   $$
Here I used the notation: $a^{\underline{b}}$ is the $b$-th falling factorial of $a$.
Further we have
$$ \frac{(-1)^n}{x^{n+1}}f^{(n)}(1/x)
    = (-1)^nx^{-(n+1)}\frac{d^n}{ds^n}|_{s=1/x}s^{N}
    = (-1)^nx^{-(n+1)}N^{\underline{n}}x^{-(N-n)}
    = (n-1-N)^{\underline{n}}x^{-1-N}
   $$
Hence $T(f) = 0$ for monomials $f$.
By linearity $T$ also vanishes on polynomials.
Without loss we may assume that $f(1/x)$ is defined on a bounded interval $I=[a,1/a]$ for $a\in (0,1)$, so $T : C^{n}(I) \to C^{0}(I)$. $C^{n}(I)$ is equipped with the norm $\|f\|_{C^n} := \max\{\|f\|_\infty, ..., \|f^{(n)}\|_\infty \}$. $C^0(I)$ is equipped with the uniform norm. We need to show that $T$ is continuous.
Now it remains to show that the polynomials on $I$ are dense in $C^n(I)$, which has been shown here using Jackson's theorem.


TITLE: Altering separable space's definition
QUESTION [0 upvotes]: A separable space has by definition a countable sub-space that is dense.
What if we replace "dense" by "its completion is dense"
What about "its completion is the whole space"? Do such spaces have names (if they are different)?
I guess my question only applies to metric spaces with the associated topology

REPLY [0 votes]: (1).If Y is a subspace of a separable metric space X then Y is separable. So if X is the metric completion of Y, and X is separable, then Y is separable.
(2).If Y is a dense separable subspace of X then X is separable. So if Y is a separable metric space then the metric completion of Y is separable.
For (1) let $d$ be a metric for $X$ and let $D$ be a countable dense subset of $X.$ Let $E\subset D\times \Bbb Q^+,$ where  $e=(\delta,q)\in E\iff B_d(\delta,q)\ne \phi.$  Let $f:E\to Y$ be a function with $f(\delta,q)\in Y\cap B_d(\delta,q).$
Now $F=\{f(e):e\in E\}$  is a countable subset of $Y.$ To show that $F$ is dense in $Y:$ If $y\in U\subset Y,$ where $U$ is open in $Y,$ then take  $r\in \Bbb R^+$ such that  $Y\cap B_d(y,r)\subset U.$
Now take $q\in \Bbb Q^+$ with $q<r/3.$ Since $D$ is dense in $X$ there exists $\delta \in D \cap B_d(y,q),$ so $y\in B_d(\delta,q)\cap Y,$ so $(\delta, q)\in E.$ And by the triangle inequality (since $3q<r$ and $d(y,\delta)<q $ ) we have $B_d(\delta,q))\subset B_d(y,r).$ So $F\cap U$ is not empty because $$f(\delta,q)\in F\cap B_d(\delta,q)\subset F\cap B_d(y,r)=$$ $$=(F\cap Y)\cap B_d(y,r)=F\cap (Y\cap B_d(y,r))\subset F\cap U.$$
For (2), if $G$ is  countable dense subset of $Y$ and Y is  dense in $X$ then $$ X=Cl_X(Y)=Cl_X(\,Cl_Y(G)\,)=Cl_X (\,Y\cap Cl_X(G)\,)\subset Cl_X(\,Cl_X(G)\,)=$$ $$=Cl_X(G)\subset X.$$ So $X=Cl_X(G).$