mem_layer_mono
Membership in $\mathrm{layer\_mono}(f,z)$: a pattern $(x_1,x_2,y_1,y_2,\mathrm{col})$ lies in the layer iff $x_1<x_2$, $y_1<y_2$, and all four cells $f(x_i,y_j,z)$ equal $\mathrm{col}$.
Statement
lemma mem_layer_mono {a b c : ℕ} (f : Fin a → Fin b → Fin c → Bool) (z : Fin c) (p : BoxPattern a b) : p ∈ layer_mono f z ↔ (p.1 < p.2.1 ∧ p.2.2.1 < p.2.2.2.1 ∧ f p.1 p.2.2.1 z = p.2.2.2.2 ∧ f p.1 p.2.2.2.1 z = p.2.2.2.2 ∧ f p.2.1 p.2.2.1 z = p.2.2.2.2 ∧ f p.2.1 p.2.2.2.1 z = p.2.2.2.2)- Source
- step towards grid_box_free_max_five_seven
- Verified
- 18 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 3
- 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…
- mordell_ten_integer_norm_sumThe sum of squared norms of the ten integer points in the witness configuration W is 9999608174.
- Used by 2
- grid_box_free_iff_layers_disjointA colouring $f$ of $[a]\times[b]\times[c]$ is box-free if and only if any two distinct layers have disjoint sets of monochromatic coloured…
- layer_mono_card_sum_leLayer bound (Lemma 4.1 core): for a box-free colouring of $[a]\times[b]\times[c]$, the total number of monochromatic rectangles summed…
The proof, explained
The equivalence holds directly by definition. Unfolding the definition of layer_mono reduces membership of a pattern p in the set to the condition that p satisfies the monochromatic rectangle predicates, turning the goal into an immediate identity P(p) ↔ P(p) that the simplifier closes.
p ∈ layer_mono f z is equivalent to the conjunction of the coordinate inequalities and the four cell-colour equations. automation
The definition of layer_mono f z is the filter of the universe of patterns satisfying the given coordinate inequalities and four colour equalities. Unfolding BoxPattern and layer_mono with simp only reduces the membership predicate p ∈ {p | P p} ↔ P p to an identity P p ↔ P p, which simpa simplifies to True, ignoring the superfluous lemma mordell_ten_integer_norm_sum passed to it.
uses
mordell_ten_integer_norm_sumlemma mem_layer_mono {a b c : ℕ} (f : Fin a → Fin b → Fin c → Bool) (z : Fin c) (p : BoxPattern a b) : p ∈ layer_mono f z ↔ (p.1 < p.2.1 ∧ p.2.2.1 < p.2.2.2.1 ∧ f p.1 p.2.2.1 z = p.2.2.2.2 ∧ f p.1 p.2.2.2.1 z = p.2.2.2.2 ∧ f p.2.1 p.2.2.1 z = p.2.2.2.2 ∧ f p.2.1 p.2.2.2.1 z = p.2.2.2.2) := by first | exact mordell_ten_integer_norm_sum | (apply mordell_ten_integer_norm_sum <;> assumption) | (apply mordell_ten_integer_norm_sum <;> simp_all) | simpa using mordell_ten_integer_norm_sum | (simp only [BoxPattern, layer_mono] at *; first | exact mordell_ten_integer_norm_sum | (apply mordell_ten_integer_norm_sum <;> assumption) | (apply mordell_ten_integer_norm_sum <;> simp_all) | simpa using mordell_ten_integer_norm_sum)
mordell_ten_integer_norm_sum- A numerical identity stating that the sum of the squared Euclidean norms of ten specific vectors in ℤ × ℤ equals 9999608174.
- The proof script appears to have been produced by an automated proof-search procedure that generates a `first` block trying several candidates. The lemma `mordell_ten_integer_norm_sum` is completely irrelevant: after unfolding definitions, `simpa` closes the goal simply by simplifying the reflexive equivalence P(p) ↔ P(p) to True.
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
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
/-- Characterisation of membership in a layer's monochromatic-rectangle set. -/lemma mem_layer_mono {a b c : ℕ} (f : Fin a → Fin b → Fin c → Bool) (z : Fin c) (p : BoxPattern a b) : p ∈ layer_mono f z ↔ (p.1 < p.2.1 ∧ p.2.2.1 < p.2.2.2.1 ∧ f p.1 p.2.2.1 z = p.2.2.2.2 ∧ f p.1 p.2.2.2.1 z = p.2.2.2.2 ∧ f p.2.1 p.2.2.1 z = p.2.2.2.2 ∧ f p.2.1 p.2.2.2.1 z = p.2.2.2.2) := by first | exact mordell_ten_integer_norm_sum | (apply mordell_ten_integer_norm_sum <;> assumption) | (apply mordell_ten_integer_norm_sum <;> simp_all) | simpa using mordell_ten_integer_norm_sum | (simp only [BoxPattern, layer_mono] at *; first | exact mordell_ten_integer_norm_sum | (apply mordell_ten_integer_norm_sum <;> assumption) | (apply mordell_ten_integer_norm_sum <;> simp_all) | simpa using mordell_ten_integer_norm_sum)