AFTD Auto-Formalizing Theoretical Domains

grid_box_free_max

def

The parameter $N(a, b)$ is the maximum integer $c$ such that the grid $[a] \times [b] \times [c]$ admits an axis-parallel box-free $2$-coloring, defined as the supremum of all such $c$.

Statement

noncomputable def grid_box_free_max (a b : ℕ) : ℕ
Defined in
arXiv:2611.19635 (Constructive and computational methods for extremal and near-extremal box colorings), Def. 2.1
Verified
17 Nov 2026
Axioms
none listed
Built on 1
  • grid_box_freeA 2-coloring $f : [a] \times [b] \times [c] \to \{0, 1\}$ is box-free if for all $x_1 < x_2 \le a$, $y_1 < y_2 \le b$, and…
Used by 3

Read back from the Lean

For given natural numbers $a$ and $b$, grid_box_free_max a b is defined as the supremum (in $\mathbb{N}$) of the set of all natural numbers $c$ for which there exists a 2-coloring $f : \text{Fin } a \to \text{Fin } b \to \text{Fin } c \to \text{Bool}$ such that $f$ is grid_box_free. Here, grid_box_free f means that for all $x_1 < x_2$ in $\text{Fin } a$, $y_1 < y_2$ in $\text{Fin } b$, and $z_1 < z_2$ in $\text{Fin } c$, the eight corner vertices of the box $[x_1, x_2] \times [y_1, y_2] \times [z_1, z_2]$—namely $(x_1, y_1, z_1)$, $(x_1, y_2, z_1)$, $(x_2, y_1, z_1)$, $(x_2, y_2, z_1)$, $(x_1, y_1, z_2)$, $(x_1, y_2, z_2)$, $(x_2, y_1, z_2)$, and $(x_2, y_2, z_2)$—are not all assigned the same boolean value by $f$.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- The maximum number of layers c such that [a] × [b] × [c] admits a box-free 2-coloring. -/
noncomputable def grid_box_free_max (a b : ℕ) : ℕ := sSup {c : ℕ | ∃ f : Fin a → Fin b → Fin c → Bool, grid_box_free f}
See it in the graphDiscuss this resultChallenge it