\section{Introduction}

For a set $X$, let $2^X$ denote the power set of $X$. For a nonnegative integer $n$, let $[n]=\{1,\ldots,n\}$ and note in particular that $[n]=\emptyset$ when $n=0$. Let $\mathcal{F}$ be a family of subsets of a ground set $X$. We define $\mathcal{F}^{\,\downarrow}=\{S \subseteq X: S \subseteq F \text{ for some } F \in \mathcal{F}\}$, $\mathcal{F}^{\,\uparrow}=\{S \subseteq X: F \subseteq S \text{ for some } F \in \mathcal{F}\}$ and $\mathcal{F}^{\,\updownarrow}= \mathcal{F}^{\,\uparrow} \cup \mathcal{F}^{\,\downarrow}$. Note that the latter two definitions depend implicitly on the ground set of $\mathcal{F}$ and we will clarify what ground set we are considering whenever it may be unclear. We say $\mathcal{F}$ is \emph{convex} if $\mathcal{F}^{\,\uparrow} \cap \mathcal{F}^{\,\downarrow}=\mathcal{F}$.

For nonnegative integers $m$ and $n$ such that $m \leqslant 2^n$, let
\[\Phi(n,m)=\min\left\{\left|\mathcal{F}^{\,\updownarrow}\right|: \mathcal{F} \subseteq 2^{[n]} \text{ and } |\mathcal{F}|=m\right\}.\]
Note that, for any nonnegative integer $n$ we clearly have $\Phi(n,0)=0$, $\Phi(n,2^n)=2^n$ and that $\Phi(n,m)$ is nondecreasing in $m$. This paper is devoted to the study of the values of $\Phi(n,m)$ and of families $\mathcal{F}$ of subsets of $[n]$ for which $|\mathcal{F}^{\,\updownarrow}|=\Phi(n,m)$. We first state our main results and then discuss their motivation and context. Our first main result determines $\Phi(n,m)$, for all nonnegative integers $m$ and $n$ such that $m \leqslant 2^n$, by means of a recursion.


\begin{theorem}\label{T:isoperRecursive}
We have $(\Phi(0,0),\Phi(0,1))=(0,1)$ and $(\Phi(1,0),\Phi(1,1),\Phi(1,2))=(0,2,2)$. For integers $n \geqslant 2$ and $m \in \{0,\ldots,2^n\}$,
\[
\Phi(n,m) =
\left\{
  \begin{array}{ll}
    2\Phi(n-2,m)+m\quad & \hbox{if $m \in \{0,\ldots,2^{n-2}\}$} \\
    2^n-s & \hbox{if $m \in \{2^{n-2}+1,\ldots,2^n\}$} \\
  \end{array}
\right.\]
where $s$ is the greatest element of $\{0,\ldots,2^{n-2}\}$ such that $\Phi(n,s) \leqslant 2^n-m$.
\end{theorem}

The determination of $\Phi(n,m)$ given by Theorem~\ref{T:isoperRecursive} has drawbacks: it does not immediately suggest any neat approximation for $\Phi(n,m)$ and, naively, it seems that computing $\Phi(n,m)$ for a given $n$ and $m$ may require computing $\Theta(2^n)$ other values of $\Phi$. We are able to remedy both these problems by giving a closed form approximation for $\Phi(n,m)$ and an efficient means for computing $\Phi(n,m)$.

\begin{corollary}\label{C:isoperBounds}
Let $n$ and $m$ be nonnegative integers with $m \leqslant 2^n$. Then
\[\Phi(n,m) \geqslant f(n,m) \qquad \text{ where } \qquad f(n,m)=\sqrt{2^{n+2}m}-m\]
and we have equality whenever $f(n,m)$ is an integer. Furthermore $\Phi(n,m) \leqslant f(n,m)+\sqrt{2^n}$ and hence $\Phi(n,m) \sim f(n,m)$ as $n \rightarrow \infty$ with $m=\omega(1)$.
\end{corollary}


\begin{theorem}\label{T:isoperQuick}
Let $n \geqslant 0$ be an integer and let $m \in \{1,\ldots,2^n\}$, let $\kappa=1$ if $n$ is even and $\kappa=2$ if $n$ is odd, and let $c$ be the positive integer such that $\kappa c(c-1) \leqslant m < \kappa c(c+1)$. Then
\[\Phi(n,m)=\sqrt{\kappa 2^{n}}\Bigl(2c-1+2\delta_{2 \kappa c}\bigl(m-\kappa c(c-1)\bigr)\Bigr)-m\]
where, for any positive integer $k$, $\delta_k: \{0,\ldots,k\} \rightarrow \{y \in \mathbb{Q}:0\leqslant y \leqslant 1\}$ is a function recursively defined by $\delta_1(x)=x$ and, for $k \geqslant 2$,
\begin{equation}\label{E:deltaDef}
\delta_k(x) =
\begin{cases}
\frac{1}{2}\delta_{\lfloor k/2\rfloor}(x) & \text{if $x \in \{0,\ldots,\lfloor\frac{k}{2}\rfloor-1\}$} \\
\frac{1}{2}+\frac{1}{2}\delta_{\lceil k/2 \rceil}(x-\lfloor\frac{k}{2}\rfloor)  &\text{if $x \in \{\lfloor\frac{k}{2}\rfloor,\ldots,k\}$.}
\end{cases}
\end{equation}
\end{theorem}

Observe that evaluating $\delta_k(x)$ involves at most $\log_2(k)$ recursive steps and hence Theorem~\ref{T:isoperQuick} allows $\Phi(n,m)$ to be computed in $O(n)$ time. Values of $\Phi(n,m)$ for small $n$ are given in Table~\ref{Tab:smallVals} and an illustration of these values is given in Figure~\ref{F:Ferrers}. Our last main result says that there is a total ordering of the subsets of $[n]$ such that, for each $m \in \{0,\ldots,2^n\}$, $|(\mathcal{F}_m)^{\,\updownarrow}|=\Phi(n,m)$, where $\mathcal{F}_m$ is the initial segment containing the first $m$ sets under this ordering. Furthermore we show that certain special families arise as initial segments of this ordering.

\begin{theorem}\label{T:totalOrdering}
Let $n$ be a nonnegative integer. There is a chain $\mathcal{F}_0 \subsetneq \cdots \subsetneq \mathcal{F}_{2^n}$ of convex families of subsets of $[n]$ such that $|\mathcal{F}_m|=m$ and $|(\mathcal{F}_m)^{\,\updownarrow}|=\Phi(n,m)$ for each $m \in \{0,\ldots,2^{n}\}$. Furthermore, this chain includes the families $\mathcal{C}_{n,a}$ and $\mathcal{C}^*_{n,a}$ for each $a \in \{0,\ldots,n-2\}$ with $a \equiv n \mod{2}$, where
\begin{align*}
\mathcal{C}_{n,a} & = \{A \subseteq [n]:[\tfrac{n-a}{2}] \subseteq A \subseteq [\tfrac{n+a}{2}]\} \\
\mathcal{C}^*_{n,a} &= \{A \subseteq [n]: A \nsubseteq \{\tfrac{n-a}{2}+1,\ldots,n\} \textup{ and } \{\tfrac{n+a}{2}+1,\ldots,n\} \nsubseteq A\}.
\end{align*}
\end{theorem}

The investigation undertaken here is motivated in at least three different ways. The first of these relates to the Kruskal-Katona theorem \cite{Kat,Kru} (see also \cite[\S5]{Bol}). The \emph{lower shadow} of a family $\mathcal{F}$ of $k$-subsets of $[n]$ is defined to be the family of all $(k-1)$-subsets of $[n]$ that are a subset of at least one set in $\mathcal{F}$ and the \emph{upper shadow} of $\mathcal{F}$ is the family of all $(k+1)$-subsets of $[n]$ that are a superset of at least one set in $\mathcal{F}$. The Kruskal-Katona theorem states that, over all families $\mathcal{F}$ of $k$-subsets of $[n]$ with $|\mathcal{F}|=m$, the size of the shadow of $\mathcal{F}$ is minimised when $\mathcal{F}$ is taken to be the first $m$ $k$-subsets of $[n]$ in colexicographic order. It is known that this same choice of $\mathcal{F}$ also minimises the size of $\mathcal{F}^{\,\downarrow}$. Thus our results can be seen as proving a certain `two-sided' variant of the Kruskal-Katona theorem in which $\mathcal{F}$ is allowed to contain sets of different sizes and we are interested in minimising the size of $\mathcal{F}^{\,\updownarrow}$. Through this lens, Theorem~\ref{T:isoperQuick} can be seen as analogous to the original Kruskal-Katona theorem, which gives an exact answer that can be difficult to work with, and Corollary~\ref{C:isoperBounds} as akin to the neat approximation due to Lov\'{a}sz \cite[p. 95]{Lov}. Bashov \cite{Bas1,Bas2} studied a different two-sided version of the Kruskal-Katona theorem in which $\mathcal{F}$ remained restricted to contain sets of uniform size and the size of the union of the upper and lower shadow (rather than the union of $\mathcal{F}^{\,\uparrow}$ and $\mathcal{F}^{\,\downarrow}$) was to be minimised. Interestingly, he found that no minimising total order of subsets of $[n]$ existed for his problem, contrasting with both the Kruskal-Katona theorem and Theorem~\ref{T:totalOrdering}.

A second motivation concerns vertex-isoperimetric problems for graphs. The vertex boundary of a set of vertices $U$ of a graph $G$ is the set of all vertices of $G$ not in $U$ that are adjacent to at least one vertex in $U$. The vertex-isoperimetric problem on $G$ asks us to determine the minimum size of the vertex boundary of $U$ over all sets $U$ of a given number of vertices. In particular, much attention has been paid to the vertex-isoperimetric problem on the $n$-dimensional hypercube, which can be defined as the graph with vertex set $2^{[n]}$ and edge set $\{AB: A \subsetneq B, |B|=|A|+1\}$. The classical result solving the problem is due to Harper \cite{Har} (see also \cite[\S16]{Bol}) but related problems have been a subject of recent study \cite{KeeLon,PrzRob,Rat}. Harper demonstrated that any initial segment of the so-called simplicial ordering of vertices of the hypercube has minimum boundary size over all subsets of the vertex set with the same size. Furthermore, the $d$-Hamming ball $\{A \subseteq [n]: |A| \leqslant d\}$ arises as an initial segment of the simplicial ordering for each $d \in \{1,\ldots,n-1\}$. Our results can be seen as a solution to the vertex isoperimetric problem on $\Gamma_n$, the supergraph of the $n$-dimensional hypercube with vertex set $2^{[n]}$ and edge set $\{AB: A \subsetneq B\}$. In this graph, the boundary of a set $\mathcal{F}$ of vertices is $\mathcal{F}^{\,\updownarrow} \setminus \mathcal{F}$ and hence the minimum boundary size over all sets of $m$ vertices is $\Phi(n,m)-m$. The ordering of the vertices of $\Gamma_n$ given by Theorem~\ref{T:totalOrdering} and the families $\mathcal{C}_{n,a}$ and $\mathcal{C}^*_{n,a}$ can be seen as analogous to the simplicial ordering of vertices of the hypercube and the Hamming balls.

Finally, our results relate to work by Gerbner et al.\ in \cite{GerLemPalPatSze} on so-called pairs of cross-Sperner families. Our work answers a question that arises naturally out of theirs and also allows us to strengthen one of the main results from their paper (see Theorem~\ref{T:ImproveGerbnerEtAl}). We return to this in Section~\ref{S:CS}.

The rest of the paper is organised as follows. In Section~\ref{S:prelim} we establish some concepts, notation and preliminary results that will form the foundation for the proofs of our main results. Section~\ref{S:shift} is devoted to introducing a generalisation of the classical concept of shifting and showing that $|\mathcal{G}^{\,\updownarrow}| \leqslant |\mathcal{F}^{\,\updownarrow}|$ when $\mathcal{G}$ is a family obtained from another family $\mathcal{F}$ by this generalised shifting. In Section~\ref{S:mainProof} we combine results from Sections~\ref{S:prelim} and \ref{S:shift} to complete our proof of Theorem~\ref{T:isoperRecursive} along with Corollary~\ref{C:isoperBounds}. We show in Section~\ref{S:quickProof} that, with some extra work, Theorem~\ref{T:isoperQuick} follows from Theorem~\ref{T:isoperRecursive}. In Section~\ref{S:orderProof} we prove Theorem~\ref{T:totalOrdering} and in Section~\ref{S:CS} we discuss the consequences of our results for pairs of cross-Sperner families. Some brief conclusive comments are given in Section~\ref{S:conc}.


\section{Preliminaries}\label{S:prelim}

In this section we lay the groundwork for our proof of Theorem~\ref{T:isoperRecursive}. For nonnegative integers $n$ and $m$ we call a family of subsets $\mathcal{F}$ of $[n]$ with $|\mathcal{F}|=m$ an \emph{$(n,m)$-family}. If an $(n,m)$-family $\mathcal{F}$ has the property that $|\mathcal{F}^{\,\updownarrow}|=\Phi(n,m)$, then we call it an \emph{$(n,m)$-witness family}.

Our first step is to show that, for a fixed value of $n$, the values of $\Phi(n,m)$ are related to one another according to a certain self-conjugacy property. More precisely, if the sequence $\Phi(n,1),\Phi(n,2),\ldots,\Phi(n,2^n)$ is viewed as an integer partition, then this partition is self conjugate. See Figure~\ref{F:Ferrers} for an illustration of this and see \cite[Chapter 3]{AndEri} for the relevant definitions related to integer partitions, which will not be required here. This self-conjugacy is the basic idea underlying the second case of the recursion in Theorem~\ref{T:isoperRecursive}.

\begin{lemma}\label{L:selfConjugate}
Let $m$ and $n$ be nonnegative integers such that $m \leqslant 2^n$. Then $\Phi(n,m) = 2^n-s$ where $s$ is the greatest element of $\{0,\ldots,2^{n}\}$ such that $\Phi(n,s) \leqslant 2^n-m$.
\end{lemma}

\begin{proof}
Because $\Phi(n,s) \leqslant 2^n-m$, there is an $(n,s)$-family $\mathcal{F}$ such that $|\mathcal{F}^{\,\updownarrow}| \leqslant 2^n-m$. So we can choose a subfamily $\mathcal{G}$ of $2^{[n]} \setminus \mathcal{F}^{\,\updownarrow}$ with $|\mathcal{G}|=m$. Since no set in $\mathcal{G}$ is in $\mathcal{F}^{\,\updownarrow}$, no set in $\mathcal{G}^{\,\updownarrow}$ is in $\mathcal{F}$. So $\mathcal{G}^{\,\updownarrow} \subseteq 2^{[n]} \setminus \mathcal{F}$ and hence $|\mathcal{G}^{\,\updownarrow}| \leqslant 2^n-s$. Thus $\Phi(n,m) \leqslant 2^n-s$.

Now suppose for a contradiction that $\Phi(n,m) \leqslant 2^n-s-1$. Then there is an $(n,m)$-family $\mathcal{H}$ such that $|\mathcal{H}^{\,\updownarrow}| \leqslant 2^n-s-1$. So we can choose a subfamily $\mathcal{I}$ of $2^{[n]} \setminus \mathcal{H}^{\,\updownarrow}$ with $|\mathcal{I}|=s+1$. Then $\mathcal{I}^{\,\updownarrow} \subseteq 2^{[n]} \setminus \mathcal{H}$ and hence $|\mathcal{I}^{\,\updownarrow}| \leqslant 2^n-m$. This implies $\Phi(n,s+1) \leqslant 2^n-m$ in contradiction to the definition of $s$. Thus $\Phi(n,m) \geqslant 2^n-s$.
\end{proof}

Lemma~\ref{L:selfConjugate} goes most of the way toward establishing the second case of the recurrence in Theorem~\ref{T:isoperRecursive}, but it is not immediately apparent that the value of $s$ defined in Lemma~\ref{L:selfConjugate} will be in the set $\{0,\ldots,2^{n-2}\}$ for all $m \in \{2^{n-2}+1,\ldots,2^n\}$. This will definitely be the case, however, if $\Phi(n,2^{n-2})=3\cdot2^{n-2}$. For any integer $n \geqslant 2$ we have $\Phi(n-2,2^{n-2})=2^{n-2}$ and hence we will have $\Phi(n,2^{n-2})=3\cdot2^{n-2}$ if the first case of recurrence in Theorem~\ref{T:isoperRecursive} holds. So, given Lemma~\ref{L:selfConjugate}, it suffices to prove the first case to establish the totality of Theorem~\ref{T:isoperRecursive}.

For a family $\mathcal{F}$ of sets, we say a set $F \in \mathcal{F}$ is \emph{minimal in $\mathcal{F}$} if no set in $\mathcal{F}$ is a proper subset of $F$ and is \emph{maximal in $\mathcal{F}$} if no set in $\mathcal{F}$ is a proper superset of $F$. Recall that we say $\mathcal{F}$ is convex if $\mathcal{F}^{\,\uparrow} \cap \mathcal{F}^{\,\downarrow}=\mathcal{F}$.  Equivalently, $\mathcal{F}$ is convex if, for any $F_1,F_2 \in \mathcal{F}$ and any set $A$ such that $F_1 \subseteq A \subseteq F_2$, we have $A \in \mathcal{F}$. Observe that removing a minimal or maximal set from a convex family of sets results in a new family that is still convex. Our next lemma shows that if we are attempting to find values of $\Phi(n,m)$, then it suffices to consider convex families.

\begin{lemma}\label{L:CSNoGaps}
Let $n$ and $m$ be nonnegative integers with $m \leqslant 2^n$. There exists an $(n,m)$-witness family that is convex.
\end{lemma}

\begin{proof}
Let $\mathcal{F}$ be an $(n,m)$-witness family. We are done if $\mathcal{F}$ is convex, so suppose otherwise that there are sets $F_1,F_2 \in \mathcal{F}$ and $A \in 2^{[n]}\setminus \mathcal{F}$ such that $F_1 \subseteq A \subseteq F_2$. We may further suppose that $F_2$ has been chosen so that it is maximal in $\mathcal{F}$. Let $\mathcal{G}=(\mathcal{F} \setminus \{F_2\}) \cup \{A\}$. Then $\mathcal{G}^{\,\uparrow} = \mathcal{F}^{\,\uparrow}$ because $F_1$ is in both $\mathcal{F}$ and $\mathcal{G}$ and $\{F_2\}^{\,\uparrow} \subseteq \{A\}^{\,\uparrow} \subseteq \{F_1\}^{\,\uparrow}$ since $F_1 \subseteq A \subseteq F_2$. Further, $\mathcal{G}^{\,\downarrow} \subseteq \mathcal{F}^{\,\downarrow} \setminus \{F_2\}$ because no proper superset of $F_2$ is in $\mathcal{F}$ and because $\{A\}^{\,\downarrow} \subseteq \{F_2\}^{\,\downarrow} \setminus \{F_2\}$ since $A \subsetneq F_2$. It follows that $|\mathcal{G}^{\,\updownarrow}| \leqslant |\mathcal{F}^{\,\updownarrow}|$ and hence that $|\mathcal{G}^{\,\updownarrow}|=|\mathcal{F}^{\,\updownarrow}|=\Phi(n,m)$ by the definition of $\Phi(n,m)$. Furthermore $F_2 \in \mathcal{G}^{\,\uparrow} \setminus \mathcal{G}^{\,\downarrow}$ and hence $|\mathcal{G}^{\,\uparrow} \cap \mathcal{G}^{\,\downarrow}| < |\mathcal{F}^{\,\uparrow} \cap \mathcal{F}^{\,\downarrow}|$. So we can iterate this process until we eventually obtain an $(n,m)$-witness family that is convex.
\end{proof}

Equipped with Lemma~\ref{L:CSNoGaps}, we can also exhibit the idea underlying the first case of the recursion in Theorem~\ref{T:isoperRecursive}. When reading the lemma below it is important to note that $\mathcal{P}^{\,\updownarrow}$ is defined with respect to the ground set $\{2,\ldots,n-1\}$ while $\mathcal{F}^{\,\updownarrow}$ is defined with respect to the ground set $[n]$.


\begin{lemma}\label{L:sandwich}
Let $n$ and $m$ be nonnegative integers with $n \geqslant 2$ and $m \leqslant 2^{n-2}$. If $\mathcal{P}$ is a convex family of subsets of $\{2,\ldots,n-1\}$ such that $|\mathcal{P}|=m$ and $\mathcal{F}$ is the $(n,m)$-family given by $\mathcal{F}=\{\{1\} \cup P:P \in \mathcal{P}\}$, then $\mathcal{F}$ is convex and $|\mathcal{F}^{\,\updownarrow}|=2|\mathcal{P}^{\,\updownarrow}|+m$.
Hence $\Phi(n,m) \leqslant 2\Phi(n-2,m)+m$.
\end{lemma}

\begin{proof}
Remembering the respective ground sets of $\mathcal{F}$ and $\mathcal{P}$, we have
\begin{equation}\label{E:doubleUpDown}
\mathcal{F}^{\,\downarrow}=\mathcal{P}^{\,\downarrow} \cup \bigl\{\{1\} \cup P: P \in \mathcal{P}^{\,\downarrow}\bigr\} \text{~~and~~} \mathcal{F}^{\,\uparrow}=\bigl\{\{1\} \cup P: P \in \mathcal{P}^{\,\uparrow}\bigr\} \cup \bigl\{\{1,n\} \cup P: P \in \mathcal{P}^{\,\uparrow}\bigr\}.
\end{equation}
From $\mathcal{P}^{\,\uparrow} \cap \mathcal{P}^{\,\downarrow} = \mathcal{P}$ and \eqref{E:doubleUpDown} it follows that $\mathcal{F}^{\,\uparrow} \cap \mathcal{F}^{\,\downarrow} = \mathcal{F}$, so $\mathcal{F}$ is indeed convex. Using $|\mathcal{F}^{\,\uparrow} \cap \mathcal{F}^{\,\downarrow}|=m$ and $|\mathcal{P}^{\,\uparrow} \cap \mathcal{P}^{\,\downarrow}| = m$ together with \eqref{E:doubleUpDown}, we also have
\[|\mathcal{F}^{\,\updownarrow}|=|\mathcal{F}^{\,\uparrow}|+|\mathcal{F}^{\,\downarrow}|-m=2|\mathcal{P}^{\,\uparrow}|+2|\mathcal{P}^{\,\downarrow}|-m=2|\mathcal{P}^{\,\updownarrow}|+m.\]
Because Lemma~\ref{L:CSNoGaps} guarantees that there exists a convex family $\mathcal{P}$ of subsets of $\{2,\ldots,n-1\}$ such that $|\mathcal{P}|=m$ and $|\mathcal{P}^{\,\updownarrow}|=\Phi(n-2,m)$, it follows that $\Phi(n,m) \leqslant 2\Phi(n-2,m)+m$.
\end{proof}

In view of Lemmas~\ref{L:selfConjugate} and \ref{L:sandwich}, to prove Theorem~\ref{T:isoperRecursive} it only remains to show that $\Phi(n,m) \geqslant 2\Phi(n-2,m)+m$ when $m \in \{0,\ldots,2^{n-2}\}$. This takes some more work, however. In particular, we require a result saying that we can always find a convex witness family that is invariant under certain kinds of shifting operations. We pursue this in the next section.



\section{Shifting}\label{S:shift}

We make use of a variant of the classical notion of shifting (see \cite[\S5]{Bol}, for example). Most significantly, our notion differs from the usual one in that it allows sets to be replaced with sets of a different size. For a family $\mathcal{F}$ of subsets of $[n]$ and two nonempty disjoint subsets $I$ and $J$ of $[n]$ we define, for each $F \in \mathcal{F}$,
\[S^{\mathcal{F}}_{I,J}(F)=
\left\{
  \begin{array}{ll}
    (F \setminus J) \cup I & \hbox{if $I \cap F = \emptyset$, $J \subseteq F$ and $(F \setminus J) \cup I \notin \mathcal{F}$} \\
    F & \hbox{otherwise.}
  \end{array}
\right.\]
We further define $S_{I,J}(\mathcal{F})=\{S^{\mathcal{F}}_{I,J}(F):F \in \mathcal{F}\}$. Observe that $|S_{I,J}(\mathcal{F})|=|\mathcal{F}|$. If $I=\{i\}$ and $J=\{j\}$, this definition agrees with the conventional definition of a shift. We say a family $\mathcal{F}$ of subsets of $[n]$ is \emph{strongly shifted} if $S_{I,J}(\mathcal{F})=\mathcal{F}$ for all $I,J \subseteq [n]$ such that $\max (I) < \min (J)$. Our goal in this section is to show that, for any admissible $n$ and $m$, there always exists a convex $(n,m)$-witness family that is strongly shifted. We first require some more basic concepts and notation.

Let $\mathcal{F}$ be a family of subsets of $[n]$. For any set $F \in \mathcal{F}$, let $\overline{F}$ denote the set $[n] \setminus F$ and let $\overline{\mathcal{F}}$ denote the family $\{\overline{F} :F \in \mathcal{F}\}$. Note that $\overline{\mathcal{F}}$ does not mean $2^{[n]} \setminus \mathcal{F}$.  Let $\rho$ be the permutation of $[n]$ such that $\rho(x)=n+1-x$ for each $x \in [n]$ and for a subset $F$ of $[n]$, let $\rho(F)=\{\rho(x):x \in F\}$. The \emph{reverse} of $\mathcal{F}$ is the family $\rho(\mathcal{F})=\{\rho(F):F \in \mathcal{F}\}$. Obviously $|\rho(\mathcal{F})|=|\mathcal{F}|$. We note some basic properties of complements, reverses and shifts.

\begin{lemma}\label{L:relbetops}
Let $\mathcal{F}$ be a family of subsets of $[n]$ and $I$ and $J$ be nonempty disjoint subsets of $[n]$. Then
\begin{itemize}
\item[\textup{(i)}]
$\left(\,\overline{\mathcal{F}}\,\right)^{\,\downarrow} = \overline{\mathcal{F}^{\,\uparrow}}$, \quad $\left(\,\overline{\mathcal{F}}\,\right)^{\,\uparrow}= \overline{\mathcal{F}^{\,\downarrow}}$
\quad and \quad $\left(\overline{\mathcal{F}}\right)^{\,\updownarrow} = \overline{\mathcal{F}^{\,\updownarrow}}$;
\item[\textup{(ii)}]
$\overline{\rho(\mathcal{F})}= \rho\left(\overline{\mathcal{F}}\right)$, \quad
$\rho(\mathcal{F}^{\,\downarrow})= (\rho(\mathcal{F}))^{\,\downarrow}$, \quad
$\rho(\mathcal{F}^{\,\uparrow})= (\rho(\mathcal{F}))^{\,\uparrow}$, \quad and \quad
$\rho(\mathcal{F}^{\,\updownarrow})= (\rho(\mathcal{F}))^{\,\updownarrow}$;
\item[\textup{(iii)}]
$\overline{S_{I,J}(\mathcal{F})} = S_{J,I}(\overline{\mathcal{F}})$.
\end{itemize}
\end{lemma}
\begin{proof}
It is a simple exercise to prove (i) by using that $A \subseteq B$ if and only if $\overline{B}\subseteq \overline{A}$ for $A,B \subseteq [n]$. The properties in (ii) are immediate from the fact that $\rho$ is a permutation of the ground set $[n]$.

For (iii), we abbreviate $S_{I,J}^{\mathcal{F}}$ to $S$ and $S_{J,I}^{\overline{\mathcal{F}}}$ to $S'$.
Let $F \in \mathcal{F}$.
Note that $J \cap \overline{F} = \emptyset$ if and only if $J \subseteq F$, that $I \subseteq \overline{F}$ if and only if $I \cap F= \emptyset$, and that $(\overline{F}\setminus I) \cup J \in \overline{\mathcal{F}}$ if and only if $(F\setminus J) \cup I \in \mathcal{F}$,
since $\overline{ (F\setminus J) \cup I} =  (\overline{F}\setminus I) \cup J$.
Thus $S({F})={F}$ if and only if $S'(\overline{F})=\overline{F}$. When $S(F)\neq F$ and $S'(\overline{F})\neq \overline{F}$ we have
\[
\overline{S(F)} =\overline{(F\setminus J) \cup I} =  \left(\overline{F}\setminus I\right) \cup J = S'(\overline{F})\,.
\]
Thus $\overline{S(F)} = S'(\overline{F})$ for all $F \in \mathcal{F}$ and we have $\overline{S_{I,J}(\mathcal{F})}=S_{J,I}(\overline{\mathcal{F}})$.
\end{proof}

We now prove  that, under certain conditions, a witness family remains a witness family even when a shift is applied to it. This result is analogous to results for conventional shifts that are often used to prove the Kruskal-Katona theorem (see \cite{Fra}, for example).


\begin{lemma}\label{L:shiftfam}
Let $\mathcal{F}$ be a family of subsets of $[n]$ and let $I$ and $J$ be nonempty disjoint subsets of $[n]$. If $S_{I',J}(\mathcal{F})=\mathcal{F}$ for all nonempty proper subsets $I'$ of $I$ and $S_{I,J'}(\mathcal{F})=\mathcal{F}$ for all nonempty proper subsets $J'$ of $J$, then
\begin{itemize}
    \item[\textup{(i)}]
$(S_{I,J}(\mathcal{F}))^{\,\downarrow} \subseteq S_{I,J}(\mathcal{F}^{\,\downarrow})$ and hence $|(S_{I,J}(\mathcal{F}))^{\,\downarrow}| \leqslant |\mathcal{F}^{\,\downarrow}|$;
    \item[\textup{(ii)}]
$(S_{I,J}(\mathcal{F}))^{\,\uparrow} \subseteq S_{I,J}(\mathcal{F}^{\,\uparrow})$ and hence $|(S_{I,J}(\mathcal{F}))^{\,\uparrow}| \leqslant |\mathcal{F}^{\,\uparrow}|$.
\end{itemize}
\end{lemma}

\begin{proof}

\noindent {\textbf{(i).}} We abbreviate $S_{I,J}^{\mathcal{F}}$ to $S$ and $S^{\mathcal{F}^{\,\downarrow}}_{I,J}$ to $S'$. Suppose for a contradiction that there is a set $A$ in $(S_{I,J}(\mathcal{F}))^{\,\downarrow} \setminus S_{I,J}(\mathcal{F}^{\,\downarrow})$. Since $A \in (S_{I,J}(\mathcal{F}))^{\,\downarrow}$, we have that $A \subseteq S(F)$ for some $F \in \mathcal{F}$. We consider two cases according to whether $S(F)=F$.



Suppose first that $S(F) \neq F$.
Then $J \subseteq F$, $I \cap F = \emptyset$ and $S(F)=(F \setminus J) \cup I \notin \mathcal{F}$.
Further, $J \cap A = \emptyset$ since $A \subseteq S(F)$. We must have $I \nsubseteq A$ for otherwise the set $B=(A \setminus I) \cup J$ would be a subset of $F$ since $A \subseteq S(F)$, and the fact that $B \in \mathcal{F}^{\,\downarrow}$ would contradict our assumption that $A \notin S_{I,J}(\mathcal{F}^{\,\downarrow})$. We will show that $A \in \mathcal{F}^{\,\downarrow}$ and then, since $J \cap A = \emptyset$, we will have $S'(A)=A$ contradicting $A \notin S_{I,J}(\mathcal{F}^{\,\downarrow})$. If $A \cap I=\emptyset$, then $A \subseteq F$ and so $A \in \mathcal{F}^{\,\downarrow}$. If $A \cap I \neq \emptyset$, then by our hypotheses and since $ I \nsubseteq A$, we have $S_{I',J}(\mathcal{F})=\mathcal{F}$ where $I'=I\setminus A$. Thus $(F\setminus J) \cup I' \in \mathcal{F}$, which implies that $A \in \mathcal{F}^{\,\downarrow}$.


Now suppose that $S(F)=F$. Then $A \subseteq F$ and therefore $A \in \mathcal{F}^{\,\downarrow}$. So, since $A \notin S_{I,J}(\mathcal{F}^{\,\downarrow})$, we must have $S'(A) \neq A$. So $J \subseteq A$, $I \cap A = \emptyset$ and $S'(A)=(A \setminus J) \cup I \notin \mathcal{F}^{\,\downarrow}$. The first of these facts implies that $J \subseteq F$ since $A \subseteq F$ and the last of these facts implies that $I \nsubseteq F$ for otherwise $S'(A)=(A \setminus J) \cup I \subseteq F$ contradicting $ S'(A)\notin \mathcal{F}^{\,\downarrow}$. If $I \cap F = \emptyset$ then, since $J \subseteq F$ and $S(F)=F$, the set $(F \setminus J) \cup I$ must be in $\mathcal{F}$, contradicting $S'(A)=(A \setminus J) \cup I \notin \mathcal{F}^{\,\downarrow}$. If $I \cap F \neq \emptyset$, then by our hypotheses and since $I \nsubseteq F$, we have $S_{I',J}(\mathcal{F}) =\mathcal{F}$ where $I' = I \setminus F$. Hence, we have that $(F\setminus J) \cup I = (F \setminus J) \cup I' \in \mathcal{F}$,
and so $S'(A)=(A \setminus J) \cup I \subseteq (F \setminus J) \cup I$, contradicting $S'(A)\notin \mathcal{F}^{\,\downarrow}$. \smallskip

\noindent {\textbf{(ii).}} By using (i) and (iii) of Lemma~\ref{L:relbetops} and applying (i) of this lemma, we have
\[
\overline{(S_{I,J}(\mathcal{F}))^{\,\uparrow}} =  \bigl(\,\overline{S_{I,J}(\mathcal{F})}\,\bigr)^{\,\downarrow} = \bigl(S_{J,I}\bigl(\overline{\mathcal{F}}\bigr)\bigr)^{\,\downarrow} \subseteq
  S_{J,I}\bigl(\bigl(\,\overline{\mathcal{F}}\,\bigr)^{\,\downarrow}\bigr) = S_{J,I}\bigl(\,\overline{\mathcal{F}^{\,\uparrow}}\,\bigr) = \overline{S_{I,J}(\mathcal{F}^{\,\uparrow})}
\]
and hence $(S_{I,J}(\mathcal{F}))^{\,\uparrow} \subseteq S_{I,J}(\mathcal{F}^{\,\uparrow})$. Thus (ii) follows from (i).
\end{proof}

Using Lemmas~\ref{L:CSNoGaps} and \ref{L:shiftfam}, we can now achieve the goal of this section.

\begin{lemma}\label{L:canMinFamSF}
Let $n$ and $m$ be nonnegative integers with $m \leqslant 2^n$. There exists an $(n,m)$-witness family $\mathcal{F}$ that is convex and strongly shifted.
\end{lemma}

\begin{proof}
By Lemma~\ref{L:CSNoGaps} there is a convex $(n,m)$-witness family $\mathcal{F}$. We are done if $\mathcal{F}$ is strongly shifted, so suppose otherwise. Then there are subsets $I$ and $J$ of $[n]$ such that $\max(I) < \min(J)$ and $S_{I,J}(\mathcal{F}) \neq \mathcal{F}$. We may further suppose that $I$ and $J$ have been chosen to be minimal in the sense that $S_{I',J}(\mathcal{F})=\mathcal{F}$ for all nonempty proper subsets $I'$ of $I$ and $S_{I,J'}(\mathcal{F})=\mathcal{F}$ for all nonempty proper subsets $J'$ of $J$ (note that we necessarily have $\max(I') < \min(J)$ and $\max(I) < \min(J')$). Let $\mathcal{G}$ be the $(n,m)$-family $S_{I,J}(\mathcal{F})$. Then
\[|\mathcal{G}^{\,\updownarrow}|+|\mathcal{G}^{\,\uparrow} \cap \mathcal{G}^{\,\downarrow}| = |\mathcal{G}^{\,\uparrow}|+|\mathcal{G}^{\,\downarrow}| \leqslant |\mathcal{F}^{\,\uparrow}| + |\mathcal{F}^{\,\downarrow}| = \Phi(n,m)+m\]
where the inequality follows by Lemma~\ref{L:shiftfam} and the latter equality follows because
$\mathcal{F}$ is a convex $(n,m)$-witness family. Thus, because we know  $|\mathcal{G}^{\,\updownarrow}| \geqslant \Phi(n,m)$ and $|\mathcal{G}^{\,\uparrow} \cap \mathcal{G}^{\,\downarrow}| \geqslant m$, we must in fact have equality in both cases and hence that $\mathcal{G}$ is a convex $(n,m)$-witness family. Furthermore, since $\mathcal{G}=S_{I,J}(\mathcal{F}) \neq \mathcal{F}$, strictly fewer sets in $\mathcal{G}$ than in $\mathcal{F}$ contain $\max(J)$ and the same number of sets in $\mathcal{G}$ and in $\mathcal{F}$ contain $x$ for each $x \in \{\max(J)+1,\ldots,n\}$. It follows that if we iterate this procedure we will never return to the same family and hence must eventually obtain an  $(n,m)$-witness family that is convex and strongly shifted.
\end{proof}

\section{Proof of Theorem~\ref{T:isoperRecursive} and Corollary~\ref{C:isoperBounds}}\label{S:mainProof}

With the aid of Lemma~\ref{L:canMinFamSF}, we can finish proving Theorem~\ref{T:isoperRecursive}. Using the definition from Theorem~\ref{T:totalOrdering}, we have $\mathcal{C}_{n,n-2}=\{A \subseteq [n]: \{1\} \subseteq A \subseteq [n-1]\}$. This family will play a key role in this section and we abbreviate it as $\mathcal{C}$ throughout (the value of $n$ will always be clear from context). Firstly we give a lower bound on the size of $\mathcal{F}^{\,\updownarrow}$ for certain families $\mathcal{F}$ that are not subfamilies of $\mathcal{C}$.

\begin{lemma}\label{L:noSetsWith1}
Let $\mathcal{F}$ be a strongly shifted convex $(n,m)$-family such that $m \leqslant 2^{n-2}$. If $\mathcal{F} \nsubseteq \mathcal{C}$, then $|\mathcal{F}^{\,\updownarrow}| \geqslant 2^{n-1}+m$.
\end{lemma}

\begin{proof}
Suppose that $\mathcal{F} \nsubseteq \mathcal{C}$. Then we must be in one of the following three cases. \smallskip

\noindent {\textbf{Case 1.}} Suppose that $1 \notin F'$ and $n\in F''$ for some $F',F'' \in \mathcal{F}$ (possibly $F'=F''$). Because $S_{I,J}(\mathcal{F})=\mathcal{F}$ where $I = \{1\}$ and $J = F'$, we must have that $(F'\setminus J) \cup I = \{1\}$ is in $\mathcal{F}$. Similarly, because $S_{I,J}(\mathcal{F})=\mathcal{F}$ where $I = [n-1] \setminus F''$ and $J = \{n\}$, we must have that $(F'' \setminus J) \cup I = [n-1]$ is in $\mathcal{F}$. Now $\{\{1\}\}^{\,\uparrow} \cup \{[n-1]\}^{\,\downarrow} = \{A \subseteq [n]:1 \in A \text{ or } n \notin A\}$ and hence $|\mathcal{F}^{\,\updownarrow}| \geqslant 3\cdot2^{n-2}$. So the result follows since $m \leqslant 2^{n-2}$.\smallskip

\noindent {\textbf{Case 2.}} Suppose that $1 \notin F'$ for some $F' \in \mathcal{F}$ and that no set in $\mathcal{F}$ contains $n$. As in Case~1, for $I = \{1\}$ and $J = F'$, we must have that $(F'\setminus J) \cup I = \{1\}$ is in $\mathcal{F}$. Then $\{\{1\}\}^{\,\uparrow} \subseteq \mathcal{F}^{\,\updownarrow}$ and $|\{\{1\}\}^{\,\uparrow}|=2^{n-1}$. We will complete the proof by showing that $|\mathcal{F}^{\,\updownarrow} \setminus \{\{1\}\}^{\,\uparrow}| \geqslant m$.  Let $\varphi: \mathcal{F} \rightarrow \mathcal{F}^{\,\updownarrow} \setminus \{\{1\}\}^{\,\uparrow}$ be the function defined by
\[\varphi(A)=
\left\{
  \begin{array}{ll}
    A \cup \{n\} \quad& \hbox{if $1 \notin A$} \\
    A \setminus \{1\}  & \hbox{if $1 \in A$.}
  \end{array}
\right.\]
For each $A \in \mathcal{F}$, $\varphi(A)$ is indeed in $\mathcal{F}^{\,\updownarrow} \setminus \{\{1\}\}^{\,\uparrow}$ because $1 \notin \varphi(A)$,  $A \subseteq \varphi(A)$ if $1 \notin A$ and $\varphi(A) \subseteq A$ if $1 \in A$. Furthermore,  $\varphi$ is an injection because no set in $\mathcal{F}$ contains $n$. Thus $|\mathcal{F}^{\,\updownarrow} \setminus \{\{1\}\}^{\,\uparrow}| \geqslant m$ and the proof is complete.\smallskip

\noindent {\textbf{Case 3.}} Suppose that each set in $\mathcal{F}$ contains $1$ and that $n \in F''$ for some $F'' \in \mathcal{F}$. The argument follows that of Case~2 closely. For $I = [n-1] \setminus F''$ and $J = \{n\}$, we must have that $(F'\setminus J) \cup I = [n-1]$ is in $\mathcal{F}$. Then $\{[n-1]\}^{\,\downarrow} \subseteq \mathcal{F}^{\,\updownarrow}$ and $|\{[n-1]\}^{\,\downarrow}|=2^{n-1}$. We will show that $|\mathcal{F}^{\,\updownarrow} \setminus \{[n-1]\}^{\,\downarrow}| \geqslant m$.  Let $\varphi: \mathcal{F} \rightarrow \mathcal{F}^{\,\updownarrow} \setminus \{[n-1]\}^{\,\downarrow}$ be the function defined by
\[\varphi(A)=
\left\{
  \begin{array}{ll}
    A \setminus \{1\} \quad& \hbox{if $n \in A$} \\
    A \cup \{n\}  & \hbox{if $n \notin A$.}
  \end{array}
\right.\]
For each $A \in \mathcal{F}$, $\varphi(A)$ is indeed in $\mathcal{F}^{\,\updownarrow} \setminus \{[n-1]\}^{\,\downarrow}$ because $n \in \varphi(A)$, $\varphi(A) \subseteq A$ if $n \in A$ and $A \subseteq \varphi(A)$ if $n \notin A$. Furthermore,  $\varphi$ is an injection because each set in $\mathcal{F}$ contains $1$. So the proof is complete.
\end{proof}

Next, we determine $|\mathcal{F}^{\,\updownarrow}|$ for families $\mathcal{F}$ of a particular form. We only require a very special case of this result for our proof of Theorem~\ref{T:isoperRecursive}, but the more general version we prove here will be useful later.

\begin{lemma}\label{L:joinResults}
Let $n$ and $k$ be integers with $0 \leqslant k \leqslant n$. Let $\mathcal{F}_1$ be a convex family of subsets of $[k]$ such that $[k] \in \mathcal{F}_1$, let $\mathcal{F}_2$ be a convex family of subsets of $[n] \setminus [k]$ such that $\emptyset \in \mathcal{F}_2$, and let $\mathcal{F}=\{F_1 \cup F_2: F_1 \in \mathcal{F}_1, F_2 \in \mathcal{F}_2\}$ be a family of subsets of $[n]$. Then $|\mathcal{F}|=|\mathcal{F}_1||\mathcal{F}_2|$ and
\[|\mathcal{F}^{\,\updownarrow}| = 2^{n-k}|\mathcal{F}_1|+2^{k}|\mathcal{F}_2|-|\mathcal{F}_1||\mathcal{F}_2|.\]
\end{lemma}

\begin{proof}
Obviously $|\mathcal{F}|=|\mathcal{F}_1||\mathcal{F}_2|$. Because $[k] \in \mathcal{F}_1$ and $\mathcal{F}_1$ is convex, $U \cap [k] \in \mathcal{F}_1$ for each $U \in \mathcal{F}^{\,\uparrow}$. Thus, since $\emptyset \in \mathcal{F}_2$, we have that $\mathcal{F}^{\,\uparrow}=\{A \cup B:A \in \mathcal{F}_1,B \subseteq [n] \setminus [k]\}$ and hence that $|\mathcal{F}^{\,\uparrow}|=2^{n-k}|\mathcal{F}_1|$. Similarly, because $\emptyset \in \mathcal{F}_2$ and $\mathcal{F}_2$ is convex, $D \setminus [k] \in \mathcal{F}_2$ for each $D \in \mathcal{F}^{\,\downarrow}$. Thus, since $[k] \in \mathcal{F}_1$, we have that $\mathcal{F}^{\,\downarrow}=\{A \cup B:A \subseteq [k],B \in \mathcal{F}_2\}$ and hence that $|\mathcal{F}^{\,\downarrow}|=2^k|\mathcal{F}_2|$. Furthermore, we can see that $\mathcal{F}^{\,\uparrow} \cap \mathcal{F}^{\,\downarrow} = \mathcal{F}$. So $|\mathcal{F}^{\,\updownarrow}|=|\mathcal{F}^{\,\uparrow}|+|\mathcal{F}^{\,\downarrow}|-|\mathcal{F}|$ and the result follows.
\end{proof}

We can now show that, for each $m \leqslant 2^{n-2}$, there exists a convex $(n,m)$-witness family that has the form given by Lemma~\ref{L:sandwich}. With this, we can finally prove Theorem~\ref{T:isoperRecursive}.

\begin{lemma}\label{L:niceMinimalFamily}
Let $m$ and $n$ be nonnegative integers such that $m \leqslant 2^{n-2}$. There is an $(n,m)$-witness family such that $\mathcal{F}$ is convex and $\mathcal{F} \subseteq \mathcal{C}$.
\end{lemma}

\begin{proof}
The result is trivial for $m=0$, so assume $m \geqslant 1$. Note that $|\mathcal{C}|=2^{n-2} \geqslant m$. So by beginning with $\mathcal{C}$ and iteratively deleting minimal sets, we can obtain a convex $(n,m)$-family $\mathcal{G}$ such that $\mathcal{G} \subseteq \mathcal{C}$ and $[n-1] \in \mathcal{G}$. Thus $|\mathcal{G}^{\,\updownarrow}|=2^{n-1}+m$ by Lemma~\ref{L:joinResults} with $k=n-1$, $\mathcal{F}_1=\mathcal{G}$ and $\mathcal{F}_2=\{\emptyset\}$. So $\Phi(n,m) \leqslant 2^{n-1}+m$. If $\Phi(n,m) = 2^{n-1}+m$, then the proof is complete by the existence of $\mathcal{G}$, so we may suppose that $\Phi(n,m) < 2^{n-1}+m$. By Lemma~\ref{L:canMinFamSF} there exists a strongly shifted convex $(n,m)$-witness family $\mathcal{F}$. Because $|\mathcal{F}^{\,\updownarrow}| < 2^{n-1}+m$, we have $\mathcal{F} \subseteq \mathcal{C}$ by Lemma~\ref{L:noSetsWith1}.
\end{proof}

\begin{proof}[\textbf{\textup{Proof of Theorem~\ref{T:isoperRecursive}.}}]
We may suppose that $n \geqslant 2$ since it is easy to check the values of $\Phi(n,m)$ given for $n \in \{0,1\}$. We consider two cases according to the value of $m$.\smallskip

\noindent {\textbf{Case 1.}} Suppose that $m \in \{0,\ldots,2^{n-2}\}$. By Lemma~\ref{L:sandwich} it suffices to show that $\Phi(n,m) \geqslant 2\Phi(n-2,m)+m$. By Lemma~\ref{L:niceMinimalFamily} there is an $(n,m)$-witness family $\mathcal{F}$ such that $\mathcal{F}$ is convex and $\mathcal{F}\ \subseteq \mathcal{C}$. Let $\mathcal{P} = \{F \setminus \{1\}:F \in \mathcal{F}\}$ be a family of subsets of $\{2,\ldots,n-1\}$. Because $\mathcal{F}\ \subseteq \mathcal{C}$ and $\mathcal{F}$ is convex, we have that $|\mathcal{P}|=m$ and $\mathcal{P}$ is convex. So
\[\Phi(n,m)=|\mathcal{F}^{\,\updownarrow}| = 2|\mathcal{P}^{\,\updownarrow}|+m \geqslant 2\Phi(n-2,m)+m\]
where the first equality holds because $\mathcal{F}$ is an $(n,m)$-witness family, the second equality holds by Lemma~\ref{L:sandwich}, and the inequality holds by the definition of $\Phi(n-2,m)$.\smallskip

\noindent {\textbf{Case 2.}} Suppose that $m \in \{2^{n-2}+1,\ldots,2^n\}$. Let $s$ be as defined in the theorem. Lemma~\ref{L:noSetsWith1} implies $\Phi(n,2^{n-2}) \geqslant 3\cdot2^{n-2}$. Thus $s < 2^{n-2}$ since $m \geqslant 2^{n-2}+1$. So the result follows by Lemma~\ref{L:selfConjugate}.
\end{proof}

Proving Corollary~\ref{C:isoperBounds} from Theorem~\ref{T:isoperRecursive} requires some care but no new ideas.

\begin{proof}[\textbf{\textup{Proof of Corollary~\ref{C:isoperBounds}}}]
First observe that $m \leqslant 2^n$ implies $m \leqslant \sqrt{2^n m}$ and hence we have
\[\mfrac{\sqrt{2^n}}{f(n,m)}=\mfrac{\sqrt{2^n}}{\sqrt{2^{n+2}m}-m} \leqslant \mfrac{\sqrt{2^n}}{\sqrt{2^{n+2}m}-\sqrt{2^{n}m}} = \mfrac{1}{\sqrt{m}}.\]
So we have $f(n,m)+\sqrt{2^n} \sim f(n,m)$ as $n \rightarrow \infty$ with $m=\omega(1)$.

It only remains to show that $f(n,m) \leqslant \Phi(n,m) \leqslant  f(n,m)+\sqrt{2^{n}}$. We do this by induction on $n$. It is routine to check that the result holds for $n \in \{0,1\}$, so assume that $n \geqslant 2$. For brevity, we say that $m$ is \emph{nice} if $n$ is even and $m$ is a perfect square or if $n$ is odd and $m$ is twice a perfect square. Note that $m$ is nice if and only if $f(n,m)=\sqrt{2^{n+2}m}-m$ is an integer.\smallskip

\noindent {\textbf{Case 1.}} Suppose that $m \in \{0,\ldots,2^{n-2}\}$. Then, by induction,
\[f(n-2,m) \leqslant \Phi(n-2,m) \leqslant f(n-2,m)+\sqrt{2^{n-2}}.\]
and, since $f(n,m)=2f(n-2,m)+m$, the result follows easily by applying Theorem~\ref{T:isoperRecursive}. Furthermore, if $m$ is nice, then $\Phi(n-2,m)=f(n-2,m)$ by induction and this implies $\Phi(n,m)=f(n,m)$.\smallskip

\noindent {\textbf{Case 2.}} Suppose that $m \in \{2^{n-2}+1,\ldots,2^n\}$. Let $s$ be as defined in Theorem~\ref{T:isoperRecursive}. Throughout this case we will make use of the easily checked fact that $f(n,x)$ is increasing in $x$ on the interval $[1,2^{n}]$. By Theorem~\ref{T:isoperRecursive}, to establish $\Phi(n,m) \geqslant f(n,m)$ it suffices to show that $s \leqslant s_0$ where
\begin{equation}\label{E:s0def}
  s_0 = 2^n-f(n,m) = 2^n-\sqrt{2^{n+2}m}+m = \bigl(\sqrt{2^n}-\sqrt{m}\,\bigr)^2.
\end{equation}
Note that $s_0<2^{n-2}$ because $m > 2^{n-2}$ and $f(n,2^{n-2})=3\cdot2^{n-2}$. By the definition of $s$, to show that $s \leqslant s_0$ it suffices to show that $\Phi(n,\lfloor s_0+1 \rfloor) > 2^n-m$. This is indeed the case, since
\begin{equation}\label{E:littlePhiBound}
\Phi\bigl(n,\lfloor s_0+1 \rfloor\bigr) \geqslant f(n,\lfloor s_0+1 \rfloor\bigr) > f(n,s_0) = \sqrt{2^{n+2}s_0}-s_0 = 2^{n}-m
\end{equation}
where the first inequality follows from Case~1 and the final equality follows by substituting $\sqrt{s_0}=\sqrt{2^n}-\sqrt{m}$ and $s_0 = 2^n-\sqrt{2^{n+2}m}+m$  by \eqref{E:s0def} and then simplifying. Furthermore, if $m$ is nice then  \eqref{E:s0def} implies that $s_0$ is nice and so from Case~1 we have $\Phi(n,s_0)=f(n,s_0)=2^n-m$ and $\Phi(n,s_0+1) \geqslant f(n,s_0+1) > 2^n-m$. This shows that $s=s_0$ and hence that $\Phi(n,m)=2^n-s_0=f(n,m)$.

By Theorem~\ref{T:isoperRecursive}, to establish $\Phi(n,m) \leqslant f(n,m)+\sqrt{2^n}$ it suffices to show that $s \geqslant s_0-\sqrt{2^n}$. This holds trivially if $s_0 \leqslant \sqrt{2^n}$, so we may suppose otherwise. So, by the definition of $s$, to show that $s \geqslant s_0-\sqrt{2^n}$ it suffices to show that $\Phi(n,\lceil s_0-\sqrt{2^n}\, \rceil) \leqslant 2^n-m$. Now
\begin{multline}\label{E:littlePhiBound2}
  \Phi\bigl(n,\bigl\lceil s_0-\sqrt{2^n}\,\bigr\rceil) \leqslant f(n,\bigl\lceil s_0-\sqrt{2^n}\,\bigr\rceil)+\sqrt{2^n} <\\ f(n,s_0-\sqrt{2^n}+1)+\sqrt{2^n}= \sqrt{2^{n+2}\bigl(s_0-\sqrt{2^n}+1\bigr)}-s_0-1+\sqrt{2^{n+2}}
\end{multline}
where the first inequality follows from Case~1. Now we have $(s_0-\sqrt{2^n}+1)^{1/2}<\sqrt{s_0}-1$ because squaring both sides and simplifying reveals this to be equivalent to $s_0<2^{n-2}$, which we know holds. Using this fact in \eqref{E:littlePhiBound2}, simplifying and recalling the final equality in \eqref{E:littlePhiBound} we have, as required,
\[\Phi\bigl(n,\bigl\lceil s_0-\sqrt{2^n}\,\bigr\rceil) \leqslant  \sqrt{2^{n+2}s_0}-s_0-1 = 2^{n}-m-1.\qedhere\]
\end{proof}

The term $\sqrt{2^n}$ in the upper bound in Corollary~\ref{C:isoperBounds} is chosen for convenience; we have not attempted to optimise it. However, we note that it is easy to deduce from Theorem~\ref{T:isoperRecursive} that $\Phi(n,m)=f(n,m)+(\frac{3}{2}\sqrt{2}-2)\sqrt{2^{n}}$ when $m=1$ and $n$ is odd. Thus the term cannot in general be decreased by more than a constant fraction. We now state an obvious consequence of Theorem~\ref{T:isoperRecursive} that will be useful in what follows.

\begin{lemma}\label{L:strictlyMonotonic}
For any integer $n \geqslant 2$ we have
\[0=\Phi(n,0) < \Phi(n,1) < \cdots < \Phi(n,2^{n-2})=3\cdot2^{n-2}.\]
\end{lemma}

\begin{proof}
Since $\Phi(n-2,0) \leqslant \Phi(n-2,1) \leqslant \cdots \leqslant \Phi(n-2,2^{n-2})$, it follows directly from Theorem~\ref{T:isoperRecursive} that $\Phi(n,0) < \Phi(n,1) < \cdots < \Phi(n,2^{n-2})$. By the equality asserted by Corollary~\ref{C:isoperBounds}, we have $\Phi(n,2^{n-2})=3\cdot2^{n-2}$.
\end{proof}

We conclude this section with Corollary~\ref{C:isoperExplicit} below, in which we give another upper bound on $\Phi(n,m)$ that is tight in a range of cases.

\begin{corollary}\label{C:isoperExplicit}
Let $n$ and $m$ be nonnegative integers such that $m \leqslant 2^n$. For each $m \in \{0,\ldots,2^n\}$, we have
\[\Phi(n,m) \leqslant \sqrt{2^{n+a}}+\sqrt{2^{n-a}}\,m-m\]
where $a$ is the least element of $\{0,\ldots,n\}$ such that $m < 2^{a+1}$ and $a \equiv n \mod{2}$. Furthermore, we have equality if $2^a-2^{\lceil a/2\rceil}-2^{\lfloor a/2 \rfloor}+2 \leqslant m \leqslant 2^a +2^{\lceil a/2 \rceil}+2^{\lfloor a/2 \rfloor}-1$.
\end{corollary}

\begin{proof}
We first establish the upper bound on $\Phi(n,m)$. Let $k=\frac{1}{2}(n+a)$. Note that $2^{k} \geqslant 2^{a+1} > m$ if $a<n$ and $2^{k} = 2^{n} \geqslant m$ if $a=n$. Thus, by beginning with $2^{[k]}$ and iteratively deleting minimal sets, we can obtain a convex family of subsets of $[k]$ such that $[k] \in \mathcal{F}_1$ and $|\mathcal{F}_1|=m$. Then applying Lemma~\ref{L:joinResults} with $\mathcal{F}_2=\{\emptyset\}$ gives an $(n,m)$-family $\mathcal{F}$ with $|\mathcal{F}^{\,\updownarrow}| = 2^{k}+2^{n-k}m-m$ and hence the upper bound holds.

To prove the claim of equality, we proceed by induction on $n$. It is routine to check that it holds when $n \in \{0,1\}$. So suppose that $n \geqslant 2$ and $2^a-2^{\lceil a/2\rceil}-2^{\lfloor a/2 \rfloor}+2 \leqslant m \leqslant 2^a +2^{\lceil a/2 \rceil}+2^{\lfloor a/2 \rfloor}-1$.\smallskip

\noindent {\textbf{Case 1.}} Suppose that $m \leqslant 2^{n-2}$. Then $0 \leqslant a \leqslant n-2$. So by induction we have $\Phi(n-2,m) =\sqrt{2^{n+a-2}}+\sqrt{2^{n-a-2}}m-m$ and the result follows by applying Theorem~\ref{T:isoperRecursive}.\smallskip

\noindent {\textbf{Case 2.}} Suppose that $m > 2^{n-2}$. Then $a \in \{n-2,n\}$. Let $s$ be as defined in Theorem~\ref{T:isoperRecursive}.

If $a=n-2$, then $2^{a}-2^{\lceil a/2 \rceil}-2^{\lfloor a/2 \rfloor}+1 \leqslant 2^{n-1}-m < 2^{n-2}$, bearing in mind the condition of this case. So we have $\Phi(n,2^{n-1}-m+1)=2^n-m+1$ from Case~1 and thus $s=2^{n-1}-m$ by Lemma~\ref{L:strictlyMonotonic}. So $\Phi(n,m)=2^{n-1}+m$ by Theorem~\ref{T:isoperRecursive} as required.

If $a = n$, then $2^{n}-2^{\lceil n/2 \rceil}-2^{\lfloor n/2 \rfloor}+2 \leqslant m \leqslant 2^n$. So we have $\Phi(n,0)=0$ obviously and $\Phi(n,1)=2^{\lceil n/2 \rceil}+2^{\lfloor n/2 \rfloor}-1>2^n-m$ from Case~1. Thus $s=0$ and $\Phi(n,m)=2^n$ by Theorem~\ref{T:isoperRecursive} as required.
\end{proof}


\section{Proof of Theorem~\ref{T:isoperQuick}}\label{S:quickProof}

Theorem~\ref{T:isoperQuick} will follow from Theorem~\ref{T:isoperRecursive}, but we first need to establish some properties of the functions $\delta_k$ defined in the statement of Theorem~\ref{T:isoperQuick}. We begin with some basic properties in Lemma~\ref{L:deltaProps} and then move on to a more involved property in Lemma~\ref{L:deltaRecursive}.

\begin{lemma}\label{L:deltaProps}\phantom{a}
\begin{itemize}
    \item[\textup{(i)}]
$\delta_k(0)=0$ and $\delta_k(k)=1$ for all integers $k \geqslant 1$.
    \item[\textup{(ii)}]
$2^t\delta_{2^t}(x)=x$ for all integers $t \geqslant 0$ and $x \in \{0,\ldots,2^t\}$.
    \item[\textup{(iii)}]
$2^t\delta_{2^t-1}(x)=x+1$ for all integers $t \geqslant 1$ and $x \in \{1,\ldots,2^t-1\}$.
    \item[\textup{(iv)}]
$2^t\delta_{k}(x+1)-(x+1) \geqslant 2^t\delta_{k}(x)-x$ for all integers $k$, $t$ and $x$ such that $1\leqslant k \leqslant 2^t$ and $x \in \{0,\ldots,k-1\}$.
\end{itemize}
\end{lemma}

\begin{proof}
An easy proof by induction on $k$ establishes (i). Induction on $t$ establishes (ii), and from this (iii) can then be proved by induction on $t$.

Observe that the inequality in (iv) is equivalent to $\delta_{k}(x+1)-\delta_k(x) \geqslant \frac{1}{2^t}$. This holds when $k=1$ (noting $t \geqslant 0$). When $k \geqslant 2$, applying \eqref{E:deltaDef} and simplifying, the statement to be proved is equivalent to $\delta_{\lfloor k/2 \rfloor}(x+1) - \delta_{\lfloor k/2 \rfloor}(x) \geqslant \frac{1}{2^{t-1}}$ if $x \leqslant \lfloor\frac{k}{2}\rfloor-2$, to $\delta_{\lceil k/2 \rceil}(x+1-\lfloor \frac{k}{2} \rfloor) - \delta_{\lceil k/2 \rceil}(x-\lfloor \frac{k}{2} \rfloor) \geqslant \frac{1}{2^{t-1}}$ if $x \geqslant \lfloor\frac{k}{2}\rfloor$, and to $1 - \delta_{\lfloor k/2 \rfloor}(\lfloor \tfrac{k}{2} \rfloor-1) \geqslant \frac{1}{2^{t-1}}$ if $x = \lfloor\frac{k}{2}\rfloor-1$ (using (i)). In each case this follows by induction, noting that $\lfloor \tfrac{k}{2} \rfloor \leqslant \lceil \tfrac{k}{2} \rceil \leqslant 2^{t-1}$ and, in the last case, that $1=\delta_{\lfloor k/2 \rfloor}(\lfloor \tfrac{k}{2} \rfloor)$.
\end{proof}



\begin{lemma}\label{L:deltaRecursive}
Let $k$, $q$ and $t$ be positive integers such that $k+q=2^t$, and let $\ell \in \{0,\ldots,k\}$. The greatest element $r$ of $\{0,\ldots,q\}$ such that $2^t\delta_{q}(r)-r \leqslant k-\ell$ is $q - 2^t\delta_{k}(\ell)+\ell$.
\end{lemma}

\begin{proof}
We proceed by induction on $t$. If $\ell=0$, then $q - 2^t\delta_{k}(\ell)+\ell=q$ by Lemma~\ref{L:deltaProps}(i) and the result can be seen to hold using Lemma~\ref{L:deltaProps}(i) and $2^t-q=k$. If $k=\ell=1$, then $q - 2^t\delta_{k}(\ell)+\ell=q-2^t+1=0$ by Lemma~\ref{L:deltaProps}(i) and the result can be seen to hold using Lemma~\ref{L:deltaProps}(iii). So we may assume that $\ell \geqslant 1$ and $k \geqslant 2$. If $q=1$, then $q - 2^t\delta_{k}(\ell)+\ell=1-(\ell+1)+\ell=0$ by Lemma~\ref{L:deltaProps}(iii) and the result holds by Lemma~\ref{L:deltaProps}(i), noting that $k=2^{t-1}-1$ and $\ell \geqslant 1$. So we may further assume that $q \geqslant 2$ and hence that $t \geqslant 2$.

Let $\ell \in \{0,\ldots,k\}$, and let $r$ be the greatest element of $\{0,\ldots,q\}$ such that $2^t\delta_{q}(r)-r \leqslant k-\ell$. We must show that $r=q - 2^t\delta_{k}(\ell)+\ell$. We will frequently and tacitly use the fact that $k+q=2^t$. We first note that
\begin{equation}\label{E:midway}
2^t\delta_{q}(\lfloor\tfrac{q}{2}\rfloor)-\lfloor\tfrac{q}{2}\rfloor = 2^{t-1}-\lfloor\tfrac{q}{2}\rfloor = \lceil\tfrac{k}{2}\rceil
\end{equation}
where the first equality follows by \eqref{E:deltaDef} and Lemma~\ref{L:deltaProps}(i). We consider two cases according to the value of $\ell$.\smallskip

\noindent \textbf{Case 1.} Suppose that $\ell \in \{1,\ldots,\lfloor\frac{k}{2}\rfloor\}$. Let $k'=\lfloor\tfrac{k}{2}\rfloor$ and $q'=\lceil\tfrac{q}{2}\rceil$, and note that $k'+q'=2^{t-1}$. Applying \eqref{E:deltaDef}, along with Lemma~\ref{L:deltaProps}(i) if $\ell = \lfloor\frac{k}{2}\rfloor$, we must show that $r=q - 2^{t-1}\delta_{k'}(\ell)+\ell$. Since $k-\ell \geqslant \lceil\frac{k}{2}\rceil$ we must have $r = \lfloor\tfrac{q}{2}\rfloor+r'$ for some $r' \in \{0,\ldots,q'\}$ by \eqref{E:midway}. Then, using \eqref{E:deltaDef},
\[2^t\delta_{q}(r)-r=2^{t-1}+2^{t-1}\delta_{q'}(r')-(\lfloor\tfrac{q}{2}\rfloor+r')=\lceil\tfrac{k}{2}\rceil+2^{t-1}\delta_{q'}(r')-r'.\]
Thus, by the definitions of $r$ and $r'$, we have that $r'$ is the greatest element of $\{0,\ldots,q'\}$ such that $2^{t-1}\delta_{q'}(r')-r' \leqslant k'-\ell$. By induction $r'=q' - 2^{t-1}\delta_{k'}(\ell)+\ell$, and hence $r=q - 2^{t-1}\delta_{k'}(\ell)+\ell$ as required.\smallskip

\noindent \textbf{Case 2.} Suppose that $\ell \in \{\lfloor\frac{k}{2}\rfloor+1,\ldots,k\}$. Let $k'=\lceil\tfrac{k}{2}\rceil$, $q'=\lfloor\frac{q}{2}\rfloor$ and $\ell'=\ell-\lfloor\tfrac{k}{2}\rfloor$, and note that $k'+q'=2^{t-1}$. Applying \eqref{E:deltaDef}, we must show that $r$ equals
\[q - 2^{t-1} -2^{t-1}\delta_{k'}(\ell')+\lfloor\tfrac{k}{2}\rfloor+\ell'=q' - 2^{t-1}\delta_{k'}(\ell')+\ell'.\]
Since $k-\ell \leqslant \lceil\frac{k}{2}\rceil-1$ we must have $r \leqslant \lfloor\tfrac{q}{2}\rfloor-1$ by \eqref{E:midway} and Lemma~\ref{L:deltaProps}(iv). So $2^t\delta_{q}(r)-r=2^{t-1}\delta_{q'}(r)-r$ by \eqref{E:deltaDef} and since  $k'-\ell'=k-\ell$, we have that $r$ is the greatest element of $\{0,\ldots,q'\}$ such that $2^{t-1}\delta_{q'}(r)-r \leqslant k'-\ell'$. Thus $r=q' - 2^{t-1}\delta_{k'}(\ell')+\ell'$ by induction as required.
\end{proof}

We are now ready to prove Theorem~\ref{T:isoperQuick}.

\begin{proof}[\textbf{\textup{Proof of Theorem~\ref{T:isoperQuick}.}}]
We proceed by induction on $n$. It is routine to check that the result holds for $n \in \{0,1\}$, so fix integers $n \geqslant 2$ and $m \in \{1,\ldots,2^n\}$. As in the theorem statement, let $\kappa=1$ if $n$ is even and $\kappa=2$ if $n$ is odd, and let $c$ be the positive integer such that $\kappa c(c-1) \leqslant m < \kappa c(c+1)$. Let $\nu=\lfloor \frac{n}{2} \rfloor$ and note that $2^\nu=\sqrt{2^n/\kappa}$. For brevity, for positive integers $a$ and $x$ such that $\kappa a(a-1) \leqslant x \leqslant \kappa a(a+1)$, we let
\[\varphi_a(x)=2a-1+2\delta_{2 \kappa a}\bigl(x-\kappa a(a-1)\bigr)\]
so that the theorem claims that $\Phi(n,m)=\kappa2^\nu\varphi_c(m)-m$.

\noindent \textbf{Case 1.}  Suppose that $m \leqslant 2^{n-2}$. Then by induction $\Phi(n-2,m)=\kappa2^{\nu-1}\varphi_c(m)-m$. So by Theorem~\ref{T:isoperRecursive} we have, as required,
\[\Phi(n,m)=2\Phi(n-2,m)+m=2(\kappa2^{\nu-1}\varphi_c(m)-m)+m=\kappa2^\nu\varphi_c(m)-m.\]
In particular, this implies that
\begin{equation}\label{E:phi1}
\Phi(n,1)= (\kappa+1)2^{\nu}-1
\end{equation}
and this will be important to note when considering the remaining two cases.\smallskip



\noindent \textbf{Case 2.}  Suppose that $2^{n-2} < m  \leqslant 2^n-\Phi(n,1)$.
As in Theorem~\ref{T:isoperRecursive}, let $s$ be the greatest element of $\{0,\ldots,2^{n-2}\}$ such that $\Phi(n,s) \leqslant 2^n-m$. Observe that $1 \leqslant s < 2^{n-2}$ by the condition of this case and the fact that $\Phi(n,2^{n-2})=3\cdot2^{n-2}$ by Lemma~\ref{L:strictlyMonotonic}. Define integers $d = 2^\nu-c$, $m_0=\kappa c (c-1)$, $m_1=\kappa c (c+1)$, $s_0=\kappa d (d-1)$ and $s_1=\kappa d (d+1)$. By the conditions of this case and \eqref{E:phi1} we can deduce that $2^{\nu-1} \leqslant c \leqslant 2^{\nu}-1$ and hence that $1 \leqslant d \leqslant 2^{\nu-1}$.

Now, for any $s' \in \{0,\ldots,s_1-s_0\}$ such that $1 \leqslant s_0+s' \leqslant 2^{n-2}$, we have
\begin{equation}\label{E:sPhi}
\Phi(n,s_0+s')=\kappa2^{\nu}\varphi_d(s_0+s')-(s_0+s')=2^n-m_1+\kappa2^{\nu+1}\delta_{s_1-s_0}(s')-s'
\end{equation}
where the first equality has been proved in Case 1 (when $s'=s_1-s_0$ note that $\varphi_{d}(s_1)=\varphi_{d+1}(s_1)=2d+1$ by Lemma~\ref{L:deltaProps}(i)) and the second equality can be verified by applying the definition of $\varphi_d$ and substituting for $s_0$ and $d$. When $d=1$ we have $s \geqslant 1 \geqslant s_0$ and, otherwise, setting $s'=0$ in \eqref{E:sPhi} gives $\Phi(n,s_0) = 2^n-m_1$ by Lemma~\ref{L:deltaProps}(i) and hence $s \geqslant s_0$ because $m < m_1$. When $d=2^{\nu-1}$ we have $s < 2^{n-2} < s_1$ and, otherwise, setting $s'=s_1-s_0$ in \eqref{E:sPhi} shows that
\[\Phi(n,s_1) = 2^n-m_1+\kappa2^{\nu+1}-s_1+s_0=2^n-m_0\]
where the first equality follows by Lemma~\ref{L:deltaProps}(i) and the second follows because $m_1-m_0+s_1-s_0=2\kappa(c+d)=\kappa2^{\nu+1}$. Thus, using  Lemma~\ref{L:strictlyMonotonic}, we have $s \leqslant s_1$ because $m \geqslant m_0$. So $s_0 \leqslant s \leqslant s_1$ and, noting that $s < 2^{n-2}$, it follows from the definition of $s$ and \eqref{E:sPhi} that $s=s_0+s''$ where $s''$ is the greatest element $s'$ of $\{0,\ldots,s_1-s_0\}$ such that $\kappa2^{\nu+1}\delta_{s_1-s_0}(s')-s' \leqslant m_1-m$. Applying Lemma~\ref{L:deltaRecursive} with $t=\lceil\frac{n}{2}\rceil+1$, $k=m_1-m_0$, $q=s_1-s_0$ and $\ell=m-m_0$ we have that $s'' = s_1-s_0-\kappa2^{\nu+1}\delta_{m_1-m_0}(m-m_0)+m-m_0$ (note $2^t=\kappa2^{\nu+1}$). Hence $s=s_1-\kappa2^{\nu+1}\delta_{m_1-m_0}(m-m_0)+m-m_0$. By Theorem~\ref{T:isoperRecursive}, $\Phi(n,m)=2^n-s$ and, by substituting for $s$, $s_1$, $m_0$ and $d$, this is equivalent to $\Phi(n,m)=\kappa2^{\nu+1}\varphi_c(m)-m$ as asserted by the theorem.\smallskip

\noindent \textbf{Case 3.}  Suppose that $m > 2^n-\Phi(n,1)$. Then $s=0$ by definition and hence $\Phi(n,m)=2^n$ by Theorem~\ref{T:isoperRecursive}. So we only need to show that $\kappa2^\nu\varphi_c(m)-m=2^n$.  Now,
\begin{equation}\label{E:case3Calc}
\kappa2^{\nu}\varphi_c(m)=
\left\{
  \begin{array}{ll}
    2^{n+1}-\kappa2^\nu+\kappa2^{\nu+1}\delta_{\kappa2^{\nu+1}}(m-2^n+\kappa2^{\nu}) & \hbox{if $c=2^{\nu}$} \\
    2^{n+1}-3\kappa2^\nu+\kappa2^{\nu+1}\delta_{\kappa2^{\nu+1}-2\kappa}(m-2^n+3\kappa2^{\nu}-2\kappa) & \hbox{if $c=2^{\nu}-1$.}
  \end{array}
\right.
\end{equation}
When $c=2^{\nu}$, we have $\kappa2^{\nu+1}\delta_{\kappa2^{\nu+1}}(x)=x$ for each $x \in \{0,\ldots,\kappa2^{\nu+1}\}$ by Lemma~\ref{L:deltaProps}(ii), and using this fact in \eqref{E:case3Calc} shows that $\kappa2^\nu\varphi_c(m)-m=2^n$ as required. So we can suppose that $c<2^{\nu}$. Then, using the condition of this case and \eqref{E:phi1}, we have that $c = 2^\nu-1$ and that $m-2^n+3\kappa2^{\nu}-2\kappa$ is at least $2^\nu$ if $n$ is even and is at least $3\cdot2^\nu-2$ if $n$ is odd. Using \eqref{E:deltaDef} and Lemma~\ref{L:deltaProps}(iii) we can deduce $2^{\nu+1}\delta_{2^{\nu+1}-2}(x)=x+2$ for each $x \in \{2^{\nu},\ldots,2^{\nu+1}-2\}$ and $2^{\nu+2}\delta_{2^{\nu+2}-4}(x)=x+4$ for each $x \in \{3\cdot2^\nu-2,\ldots,2^{\nu+2}-4\}$. Considering cases according to the parity of $n$ and using these facts in \eqref{E:case3Calc}, we again have $\kappa2^\nu\varphi_c(m)-m=2^n$ as required.
\end{proof}


\section{Proof of Theorem~\ref{T:totalOrdering}}\label{S:orderProof}

Let $n \geqslant 2$ be an integer. To prove Theorem~\ref{T:totalOrdering}, we will recursively construct the chain $\mathcal{F}_0 \subsetneq \cdots \subsetneq \mathcal{F}_{2^n}$ of families of subsets of $[n]$ with the appropriate properties from a chain $\mathcal{P}_0 \subsetneq \cdots \subsetneq \mathcal{P}_{2^{n-2}}$ of families of subsets of $[n-2]$ with the appropriate properties. For $m \in \{0,\ldots,2^{n-2}\}$ we will form $\mathcal{F}_m$ by applying Lemma~\ref{L:sandwich} to $\mathcal{P}_m$ (with the ground set suitably relabelled). Then the key families amongst those in $\{\mathcal{F}_{2^{n-2}+1},\ldots,\mathcal{F}_{2^{n}}\}$ will be formed by taking the conjugates of the families in $\{\mathcal{F}_0,\ldots,\mathcal{F}_{2^{n-2}}\}$ according to a certain notion of conjugacy which we now proceed to define.

For any family $\mathcal{F}$ of subsets of $[n]$, we denote by $\mathcal{F}^*$ the family $2^{[n]} \setminus (\rho(\mathcal{F}))^{\,\updownarrow}$. We think of $\mathcal{F}^*$ as the conjugate of $\mathcal{F}$. Notice that this notation is consistent with our definition of $\mathcal{C}^*_{n,a}$ from the introduction because
\begin{align}
  \mathcal{C}_{n,a} &= \{A \subseteq [n]: [\tfrac{n-a}{2}] \subseteq A \subseteq [\tfrac{n+a}{2}]\} \notag \\
  (\mathcal{C}_{n,a})^{\,\updownarrow} &= \{A \subseteq [n]: [\tfrac{n-a}{2}] \subseteq A \text{ or } A \subseteq [\tfrac{n+a}{2}]\} \notag \\
  \rho((\mathcal{C}_{n,a})^{\,\updownarrow}) &= \{A \subseteq [n]: \{\tfrac{n+a}{2}+1,\ldots,n\} \subseteq A \text{ or } A \subseteq \{\tfrac{n-a}{2}+1,\ldots,n\}\} \notag \\
  2^{[n]} \setminus \rho((\mathcal{C}_{n,a})^{\,\updownarrow}) &= \{A \subseteq [n]: \{\tfrac{n+a}{2}+1,\ldots,n\} \nsubseteq A \text{ and } A \nsubseteq \{\tfrac{n-a}{2}+1,\ldots,n\}\}. \label{E:coreConj}
\end{align}
Further, for any integer $\ell \in \{0,\ldots,2^{n-2}\}$, we abbreviate $2^n-\Phi(n,\ell)$ to $\ell^*$, where the value of $n$ will always be clear from context. We observe some basic properties of our conjugacy transformation.


\begin{lemma}\label{L:conjProps}
Let $\mathcal{F}_\ell$ be a convex $(n,\ell)$-witness family with $\ell < 2^{n-2}$. Then $\mathcal{F}^*_\ell$ is a convex $(n,\ell^*)$-witness family and $\Phi(n,m)=2^n-\ell$ for each $m \in \{(\ell+1)^*+1,\ldots,\ell^*\}$.
\end{lemma}

\begin{proof}
Given the definitions of $\ell^*$ and $(\ell+1)^*$, saying that $\Phi(n,m)=2^n-\ell$ for each $m \in \{(\ell+1)^*+1,\ldots,\ell^*\}$ is simply a restatement of the second part of the recurrence in Theorem~\ref{T:isoperRecursive}. Note that the set $\{(\ell+1)^*+1,\ldots,\ell^*\}$ is nonempty by Lemma~\ref{L:strictlyMonotonic}.

Since $|(\mathcal{F}_\ell)^{\,\updownarrow}|=\Phi(n,\ell)$, we have $|\mathcal{F}^*_\ell|=2^n-\Phi(n,\ell)=\ell^*$ by the definition of $\mathcal{F}^*_\ell$. Since no set in $\mathcal{F}^*_\ell$ is in $(\rho(\mathcal{F}_\ell))^{\,\updownarrow}$, no set in $\rho(\mathcal{F}_\ell)$ is in $(\mathcal{F}^*_\ell)^{\,\updownarrow}$ and hence $|(\mathcal{F}^*_\ell)^{\,\updownarrow}| \leqslant 2^n-\ell = \Phi(n,\ell^*)$. So $\mathcal{F}^*_\ell$ is an $(n,\ell^*)$-witness family. Finally, if $\mathcal{F}^*_\ell$ were not convex then there would be sets $F_1, F_2 \in 2^{[n]} \setminus (\rho(\mathcal{F}_\ell))^{\,\updownarrow}$ and $A \in (\rho(\mathcal{F}_\ell))^{\,\updownarrow}$ such that $F_1 \subseteq A \subseteq F_2$. But this is impossible since $F_1 \in (\rho(\mathcal{F}_\ell))^{\,\downarrow}$ if $A \in (\rho(\mathcal{F}_\ell))^{\,\downarrow}$ and $F_2 \in (\rho(\mathcal{F}_\ell))^{\,\uparrow}$ if $A \in (\rho(\mathcal{F}_\ell))^{\,\uparrow}$.
\end{proof}

The families obtained via Lemma~\ref{L:sandwich} and their conjugates will form a subchain of the chain we require, but there will be spaces that need to be filled in. The final tool that we need for our proof of Theorem~\ref{T:totalOrdering} will allow us to do this.

\begin{lemma}\label{L:interpolate}
Let $\mathcal{F}_i$ be a convex $(n,i)$-family and $\mathcal{F}_j$ be a convex $(n,j)$-family such that $\mathcal{F}_i \subsetneq \mathcal{F}_j$. There exist convex families $\mathcal{F}_{i+1},\ldots,\mathcal{F}_{j-1}$ such that $|\mathcal{F}_m|=m$ for each $m\in \{i+1,\ldots,j-1\}$ and $\mathcal{F}_i \subsetneq \mathcal{F}_{i+1} \subsetneq \cdots \subsetneq \mathcal{F}_{j-1} \subsetneq \mathcal{F}_{j}$.
\end{lemma}

\begin{proof}
Fix a value of $i$. The result is trivially true when $j=i+1$, so we assume inductively that it holds when $j = h$ for some $h \in \{i+1,\ldots,2^n-1\}$ and show it holds when $j=h+1$. Given convex families $\mathcal{F}_i$ and $\mathcal{F}_{h+1}$, let $\mathcal{F}_{h}=\mathcal{F}_{h+1} \setminus \{A\}$ where $A$ is a set in $\mathcal{F}_{h+1} \setminus \mathcal{F}_i$ such that $A$ is minimal or maximal in $\mathcal{F}_{h+1}$. Such a set must exist because, since $\mathcal{F}_i \subsetneq \mathcal{F}_{h+1}$, if each minimal or maximal set in $\mathcal{F}_{h+1}$ was in $\mathcal{F}_i$, then $\mathcal{F}_i$ could not be convex. Note that $\mathcal{F}_h$ is convex because $A$ is minimal or maximal in $\mathcal{F}_{h+1}$. Now, by induction, there exist convex families $\mathcal{F}_{i+1},\ldots,\mathcal{F}_{h-1}$ such that $|\mathcal{F}_m|=m$ for each $m\in \{i+1,\ldots,h-1\}$ and $\mathcal{F}_i \subsetneq \mathcal{F}_{i+1} \subsetneq \cdots \subsetneq \mathcal{F}_{h-1} \subsetneq \mathcal{F}_{h}$. The families  $\mathcal{F}_{i+1},\ldots,\mathcal{F}_{h}$ show that the result holds for $j=h+1$.
\end{proof}

\begin{proof}[\textbf{\textup{Proof of Theorem~\ref{T:totalOrdering}.}}]
We prove the result by induction on $n$. It is easy to verify the result holds for $n=0$ and $n=1$. Assume inductively that, for some integer $n\geqslant 2$, there is a chain of families $\mathcal{P}_0 \subsetneq \cdots \subsetneq \mathcal{P}_{2^{n-2}}$ such that $\mathcal{P}_m$ is a convex $(n-2,m)$-witness family for each $m \in \{0,\ldots,2^{n-2}\}$ and $\mathcal{P}_{2^a}=\mathcal{C}_{n-2,a}$ for each $a \in \{0,\ldots,n-4\}$ such that $a \equiv n \mod{2}$ (note $|\mathcal{C}_{n-2,a}|=2^a$). Obviously $\mathcal{P}_{2^{n-2}}=\mathcal{C}_{n-2,n-2}=2^{[n-2]}$.


We will first define a subchain of the chain $\mathcal{F}_0 \subsetneq \cdots \subsetneq \mathcal{F}_{2^n}$ we desire. For each $\ell \in \{0,\ldots,2^{n-2}\}$, let $\mathcal{F}_\ell$ be the $(n,m)$-family given by $\{\{1\} \cup P':P' \in \mathcal{P}'_\ell\}$ where $\mathcal{P}'_\ell=\{\sigma(P):P \in \mathcal{P_\ell}\}$ and $\sigma(P)=\{x+1:x\in P\}$. We claim that
\begin{equation}\label{E:famSeq}
\mathcal{F}_0 \subsetneq \mathcal{F}_1 \subsetneq \cdots \subsetneq \mathcal{F}_{2^{n-2}} =  \mathcal{F}_{2^{n-2}}^* \subsetneq \mathcal{F}_{2^{n-2}-1}^* \subsetneq \cdots \subsetneq \mathcal{F}_0^*
\end{equation}
is a chain of families of subsets of $[n]$. Observe that $\mathcal{F}_{2^{n-2}}^*=\mathcal{F}_{2^{n-2}}$ by \eqref{E:coreConj}. Since $\mathcal{P}_0 \subsetneq \cdots \subsetneq \mathcal{P}_{2^{n-2}}$, we have $\mathcal{F}_0 \subsetneq \cdots \subsetneq \mathcal{F}_{2^{n-2}}$. Thus we also have $\rho(\mathcal{F}_0) \subsetneq \cdots \subsetneq \rho(\mathcal{F}_{2^{n-2}})$ and hence $\mathcal{F}_{2^{n-2}}^* \subseteq \mathcal{F}_{2^{n-2}-1}^* \subseteq \cdots \subseteq \mathcal{F}_0^*$. So, in fact, we have $\mathcal{F}_{2^{n-2}}^* \subsetneq \mathcal{F}_{2^{n-2}-1}^* \subsetneq \cdots \subsetneq \mathcal{F}_0^*$ because $|\mathcal{F}^*_\ell|=\ell^*$ for each $\ell \in \{0,\ldots,2^{n-2}\}$ by Lemma~\ref{L:conjProps} and $(2^{n-2})^*<(2^{n-2}-1)^*<\cdots<0^*$ by Lemma~\ref{L:strictlyMonotonic}. Thus \eqref{E:famSeq} is indeed a chain as claimed. For each nonnegative integer $a \in \{0,\ldots,n-2\}$ with $a \equiv n \mod{2}$, we have $\mathcal{F}_{2^a}=\mathcal{C}_{n,a}$ since $\mathcal{P}_{2^a}=\mathcal{C}_{n-2,a}$. Thus \eqref{E:famSeq} includes the families $\mathcal{C}_{n,a}$ and $\mathcal{C}^*_{n,a}$ for each $a \in \{0,\ldots,n-2\}$ such that $a \equiv n \mod{2}$.

Each family in \eqref{E:famSeq} is a convex witness family by the definition of $\mathcal{P}_0,\ldots,\mathcal{P}_{2^{n-2}}$ and Lemmas~\ref{L:sandwich} and \ref{L:conjProps}. We claim we can extend \eqref{E:famSeq} to the desired chain $\mathcal{F}_0 \subsetneq \cdots \subsetneq \mathcal{F}_{2^n}$ by, for each $\ell \in \{0,\ldots,2^{n-2}\}$, setting $\mathcal{F}_{\ell^*} = \mathcal{F}_{\ell}^*$ and interpolating families $\mathcal{F}_{(\ell+1)^*+1}, \ldots, \mathcal{F}_{\ell^*-1}$ between $\mathcal{F}_{(\ell+1)^*}$ and $\mathcal{F}_{\ell^*}$ such that
\[\mathcal{F}_{\ell+1}^* = \mathcal{F}_{(\ell+1)^*} \subsetneq \mathcal{F}_{(\ell+1)^*+1} \subsetneq \cdots \subsetneq \mathcal{F}_{\ell^*-1} \subsetneq \mathcal{F}_{\ell^*} = \mathcal{F}_{\ell}^*\]
is a chain of families for which $|\mathcal{F}_m|=m$ and $\mathcal{F}_m$ is convex for each integer $m$ with $(\ell+1)^* < m < \ell^*$. Lemma~\ref{L:interpolate} guarantees such families exist. For each integer $m$ with $(\ell+1)^* < m \leqslant \ell^*$, $\mathcal{F}_m$ will be a witness family because $\Phi(n,m)=2^n-\ell$ by Lemma~\ref{L:conjProps} and $|(\mathcal{F}_m)^{\,\updownarrow}| \leqslant |(\mathcal{F}_{\ell}^*)^{\,\updownarrow}|=2^n-\ell$  since $\mathcal{F}_m \subseteq \mathcal{F}_{\ell}^*$. So we can indeed construct a chain $\mathcal{F}_0 \subsetneq \cdots \subsetneq \mathcal{F}_{2^n}$ with the appropriate properties.
\end{proof}

\section{Cross-Sperner families}\label{S:CS}

Our results also give an answer to a problem raised by Gerbner et al.\ in \cite{GerLemPalPatSze}. Let $\mathcal{F}$ and $\mathcal{G}$ be families of subsets of $[n]$. We say the pair $(\mathcal{F},\mathcal{G})$ is \emph{cross-Sperner} if $F \nsubseteq G$ and $G \nsubseteq F$ for all $F \in \mathcal{F}$ and $G \in \mathcal{G}$. Pairs of cross-Sperner families have been studied in \cite[\S8]{AhlZha} and \cite{GerLemPalPatSze}. In \cite[\S1]{GerLemPalPatSze}, Gerbner et al.\ raised the question of determining the maximum possible value of $|\mathcal{G}|$ when $|\mathcal{F}|=m$ and $(\mathcal{F},\mathcal{G})$ is cross-Sperner. We denote this maximum value by $g(n,m)$. Observe that $(\mathcal{F},\mathcal{G})$ is cross-Sperner if and only if $\mathcal{G} \subseteq 2^{[n]} \setminus \mathcal{F}^{\,\updownarrow}$. From this it is clear that $g(n,m)=2^n-\Phi(n,m)$ and so our work here gives a complete solution to their question. The question of Gerbner et al.\ arose out of their study of the maximum value of $|\mathcal{F}|+|\mathcal{G}|$ under the additional condition that $\mathcal{F}$ and $\mathcal{G}$ are both nonempty (without this assumption it is easy to see that this maximum value is $2^n$). They proved Theorem~\ref{T:ImproveGerbnerEtAl} below under the assumption that $n$ is large and stated that they believed that in fact it held for all $n$. We are able to confirm their belief.


\begin{theorem}\label{T:ImproveGerbnerEtAl}
Let $(\mathcal{F},\mathcal{G})$ be a cross-Sperner pair of families of subsets of $[n]$ such that neither $\mathcal{F}$ nor $\mathcal{G}$ is empty. Then $n\geqslant 2$ and
\[|\mathcal{F}|+|\mathcal{G}| \leqslant 2^n-2^{\lceil n/2 \rceil} - 2^{\lfloor n/2 \rfloor}+2.\]
Furthermore, for $n \neq 3$, we have equality if and only if one $\mathcal{F}$ or $\mathcal{G}$ consists of exactly one set $A$ of
size $\lceil \frac{n}{2} \rceil$ or $\lfloor \frac{n}{2} \rfloor$ and the other family consists of all subsets of $[n]$ that are neither supersets nor subsets of $A$.
\end{theorem}

\begin{proof}
It is routine to check that $n \geqslant 2$ and that the result holds for $n \in \{2,3\}$, so suppose $n \geqslant 4$.
Suppose without loss of generality that $|\mathcal{F}| \leqslant |\mathcal{G}|$ and let $m=|\mathcal{F}|$. Note that $m \leqslant 2^{n-2}$ for otherwise we would have $|\mathcal{G}| \leqslant 2^n-\Phi(n,2^{n-2}) < 2^{n-2}$ using Lemma~\ref{L:strictlyMonotonic}. By the definition of $g(n,m)$, we have $|\mathcal{F}|+|\mathcal{G}| \leqslant g(n,m)+m$. Observe that
\begin{equation}\label{E:GerbnerEtAl}
g(n,1)+1=2^n-\Phi(n,1)+1=2^n-2^{\lceil n/2 \rceil} - 2^{\lfloor n/2 \rfloor}+2
\end{equation}
where the last equality is a rephrasing of \eqref{E:phi1}. We consider two cases according to whether $m=1$.

\noindent \textbf{Case 1.} Suppose that $m=1$. Then, $|\mathcal{F}|+|\mathcal{G}| \leqslant g(n,1)+1$ and the bound of the theorem holds by \eqref{E:GerbnerEtAl}. If $\mathcal{F}=\{A\}$ for some subset $A$ of $[n]$, then $|\mathcal{F}^{\,\updownarrow}|=2^{k}+2^{n-k}-1$ where $k=|A|$. Using this it is easy to confirm that we have equality in this bound if and only if $\mathcal{F}=\{A\}$ and $|A| \in \{\lfloor \frac{n}{2}\rfloor,\lceil \frac{n}{2} \rceil\}$.\smallskip

\noindent \textbf{Case 2.} Suppose that $m \in \{2,\ldots,2^{n-2}\}$. Since $|\mathcal{F}|+|\mathcal{G}| \leqslant g(n,m)+m$, by \eqref{E:GerbnerEtAl} it suffices to show that $g(n,m)+m<g(n,1)+1$ (Gerbner et al.\ were able to do this only under the assumption that $n$ is large). Using \eqref{E:GerbnerEtAl} and the lower bound of Corollary~\ref{C:isoperBounds} we can deduce that $\Phi(n,2)-2>\Phi(n,1)-1$. Furthermore, from Lemma~\ref{L:strictlyMonotonic} we have $\Phi(n,m)-m \geqslant \Phi(n,2)-2$. So $\Phi(n,m)-m>\Phi(n,1)-1$ and hence $g(n,m)+m<g(n,1)+1$ as required.
\end{proof}

\section{Conclusion}\label{S:conc}

It is clear from the arbitrary choices afforded by the proof of Theorem~\ref{T:totalOrdering}, that the total ordering whose existence it asserts is by no means unique. It can also be shown that the families $\mathcal{C}_{n,a}$ and $\mathcal{C}^*_{n,a}$ are not the unique witness families of their respective sizes. In fact, for even values of $n$, applying Lemma~\ref{L:joinResults} with $k=\frac{n}{2}$ and any choice of $\mathcal{F}_1$ and $\mathcal{F}_2$ such that $|\mathcal{F}_1|=|\mathcal{F}_2|=c$ will produce an $(n,c^2)$-witness family $\mathcal{F}$ (it can be checked that $|\mathcal{F}^{\,\updownarrow}|=|\Phi(n,c^2)|$ using the equality in Corollary~\ref{C:isoperBounds}). Similarly, for odd values of $n$, applying Lemma~\ref{L:joinResults} with $k=\frac{n-1}{2}$ and any choice of $\mathcal{F}_1$ and $\mathcal{F}_2$ such that $|\mathcal{F}_1|=c$ and $|\mathcal{F}_2|=2c$ will produce an $(n,2c^2)$-witness family. This allows many different witness families to be produced. This contrasts with the Kruskal-Katona problem for which it is known that the only families of $\binom{x}{k}$ $k$-sets with minimum shadow size are those that comprise all $k$-subsets of an $x$-set (see \cite{Kee} for further results). Likewise, it is known that the Hamming balls are the only families of their respective sizes for which the inequality in Harper’s theorem holds with equality (see \cite{Rat} for further results). An easy generalisation of the proof of Lemma~\ref{L:noSetsWith1} does show, however, that the families $\mathcal{C}_{n,a}$ are the unique strongly shifted witness families of their respective sizes. By analogy to Harper's theorem, it would be of interest to find a concise definition for a total ordering of the subsets of $[n]$ that induces a chain of families satisfying the conditions of Theorem~\ref{T:totalOrdering}.\bigskip

\noindent\textbf{Acknowledgments.}
Thanks to Ian Roberts for helpful discussions and comments. Adam Gowty was supported by an Australian Government Research Training Program Scholarship. Daniel Horsley was supported by Australian Research Council grants FT160100048 and DP220102212.

