AFTD Auto-Formalizing Theoretical Domains

grid57_fixed0_prefix_group0

theoremverified

The fixed column 0 and any sorted next column in the indicated eight-value range cannot extend to seven columns with pair cost at most nine.

Statement

theorem grid57_fixed0_prefix_group0 (a : Fin 32) (hlo : 0 ≤ a.val) (hhi : a.val < 8) : grid57_prefix_obstruction 0 a
Source
OP-1867: sorted-column finite obstruction computed in experiments 43999 and 44004–44005; related work arXiv:2611.19635 section 6.
Verified
28 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2
  • grid57_prefix_obstructionThe sorted six-column continuation of the two given columns cannot maintain accumulated pair cost at most nine.
  • grid57_pair_costAn explicit table of monochromatic rectangle counts determined by two five-bit columns.

The proof, explained

The theorem establishes that fixing the first column of a $5 \times 7$ binary grid to 0 precludes extending any second column $a$ in the range $0 \le a < 8$ to a full seven-column grid with total pair cost at most 9. The proof splits into cases over all 32 values of $a \in \mathrm{Fin}\;32$: the cases with $a \ge 8$ are ruled out immediately by contradiction with the hypothesis $a < 8$, and the remaining eight cases are verified by Lean's computational decision procedure (`decide`), which exhaustively searches and prunes all possible sorted completions.

  1. For every column index $a \in \mathrm{Fin}\;32$ satisfying $0 \le a < 8$, the prefix obstruction predicate $\mathrm{grid57\_prefix\_obstruction}\;0\;a$ holds. automation

    We perform a complete case split on the 32 possible values of $a \in \mathrm{Fin}\;32$ (`fin_cases a`). For the 24 cases where $a \ge 8$, the upper bound hypothesis $a < 8$ (`hhi`) evaluates to false, closing those branches immediately by numerical contradiction via `norm_num`. For each of the 8 remaining values $a \in \{0, 1, \dots, 7\}$, expanding the definition of `grid57_prefix_obstruction` yields a finite universal statement: for every sorted sequence of subsequent columns $a \le b \le c \le d \le e \le f$, the cumulative pair cost eventually exceeds 9. Since all quantifiers range over the finite type $\mathrm{Fin}\;32$ and the cost calculation is computable, this search is decidable and is verified exhaustively by Lean's decision procedure (`decide`).

    line 5

      fin_cases a <;> try norm_num at hlo <;> try norm_num at hhi <;> unfold grid57_prefix_obstruction <;> 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

set_option maxHeartbeats 4000000set_option linter.all falsetheorem grid57_fixed0_prefix_group0 (a : Fin 32) (hlo : 0 ≤ a.val) (hhi : a.val < 8) : grid57_prefix_obstruction 0 a := by  fin_cases a <;> try norm_num at hlo <;> try norm_num at hhi <;> unfold grid57_prefix_obstruction <;> decide
See it in the graphDiscuss this resultChallenge it