%! TEX root = PC.tex
% vim: tw=80 ft=tex
% 17/10/2025 09AM

\begin{proof}
  Fix $t = \frac{pk^2}{16}$ and fix a set $S$ with size $|S| = k$.
  \begin{align*}
    \Pbb(e(G[S]) < t)
    &\le \sum_{i = 0}^{t}  { {k \choose 2} \choose i} p^i (1 - p)^{{k \choose 2}
    - i} \\
    &\le t { {k \choose 2} \choose t} p^t (1 - p)^{{k \choose 2} - t} \\
    &\le t \left[ \left( \frac{ek^2}{2t} \right)^t p^t \right] e^{-p \left[ {k
    \choose 2} - t \right]} \\
    &\le t (e8)^{\frac{pk^2}{16}} e^{-p {k \choose 2} / 2} \\
    &\le k^2 \left[ (e8)^1 e^{-4 + o(1)} \right]^{\frac{pk^2}{16}} \\
    &\le e^{-\alpha pk^2}
  \end{align*}
  for some $\alpha > 0$.

  We now union bound over all $S \in [n]^{(k)}$.
  \begin{align*}
    \Pbb(\exists S \in [n]^{(k)} \text{ such that } e([S]) < t)
    &\le {n \choose k} \Pbb(e(G[S]) < t) \\
    &\le \left( \frac{en}{k} \right)^k e^{-\alpha k^2 p} \\
    &= \left( \frac{en}{k} \cdot e^{-\alpha kp} \right)^k \\
    &\le \left( enp \left( \frac{1}{pn} \right)^{\alpha C} \right)^k
  \end{align*}
  (using $kp \ge C \log n$) which $\to 0$ for $C > \frac{1}{\alpha}$.
\end{proof}

\begin{fclemma}[]
  \label{lemma:indevents}
  Assuming:
  - $\mathcal{F} = \{A_i\}_i$ be a collection of events
  - let $E_t$, for $t \in \Nbb$, be the event that $t$ independent
  events of $\mathcal{F}$ occur
  Then:
  \[
    \Pbb(E_t)
    \le \frac{1}{t!} \left( \sum_i \Pbb(A_i) \right)^t
  .\]
\end{fclemma}

\begin{center}
  \includegraphics[width=0.3\linewidth]{images/5e926cce38e84049.png}
\end{center}

\begin{remark*}
  $t! = t^t e^{-t} \sqrt{2\pi t} (1 + o(1))$.

  Using $t! \ge t^t e^{-t} / 2$ for large $t$ in the above lemma, we get:
  \[
    \Pbb(E_t)
    \le 2 \left( \frac{e\Ebb(\text{\# of $A_i$ that hold}}{t} \right)^t
  .\]
\end{remark*}

\begin{proof}
  Let $\mathcal{I} = \{(A_{i_1}, \ldots, A_{i_k}) : A_{i_1}, \ldots, A_{i_k}
  \text{ are independent}\}$.
  \begin{align*}
    \indicator{E_t}
    &\le \frac{1}{t!} \sum_{(A_{i_1}, \ldots, A_{i_k}) \in \mathcal{I}}
    \indicator{A_{i_1} \cap \cdots \cap A_{i_k}} \\
    \Pbb(E_t)
    &\le \frac{1}{t!} \sum_{(A_{i_1}, \ldots, A_{i_k}) \in \mathcal{I}}
    \Pbb(A_{i_1} \cap \cdots \cap A_{i_k}) \\
    &= \frac{1}{t!} \sum_{(A_{i_1}, \ldots, A_{i_k}) \in \mathcal{I}}
    \Pbb(A_{i_1}) \cdots \Pbb(A_{i_k}) \\
    &\le \frac{1}{t!} \sum_{i_1, \ldots, i_t} \Pbb(A_{i_1}) \cdots \Pbb(A_{i_k})
    \\
    &= \frac{1}{t!} \left( \sum_i \Pbb(A_i) \right)^t
    \qedhere
  \end{align*}
\end{proof}

% \begin{fcthm}[]
%   Assuming:
%   - $n \ge 2$
%   Then:
%   there exists a triangle-free graph $G$ on $n$ vertices with
%   \[
%     \indnum(G)
%     \le C\sqrt{n} \log n
%   .\]
% \end{fcthm}

\begin{proof}[Proof of \cref{thm:r3kedgedeletionsuffices}]
  Let $n$ be large.
  Let $p = \frac{\gamma}{\sqrt{n}}$ for some $\gamma > 0$.
  Let $G \sim G(n, p)$.

  Here comes a smart idea: instead of deleting an edge from every triangle in an
  arbitrary way, we will do it in a slightly smarter way.

  Let $T$ be a maximal collection of edge disjoint triangles in $G$, and let
  $\tilde{G} = G - T$.
  % Let $\tilde{G}$ be $G$ with a maximal collection of edge disjoint triangles
  % $T$ removed, i.e. $\tilde{G} = G - T$.
  By maximality of $T$, $\tilde{G}$ is triangle-free.

  We'll see shortly that adding this little bit of structure is very helpful for
  making the proof go through (i.e. the proof that the independence number is
  still large).

  To show that the independence number of $\tilde{G}$ is large, we will do a
  common and useful kind of manoeuvre.
  We want to take a big union bound over all independent sets, but this union
  bound only works if we can show that all the individual events occur with low
  enough probability to ``beat out'' the count of the number of events that we
  take a union over.

  If the events are somewhat or very correlated, then we are very much at risk
  of the sum of probabilities being large, because we might be overcounting by
  too much.

  In this case, we will get around the issue by introducing a quasirandomness
  property $Q$ that holds with high probability, and has the nice property that
  the events become less correlated if we condition on $Q$.
  Then we will be able to apply a union bound by conditioning on $Q$.
  % This event $Q$ will be such that ``most of the correlation in our events
  % occurs only when $Q$ doesn't hold''.

  So we will ``prepare globally, then zoom in locally''.

  We let $Q$ be the event that every set of size $k$, where $k =
  C\sqrt{n} \log n$, contains at least $\frac{pk^2}{16}$ edges.
  By \cref{lemma:bighasmanyedges}, $Q$ occurs with high probability.
  We now consider
  \[
    \Pbb(\indnum(\tilde{G}) \ge k)
    = \Pbb(\indnum(\tilde{G}) \ge k \cap Q)
    + \Pbb(\indnum(\tilde{G}) \ge k \cap Q^c)
  .\]
  So
  \[
    \Pbb(\indnum(\tilde{G}) \ge k)
    \le \ub{\Pbb(\indnum(\tilde{G}) \ge k \cap Q)}_{(*)} + o(1)
  .\]
  We now union-bound
  \begin{align*}
    (*)
    &\le {n \choose k} \Pbb(\text{$I$ independent in $\tilde{G}$} \cap
    Q) \\
    &\le {n \choose k} \Pbb(\text{$T$ intersects $I$ in $\ge \frac{pk^2}{16}$
    edges}) \\
    &= (**)
  \end{align*}
  \begin{center}
    \includegraphics[width=0.3\linewidth]{images/6be860de0f254d72.png}
  \end{center}
  Define $\{T_i\}$ to be the collection of all triangles that meet $I$
  in at least one edge, and define the event $A_i = \{T_i \subset G\}$.

  Note that the event $E_t$, where $t = \frac{pk^2}{16}$, from the
  lemma holds on the event that $T$ meets $I$ in $\frac{pk^2}{16}$ edges.
  This is where we use the fact that we only choose edge-disjoint triangles!
  By \cref{lemma:indevents}, we have
  \begin{align*}
    \Pbb(E_t)
    &\le 2 \left( \frac{ek^2 np^3}{t} \right)^t \\
    &\le \left( \frac{16 ek^2 np^3}{pk^2} \right)^{\frac{pk^2}{16}} \\
    &= ( 16 e \gamma^2 )^{\frac{pk^2}{16}}
  \end{align*}
  So
  \[
    (**)
    \le (16e\gamma^2)^{\frac{pk^2}{16}} \left( \frac{en}{k} \right)^k
    \to 0
  ,\]
  if $\gamma$ is chosen to be small and $C$ large.
\end{proof}
