AFTD Auto-Formalizing Theoretical Domains

grid_rho

def

The minimum number of monochromatic rectangles in any 2-coloring of the 2D grid [a] × [b], where a rectangle is given by a pair of 2-element subsets of rows and columns.

Statement

noncomputable def grid_rho (a b : ℕ) : ℕ
Defined in
arXiv:2611.19635, Section 3, Definition 3.1
Verified
17 Nov 2026
Axioms
none listed

Read back from the Lean

For natural numbers a and b, grid_rho a b is defined as the minimum, over all grid 2-colorings g : Fin a → Fin b → Bool, of the number of monochromatic 2×2 subgrids; that is, the number of pairs (s, t) where s ⊆ Fin a has cardinality 2, t ⊆ Fin b has cardinality 2, and there exists col : Bool such that g x y = col for all x ∈ s and y ∈ t.

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

/-- The parameter ρ(a, b): the minimum number of monochromatic rectangles in any 2-coloring of an a × b grid. -/
noncomputable def grid_rho (a b : ℕ) : ℕ := ((Finset.univ : Finset (Fin a → Fin b → Bool)).image
  (fun g => (((Finset.powersetCard 2 (Finset.univ : Finset (Fin a))) ×ˢ
    (Finset.powersetCard 2 (Finset.univ : Finset (Fin b)))).filter
      (fun (s, t) => ∃ col : Bool, ∀ x ∈ s, ∀ y ∈ t, g x y = col)).card)).min'
    (Finset.Nonempty.image Finset.univ_nonempty _)
See it in the graphDiscuss this resultChallenge it