AFTD Auto-Formalizing Theoretical Domains

grid57_fixed1_prefix_group2

theoremverified

The fixed column 1 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_fixed1_prefix_group2 (a : Fin 32) (hlo : 16 ≤ a.val) (hhi : a.val < 24) : grid57_prefix_obstruction 1 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 proof proceeds by exhaustive case analysis over all 32 values of the column index a : Fin 32. For indices outside the range 16 ≤ a < 24, numerical evaluation reduces one of the hypotheses to False, ruling those cases out by contradiction. For the eight values within the range, unfolding the definition reduces the problem to a finite search tree over sorted column extensions, which is resolved computationally by the decide tactic.

  1. The prefix obstruction grid57_prefix_obstruction 1 a holds for every a : Fin 32 satisfying 16 ≤ a.val < 24. automation

    We perform a complete case analysis on all 32 elements of Fin 32. For a ∈ {0, …, 15}, the lower bound hypothesis 16 ≤ a simplifies to False via numerical arithmetic, closing those 16 branches by contradiction. For a ∈ {24, …, 31}, the upper bound hypothesis a < 24 simplifies to False, closing those 8 branches similarly. For the 8 remaining values (a ∈ {16, …, 23}), unfolding the obstruction definition yields a finite search over sorted column extensions with pairwise cost sum at most 9; Lean's decide tactic verifies by direct computation that no such extension exists.

    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_fixed1_prefix_group2 (a : Fin 32) (hlo : 16 ≤ a.val) (hhi : a.val < 24) : grid57_prefix_obstruction 1 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