AFTD Auto-Formalizing Theoretical Domains

grid_five_seven_representatives_eight_rectangles

theoremverified

Each of the six displayed representative layers has exactly eight monochromatic rectangles.

Statement

theorem grid_five_seven_representatives_eight_rectangles : ∀ i : Fin 6, (layer_mono (fun x y (_ : Fin 1) => grid_five_seven_minimum_representative i x y) 0).card = 8
Source
OP-1867: minimum-layer representatives computed in experiment 43983; arXiv:2611.19635 section 6.
Verified
28 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3
  • grid_five_seven_minimum_representativeSix explicit five-by-seven binary layers, encoded by their seven five-bit columns.
  • layer_monoFor a $2$-colouring $f$ of $[a]\times[b]\times[c]$ and a layer index $z$, $\mathrm{layer\_mono}(f,z)$ is the finite set of coloured…
  • BoxPatternA coloured rectangle pattern in an $a\times b$ grid: a pair of rows $x_1<x_2$, a pair of columns $y_1<y_2$, and a colour, encoded as the…

The proof, explained

The theorem asserts that six specific 2-colorings of a 5 × 7 grid each contain exactly eight monochromatic rectangles. Because the grid and the collection of representative colorings are finite, the property is decidable and Lean proves it directly by exhaustive computation with the `decide` tactic.

  1. Each of the six 5 × 7 grid colorings has exactly eight monochromatic rectangles. automation

    The claim quantifies over a finite domain (`Fin 6`). Each representative coloring is an explicit boolean matrix given by integer bitmasks, and the number of monochromatic rectangles is obtained by filtering over the finite set of row and column pairs. Since all types and predicates involved are finite and computable, the `decide` tactic verifies the equality by exhaustive computation.

    line 2

      decide

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_five_seven_representatives_eight_rectangles : ∀ i : Fin 6, (layer_mono (fun x y (_ : Fin 1) => grid_five_seven_minimum_representative i x y) 0).card = 8 := by  decide
See it in the graphDiscuss this resultChallenge it