%! TEX root = Combi.tex
% vim: tw=50
% 22/10/2024 09AM

``\Gls{colex} prefers 1 to 2'' inspires:

\begin{fcdefn}[$ij$-compression]
  \glssymboldefn{Cij}%
  \glsnoundefn{ijc}{$ij$-compression}{$ij$-compressions}%
  Fix $1 \le i < j \le n$. The
  \emph{$ij$-compression} $C_{ij}$ is defined as
  follows:
  
  For $A \in X\rsubs$, set
  \[
    C_{ij}(A) = \begin{cases}
      A \cup i - j & \text{if $j \in A$, $i \notin
      A$} \\
      A & \text{otherwise}
    \end{cases}
  ,\]
  and for $\mathcal{A} \subset X\rsubs$, set
  \[
    C_{ij}(\mathcal{A}) = \{C_{ij}(A) : A \in
    \mathcal{A}\} \cup \{A \in \mathcal{A} :
    C_{ij}(A) \in A\}
  .\]
\end{fcdefn}

Note that the second part of the union in
$\Cij(\mathcal{A})$ is because we need to make
sure that we ``replace $j$ by $i$ where
possible''.

\begin{center}
  \includegraphics[width=0.6\linewidth]{images/4af548aef06046bd.png}
\end{center}

\begin{example*}
  If $\mathcal{A} = \{123, 134, 234, 235, 146,
  567\}$ then $\Cij[12](\mathcal{A}) = \{123, 134,
  234, 135, 146, 567\}$.
\end{example*}

So $\Cij(\mathcal{A}) \subset X\rsubs$, and
$|\Cij(\mathcal{A})| = |\mathcal{A}|$.

Say $\mathcal{A}$ is \emph{$ij$-compressed} if
$\Cij(\mathcal{A}) = \mathcal{A}$.

\begin{fclemma}[]
  \label{lemma_1_4}
  % Lemma 1 4
  Assuming:
  - $\mathcal{A} \subset X\rsubs$
  - $1 \le i < j \le n$
  Then:
  $|\shadow \Cij(\mathcal{A})| \le |\shadow
  \mathcal{A}|$.
\end{fclemma}

\begin{proof}
  Write $\mathcal{A}'$ for $\Cij(\mathcal{A})$.
  Let $B \in \shadow \mathcal{A}' - \shadow
  \mathcal{A}$. We'll show that $i \in B$, $j
  \notin B$ and $B \cup j - i \in \shadow
  \mathcal{A} - \shadow \mathcal{A}'$. [Then
  done].
  \begin{center}
    \includegraphics[width=0.6\linewidth]{images/0ef7288d9c0445a9.png}
  \end{center}
  Have $B \cup x \in \mathcal{A}'$ for some $x$,
  with $B \cup x \notin \mathcal{A}$ (as $B \notin
  \shadow \mathcal{A}$). So $i \in B \cup x$, $j
  \notin B \cup x$, and $(B \cup x) \cup j - i \in
  \mathcal{A}$.

  Cannot have $x = i$, else $(B \cup x) \cup j - i
  = B \cup j$, giving $B \in \shadow \mathcal{A}$,
  contradiction.

  Hence we have $i \in B$, $j \notin B$.

  Also, $B \cup j - i \in \shadow \mathcal{A}$,
  since $(B \cup x) \cup j - i \in \mathcal{A}$.
  
  Suppose $B \cup j - i \in \shadow \mathcal{A}'$:
  so $(B \cup j - i) \cup y \in \mathcal{A}'$ for
  some $y$. Cannot have $y = i$, else $B \cup j
  \in \mathcal{A}'$ -- so $B \cup j \in
  \mathcal{A}$ (as $j \in B \cup j$),
  contradicting $B \notin \shadow \mathcal{A}$.
  Hence $j \in (B \cup j - i) \cup y$ and $i
  \notin (B \cup j - i) \cup y$.

  Whence both $(B \cup j - i) \cup y$ and $B \cup
  y$ belong to $\mathcal{A}$ (by definition of
  $\mathcal{A}'$), contradicting $B \notin \shadow
  \mathcal{A}$.
\end{proof}

\begin{remark*}
  Actually showed that $\shadow \Cij(A) \subset
  \Cij \shadow \mathcal{A}$.
\end{remark*}

\begin{fcdefn}[Left-compressed]
  \glsadjdefn{leftc}{left-compressed}{family}%
  Say $\mathcal{A} \subset X\rsubs$ is
  \emph{left-compressed} if $\Cij(\mathcal{A}) =
  \mathcal{A}$ for all $i < j$.
\end{fcdefn}

\begin{fccoro}[]
  \label{coro_1_5}
  % Corollary 1 5
  Assuming:
  - $\mathcal{A} \subset X\rsubs$.
  Then:
  there exists a \gls{leftc} $\mathcal{B} \subset
  X\rsubs$ with $|\mathcal{B}| = |\mathcal{A}|$
  and $|\shadow \mathcal{B}| \le |\shadow
  \mathcal{A}|$.
\end{fccoro}

\begin{proof}
  Define a sequence $\mathcal{A}_0, \mathcal{A}_1,
  \ldots$ as follows. Set $\mathcal{A}_0 =
  \mathcal{A}$. Having defined $\mathcal{A}_0,
  \ldots, \mathcal{A}_k$, if $\mathcal{A}_k$
  \gls{leftc} then stop the sequence with
  $\mathcal{A}_k$.

  If not, choose $i < j$ such that $\mathcal{A}_k$
  is not \gls{ijc}, and set $\mathcal{A}_{k + 1} =
  \Cij(\mathcal{A}_k)$.

  This must terminate, because for example
  $\sum_{A \in \mathcal{A}_k} \sum_{i \in
  \mathcal{A}}$ is strictly decreasing in $k$.

  Final term $\mathcal{B} = \mathcal{A}_k$
  satisfies $|\mathcal{B}| = |\mathcal{A}|$, and
  $|\shadow \mathcal{B}| \le |\shadow
  \mathcal{A}|$ (by \cref{lemma_1_4})
\end{proof}

\begin{remark*}
  \phantom{}
  \begin{enumerate}[(1)]
    \item Or: among all $\mathcal{B} \subset
      X\rsubs$ with $|\mathcal{B}| =
      |\mathcal{A}|$ and $|\shadow \mathcal{B}|
      \le |\shadow \mathcal{A}|$, choose one with
      minimal $\sum_{A \in \mathcal{B}} \sum_{i \in
      A} i$.
    \item Can choose order of the $\Cij$ so that
      no $\Cij$ applied twice.
    \item Any initial segment of \gls{colex} is
      \gls{leftc}. Converse false, for example
      $\{123, 124, 125, 126\}$ (initial segment of
      \gls{lex}).
  \end{enumerate}  
\end{remark*}

These compressions only encode the idea
``\gls{colex} prefers $i$ to $j$ ($i < j$)'', but
this is also true for \gls{lex}.

So we try to come up with more compressions that
encode more of what \gls{colex} likes.

``\Gls{colex} prefers $23$ to $14$'' inspires:

\begin{fcdefn}[$UV$-compression]
  \glssymboldefn{CUV}%
  \glsnoundefn{uvc}{$UV$-compression}{$UV$-compressions}%
  \glsnoundefn{uvced}{$UV$-compressed}{NA}%
  Let $U, V \subset X$ with $|U| = |V|$, $U \cap V
  = \emptyset$ and $\max V
  > \max U$. We define the \emph{$UV$-compression}
  as follows: for $A \subset X$,
  \[
    C_{UV}(A) = \begin{cases}
      A \cup U - V & \text{if $V \subset A$, $U
      \cap A = \emptyset$} \\
      A & \text{otherwise}
    \end{cases}
  ,\]
  and for $\mathcal{A} \subset X\rsubs$, set
  \[
    C_{UV}(\mathcal{A}) = \{C_{UV}(A) : A \in
    \mathcal{A}\} \cup \{A \in \mathcal{A} :
    C_{UV} \in \mathcal{A}\}
  .\]
\end{fcdefn}

\begin{example*}
  If
  \[
    \mathcal{A} = \{123, 124, 147, 237, 238,
    149\}
  ,\]
  then
  \[
    \CUV[23,14](\mathcal{A}) = \{123,
    124, 147, 237, 238, 239\}
  .\]
\end{example*}

So $\CUV(\mathcal{A}) \subset X\rsubs$, and
$|\CUV(\mathcal{A})| = |\mathcal{A}|$.

Say $\mathcal{A}$ is \emph{$UV$-compressed} if
$\CUV(\mathcal{A}) = \mathcal{A}$.

Sadly, we can have $|\shadow \CUV(\mathcal{A})| >
|\shadow \mathcal{A}|$:

\begin{example*}
  $\mathcal{A} = \{147, 157\}$ has $|\shadow
  \mathcal{A}| = 5$, but $\CUV[23,14](\mathcal{A})
  = \{237, 147\}$ has $|\shadow \CUV[23,
  14](\mathcal{A})| = 6$.
\end{example*}

Despite this, we at least we do have the
following:

\begin{fclemma}[]
  \label{lemma_1_6}
  % Lemma 1 6
  Assuming:
  - $\mathcal{A} \subset X\rsubs$ is \gls{uvc} for
  all $U, V$ with $|U| = |V|$, $U \cap V =
  \emptyset$, $\max V > \max U$
  Then:
  $\mathcal{A}$ is an initial segment of
  \gls{colex}.
\end{fclemma}

\begin{proof}
  Suppose not. So there exists $A, B \in X\rsubs$
  with $B < A$, in \gls{colex} but $A \in
  \mathcal{A}$, $B \notin \mathcal{A}$.
  \begin{center}
    \includegraphics[width=0.6\linewidth]{images/c1f6a37bd8774f65.png}
  \end{center}
  Put $V = A \setminus B$, $U = B \setminus A$.

  Then $|V| = |U|$, and $U, V$ disjoint, and $\max
  V > \max U$ (since $\max(A \Delta B) \in
  \mathcal{A}$, by definition of \gls{colex}).

  So $\CUV(A) = B$, contradicting $\mathcal{A}$ is
  \gls{uvc}.
\end{proof}

