AFTD Auto-Formalizing Theoretical Domains

ordered_patterns

def

The finite set of ordered coloured rectangle patterns of an $a\times b$ grid, i.e. the patterns with $x_1<x_2$ and $y_1<y_2$. Its cardinality is $2\binom a2\binom b2$, the number of "coloured rectangle slots".

Statement

def ordered_patterns (a b : ℕ) : Finset (BoxPattern a b)
Source
step towards grid_box_free_max_five_seven
Verified
18 Nov 2026
Axioms
none listed
Built on 1
  • 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…
Used by 5

Lean source view module on GitHub

/-- All ordered coloured rectangle slots of an $a\times b$ grid. -/
def ordered_patterns (a b : ℕ) : Finset (BoxPattern a b) := Finset.univ.filter (fun p => p.1 < p.2.1 ∧ p.2.2.1 < p.2.2.2.1)
See it in the graphDiscuss this resultChallenge it