  The loop $O(n)$ model is a family of probability measures on collections of
non-intersecting loops on the hexagonal lattice, parameterized by a loop-weight
$n$ and an edge-weight $x$. Nienhuis predicts that, for $0 \leq n \leq 2$, the
model exhibits two regimes separated by $x_c(n) = 1/\sqrt{2 + \sqrt{2-n}}$:
when $x < x_c(n)$, the loop lengths have exponential tails, while, when $x \geq
x_c(n)$, the loops are macroscopic.
  In this paper, we prove three results regarding the existence of long loops
in the loop $O(n)$ model:
  - In the regime $(n,x) \in [1,1+\delta) \times (1- \delta, 1]$ with $\delta
>0$ small, a configuration sampled from a translation-invariant Gibbs measure
will either contain an infinite path or have infinitely many loops surrounding
every face. In the subregime $n \in [1,1+\delta)$ and $x \in
(1-\delta,1/\sqrt{n}]$ our results further imply Russo--Seymour--Welsh theory.
This is the first proof of the existence of macroscopic loops in a positive
area subset of the phase diagram.
  - Existence of loops whose diameter is comparable to that of a finite domain
whenever $n=1, x \in (1,\sqrt{3}]$; this regime is equivalent to part of the
antiferromagnetic regime of the Ising model on the triangular lattice.
  - Existence of non-contractible loops on a torus when $n \in [1,2], x=1$.
  The main ingredients of the proof are: (i) the `XOR trick': if $\omega$ is a
collection of short loops and $\Gamma$ is a long loop, then the symmetric
difference of $\omega$ and $\Gamma$ necessarily includes a long loop as well;
(ii) a reduction of the problem of finding long loops to proving that a
percolation process on an auxiliary planar graph, built using the
Chayes--Machta and Edwards--Sokal geometric expansions, has no infinite
connected components; and (iii) a recent result on the percolation threshold of
Benjamini--Schramm limits of planar graphs.
