\documentclass[11pt]{article}
\usepackage[margin=.85in]{geometry}
\usepackage{amsmath,amssymb,hyperref}
\hypersetup{colorlinks=true,urlcolor=blue}
\pagestyle{empty}
\begin{document}
\begin{center}
{\Large\bfseries Four colors are necessary on the nine-row triangular lattice}\\[5pt]
A finite proof of Question 2 of Brouwer, Joe, Noble and Noble
\end{center}

Let $T_9$ be the 45 lattice points $(x,y)$ with $x,y\ge0$ and $x+y<9$, written in a unit basis at angle $60^\circ$. A coloring is proper when each equilateral triangle in $T_9$ uses at least two colors.

\paragraph{Theorem.} Every three-coloring of $T_9$ contains a monochromatic equilateral triangle. The least number of colors in a proper coloring of $T_9$ is four.

\paragraph{Proof.} For a displacement $(u,v)$ in these coordinates the squared Euclidean length is $Q(u,v)=u^2+uv+v^2$. Consequently, three points $a,b,c$ form an equilateral triangle precisely when
\[
0<Q(a-b)=Q(a-c)=Q(b-c).
\]
Testing the $\binom{45}{3}$ triples gives 330 equilateral triangles, including those whose sides are tilted relative to the lattice axes.

Permute the color names so that $(2,3)$ is red. A ternary decision tree now exhausts all possible proper extensions of this assignment. Each internal node selects one position and has one child for each of red, green and blue. Each leaf gives three positions and their common color. The checker evaluates $Q$ on the three differences, checks membership in $T_9$, and checks that all three positions have the indicated color along the path. Induction on the tree proves that every coloring extending the root assignment has a monochromatic equilateral triangle.

The certificate contains 8,384 internal nodes and 16,769 leaves. Its leaves use 624 distinct witnesses once the color of a triangle is included. To generate it, keep the two remaining vertices of every triangle through each point $i$. A color is forbidden at $i$ as soon as both remaining vertices in one such pair have that color. Branch on an unassigned point with the fewest remaining colors, breaking ties in favor of the point incident to the most triangles, then by coordinate order. A forbidden branch ends at that witnessing triangle. All branches terminate in this way. The Lean kernel checks the full tree and the induction proving its soundness.

For the upper bound, the following strings give the colors at $(x,0),(x,1),\dots,(x,8-x)$, one row for each $x$ starting at zero.
\begin{center}\ttfamily
100121023\quad 33013132\quad 2200321\quad 333301\quad 01112\\[2pt]
2220\quad 100\quad 01\quad 0
\end{center}
Checking the same distance equations inside each of the four color classes verifies this proper coloring.\hfill$\square$

\paragraph{Source and verification.} G. A. Brouwer, J. Joe, A. A. Noble and M. Noble, \emph{Problems on the Triangular Lattice}, Question~2, \href{https://arxiv.org/html/2405.12321#Thmquestion2}{arXiv:2405.12321}. The complete finite-domain statements are in \texttt{TriangularStatement.lean}. The Python generator reproduces \texttt{TriangularCertificate.lean} using the standard library.
\end{document}
