AFTD Auto-Formalizing Theoretical Domains

grid_box_free

def

A 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 $z_1 < z_2 \le c$, the eight vertices $\{x_1, x_2\} \times \{y_1, y_2\} \times \{z_1, z_2\}$ are not all monochromatic under $f$.

Statement

def grid_box_free {a b c : ℕ} (f : Fin a → Fin b → Fin c → Bool) : Prop
Defined in
arXiv:2611.19635 (Constructive and computational methods for extremal and near-extremal box colorings), Sec. 1
Verified
17 Nov 2026
Axioms
none listed
Used by 10

Read back from the Lean

Given natural numbers a, b, and c, and a function f : Fin a → Fin b → Fin c → Bool, grid_box_free f asserts that for all x₁, x₂ : Fin a, y₁, y₂ : Fin b, and z₁, z₂ : Fin c, if x₁ < x₂, y₁ < y₂, and z₁ < z₂, then the eight values of f on the vertices of the box {x₁, x₂} × {y₁, y₂} × {z₁, z₂} are not all equal to each other (specifically, not all equal to f x₁ y₁ z₁).

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

/-- A 2-coloring of [a] × [b] × [c] is box-free if no axis-parallel box is monochromatic. -/
def grid_box_free {a b c : ℕ} (f : Fin a → Fin b → Fin c → Bool) : Prop := ∀ (x₁ x₂ : Fin a) (y₁ y₂ : Fin b) (z₁ z₂ : Fin c),
    x₁ < x₂ → y₁ < y₂ → z₁ < z₂ →
      ¬ (f x₁ y₁ z₁ = f x₁ y₂ z₁ ∧
         f x₁ y₁ z₁ = f x₂ y₁ z₁ ∧
         f x₁ y₁ z₁ = f x₂ y₂ z₁ ∧
         f x₁ y₁ z₁ = f x₁ y₁ z₂ ∧
         f x₁ y₁ z₁ = f x₁ y₂ z₂ ∧
         f x₁ y₁ z₁ = f x₂ y₁ z₂ ∧
         f x₁ y₁ z₁ = f x₂ y₂ z₂)
See it in the graphDiscuss this resultChallenge it