AFTD Auto-Formalizing Theoretical Domains

grid_box_free_max_five_seven_eq_fifty_two

theoremverifiedoriginal

The maximum number of binary five-by-seven layers that can be stacked without a monochromatic axis-parallel box is exactly fifty-two.

Statement

theorem grid_box_free_max_five_seven_eq_fifty_two : grid_box_free_max 5 7 = 52
Related work
arXiv:2611.19635, sections 5 and 6. OP-1867. Experiments 44354 and 44355 construct and independently check the order-three orbit packing.
Verified
28 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 5
  • grid_box_free_maxThe parameter $N(a, b)$ is the maximum integer $c$ such that the grid $[a] \times [b] \times [c]$ admits an axis-parallel box-free…
  • grid_five_seven_fifty_two_layer_masksThe thirty-five cell masks of a fifty-two-layer box-free coloring. At row x and column j, bit z is the color in layer z. The coloring…
  • grid_five_seven_fifty_two_witness_box_freeThe explicit binary coloring with the specified 35 masks contains no monochromatic axis-parallel box anywhere in the…
  • grid57_stack_at_most_fifty_twoEvery box-free binary coloring of a five-by-seven-by-n grid has at most 52 layers.
  • 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 1

Read back from the Lean

The supremum in ℕ of all natural numbers c such that there exists a 2-coloring f : Fin 5 → Fin 7 → Fin c → Bool without any monochromatic box (that is, no choice of x₁ < x₂ < 5, y₁ < y₂ < 7, and z₁ < z₂ < c such that f assigns the exact same boolean value to all eight corner vertices {x₁, x₂} × {y₁, y₂} × {z₁, z₂}) is equal to 52.

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

The proof, explained

The maximum height of a box-free 5 × 7 binary grid is determined by showing that 52 is the greatest element of the set of valid heights. To do this, the proof exhibits an explicit 52-layer box-free witness, and then applies a previously proved theorem stating that every box-free 5 × 7 grid has height at most 52. Finally, because 52 is the greatest element of the set, the supremum defining the maximum is 52.

  1. 52 belongs to the set of heights admitting a box-free coloring.

    To prove that 52 is the greatest element of the set of grid heights admitting a box-free coloring, we must show that 52 belongs to the set and that 52 is an upper bound. The explicit coloring provided by grid_five_seven_fifty_two_witness_box_free establishes membership, leaving the upper bound condition to be verified.

    lines 2–3

    uses grid_five_seven_fifty_two_witness_box_free

      have greatest : IsGreatest {n : ℕ | ∃ f : Fin 5 → Fin 7 → Fin n → Bool, grid_box_free f} 52 := by
        refine ⟨⟨_, grid_five_seven_fifty_two_witness_box_free⟩, ?_⟩
  2. 52 is an upper bound for the set of heights admitting a box-free coloring, completing the proof that 52 is the greatest element.

    Let n be any height in the set, and let f be a box-free coloring of the 5 × 7 × n grid. Applying the lemma grid57_stack_at_most_fifty_two to f yields n ≤ 52, showing that 52 is an upper bound for all such heights.

    lines 4–6

    uses grid57_stack_at_most_fifty_two

        intro n hn
        obtain ⟨f, hf⟩ := hn
        exact grid57_stack_at_most_fifty_two f hf
  3. The maximum box-free height grid_box_free_max 5 7 is equal to 52.

    By definition, grid_box_free_max 5 7 is the supremum of the set of heights admitting a box-free coloring. Since 52 is the greatest element of this set, greatest.csSup_eq equates the supremum with 52.

    line 7

    uses greatest.csSup_eq

      exact greatest.csSup_eq
grid_five_seven_fifty_two_witness_box_free
An explicit binary coloring of the 5 × 7 × 52 grid constructed from bitmasks that contains no monochromatic axis-parallel box.
grid57_stack_at_most_fifty_two
Any box-free binary coloring of a 5 × 7 × n grid must satisfy n ≤ 52.
greatest.csSup_eq
If a set of natural numbers has a greatest element, its supremum is equal to that greatest element.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

theorem grid_box_free_max_five_seven_eq_fifty_two : grid_box_free_max 5 7 = 52 := by  have greatest : IsGreatest {n : ℕ | ∃ f : Fin 5 → Fin 7 → Fin n → Bool, grid_box_free f} 52 := by    refine ⟨⟨_, grid_five_seven_fifty_two_witness_box_free⟩, ?_⟩    intro n hn    obtain ⟨f, hf⟩ := hn    exact grid57_stack_at_most_fifty_two f hf  exact greatest.csSup_eq
See it in the graphDiscuss this resultChallenge it