%! TEX root = PC.tex
% vim: tw=80 ft=tex
% 22/10/2025 09AM
%
  Let $\{A_{i_1}, \ldots, A_{i_s}\}$ be the events in the intersection $D$.
  Then
  \begin{align*}
    \Pbb(D \mid I)
    &= \prod_{j = 1}^{s} \Pbb(A_{i_j}^c \mid I \cap A_{i_1}^c \cap \cdots \cap
    A_{i_{j - 1}}^c) \\
    &= \prod_{j = 1}^{s} (1 - \Pbb(A_{i_j} \mid I \cap A_{i_1}^c \cap \cdots \cap
    A_{i_{j - 1}}^c))
  \end{align*}
  If no events in the intersection, then we are already done.
  Otherwise, we may apply the induction hypothesis to each term to get
  \[
    \frac{\Pbb(A_i)}{\Pbb(D \mid I)}
    \le \frac{x_i \prod_{j \sim i} (1 - x_j)}{\prod_{j = 1}^{s} (1 - x_{i_j})}
    \le x_i
    .
    \qedhere
  \]
\end{proof}

\begin{proof}[Proof of \nameref{lemma:lopsidedlocal}]
  Apply \nameref{lemma:lopsidedlocal} with weights $x_i = \frac{1}{\Delta + 1}$
  for all $i$.
  We just need to check that the probability upper bounds in
  \nameref{lemma:lopsidedlocal} hold.

  By calculus, we have
  \[
    \left( \frac{\Delta}{\Delta + 1} \right)^\Delta
    \ge \frac{1}{e}
  .\]
  Hence
  \begin{align*}
    \Pbb(A_i)
    &\le \frac{1}{e(\Delta + 1)} \\
    &\le \frac{1}{\Delta + 1} \left( \frac{\Delta}{\Delta + 1} \right)^\Delta \\
    &= \frac{1}{\Delta + 1} \left( 1 - \frac{1}{\Delta + 1} \right)^\Delta \\
    &\le \frac{1}{\Delta + 1} \prod_{A_i \sim A_j} \left( 1 - \frac{1}{\Delta +
    1} \right)
    \qedhere
  \end{align*}
\end{proof}

Now we will see another proof of $R(3, k) \ge c \frac{k^2}{(\log k)^2}$
(\cref{thm:r3kedgedeletion}), in order to give some intuition as to what kind of
situations are good for \gls{locallem}.
Roughly speaking, it works well if your events are ``weakly dependent'', or
there are ``not too many dependencies'' among them.

\begin{proof}[Proof of $R(3, k) \ge c \frac{k^2}{(\log k)^2}$ using
  \nameref{lemma:lopsidedlocal}]
  Recall that it is enough to show that for sufficiently large $n$, there exists
  a triangle-free graph on $n$ vertices with $\indnum(G) \le C\sqrt{n} \log n$
  (this was the statement of \cref{thm:r3kedgedeletionsuffices}).

  Set $k = C\sqrt{n} \log n$, and sample $G \sim G(n, p)$ where $p =
  \frac{\gamma}{\sqrt{n}}$, with $\gamma > 0$ is chosen later.

  Define the events:
  \begin{itemize}
    \item For each $T \in [n]^{(3)}$, define
      \[
        A_T
        = \text{``$T^{(2)} \subset G$''}
      .\]
    \item For each $I \in [n]^{(k)}$, define
      \[
        B_I
        = \text{``$I$ \gls{ind} in $G$''}
      .\]
  \end{itemize}
  Define the \gls{depg} $\mathcal{G}$:
  \begin{itemize}
    \item $A_T \sim A_S$ for $S, T \in [n]^{(3)}$ if $S^{(2)} \cap T^{(2)} \neq
      \emptyset$.
    \item $A_T \sim B_I$ for $T \in [n]^{(3)}, I \in [n]^{(k)}$ if $S^{(2)} \cap
      I^{(2)} \neq \emptyset$.
    \item $B_I \sim B_J$ for $I, J \in [n]^{(k)}$ if $I^{(2)} \cap J^{(2)} \neq
      \emptyset$.
  \end{itemize}
  Now note:
  \begin{itemize}
    \item The event $A_T$ is $\sim$ to $\le 3n$ $A_S$, $S \in [n]^{(3)}$.
    \item The event $A_T$ is $\sim$ to $\le 3n^{k - 2}$ $B_I$, $I \in [n]^{(k)}$.
    \item The event $B_I$ is $\sim$ to $\le k^2 n$ $A_S$, $S \in [n]^{(3)}$.
    \item The event $B_I$ is $\sim$ to $\le k^2 n^{k - 2}$ $B_J$, $J \in [n]^{(k)}$.
  \end{itemize}
  \begin{center}
    \includegraphics[width=0.3\linewidth]{images/4e41012ec83942b2.png}
  \end{center}
  We choose $x_T = 2p^3$ for all $T \in [n]^{(3)}$ (``we want to make it a bit
  bigger than the probability of it occuring so that we can afford the product
  stuff'') and $x_I = n^{-10k}$ for all $I \in [n]^{(k)}$.

  Then
  \begin{align*}
    x_T \prod_{\substack{S \in [n]^{(3)} \\ T \sim S}} (1 - x_S)
    \prod_{\substack{I \in [n]^{(k)} \\ I \sim T}} (1 - x_I)
    &\ge 2p^3 (1 - 2p^3)^{3n} (1 - n^{-10k})^{3n^{k - 2}} \\
    &\ge 2p^3 \exp(-(1 + o(1))[2p^3(3n) + 3n^{-10k} n^{k - 2}]) \\
    &= 2p^3 (1 + o(1)) \\
    &\ge p^3
  \end{align*}
  for large enough $n$.
  We have $\Pbb(B_I) = (1 - p)^{{k \choose 2}} \le e^{-p{k \choose 2}}$, so
  \begin{align*}
    x_I(1 - 2p^3)^{k^2n}(1 - n^{-10k})^{k^2 n^{k - 2}}
    &\ge n^{-10k} \exp(-(1 + o(1))[2p^3 k^2 n + \ub{n^{-10k} k^2 n^{k - 2}}_{\to
    0}]) \\
    &= n^{-10k} \exp(-(1 + o(1)) (2\gamma^2) pk^2)
  \end{align*}
  Note
  \[
    e^{-p{k \choose 2}}
    = \exp \left( -\frac{\gamma}{\sqrt{n}} k C \sqrt{n} (\log n) \right)
    = n^{-\gamma Ck}
  .\]
  First choose $\gamma$ small so $e^{-2\gamma^2 pk} \gg e^{-p{k \choose 2}
  \half}$, and then choose $C \gg \frac{1}{\gamma}$, then done.
\end{proof}

\newpage
\section{Upper bounds on $R(3, k)$}

\begin{fcthm}[Ajtai-Komlós-Szemerédi, 1980s + Shearer 80s]
  % [Ajtai-Koml\'{o}s-Szemer\'{e}di, 1980s + Shearer 80s]
  $R(3, k) \le (1 + o(1)) \frac{k^2}{\log k}$.
\end{fcthm}

\begin{fcthm}[Shearer, 1980s]
  \label{thm:shearermaxdegtrianglefree}
  Assuming:
  - $G$ a triangle-free graph on $n$ vertices
  - max degree $d$
  Then:
  \[
    \indnum(G)
    \ge (1 + o(1)) \frac{n}{d} (\log d)
  ,\]
  where $o(1) \to 0$ as $d \to \infty$.
\end{fcthm}

\begin{remark*}
  Given $G$ on $n$ vertices with maximum degree $d$, we can use greedy algorithm
  to show $\indnum(G) \ge \frac{n}{d + 1}$: pick a vertex not adjacent to
  anything picked so far, and chuck away its neighbours.
  At each iteration, we use up at most $d + 1$ vertices, hence we can run the
  algorithm for at least $\frac{n}{d + 1}$ steps.

  \cref{thm:shearermaxdegtrianglefree} beats this simple argument by a factor of
  $\log d$, under the additional assumption that $G$ is triangle-free.
\end{remark*}

\begin{remark*}
  If we take $G \sim G \left( n, \frac{d}{n} \right)$ and modify, for $d \ll
  \sqrt{n}$, one can show that there exist graphs with no triangles and
  \[
    \indnum(G)
    \le (2 + o(1)) \frac{n}{d} \log d
  .\]
  So \cref{thm:shearermaxdegtrianglefree} is in some sense sharp.

  In fact, understanding what happens between these $1 + o(1)$ and $2 + o(1)$
  cases is a big open problem.
\end{remark*}
