mondrian_partition_zero_one_impossible
An integer square of side n <= 1 has no admissible Mondrian partition.
Statement
theorem mondrian_partition_zero_one_impossible (n : ℕ) (hn : n ≤ 1) :
¬ ∃ P, mondrian_is_partition n P- Source
- step towards mondrian_no_perfect_partition
- Verified
- 27 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 7
- mondrian_is_partitionAn admissible Mondrian partition of the n×n square: at least two axis-parallel rectangles with positive integer side lengths, with…
- mondrian_rect_cellsThe unit cells [i,i+1]×[j,j+1] of the integer rectangle [x₀,x₁]×[y₀,y₁], recorded as r = (x₀, x₁, y₀, y₁); a cell is named by its…
- mondrian_partition_area_sumThe areas of an admissible partition of the n-square sum to n squared.
- mondrian_rect_congruentTwo rectangles are congruent when they have the same side lengths, possibly after a rotation (so 2×3 and 3×2 are congruent).
- mondrian_rect_areaThe area |R| = width × height of a rectangle.
- mondrian_rect_widthThe width x₁ − x₀ of the rectangle (x₀, x₁, y₀, y₁).
- mondrian_rect_heightThe height y₁ − y₀ of the rectangle (x₀, x₁, y₀, y₁).
The proof, explained
The theorem is proved by contradiction. An admissible Mondrian partition must contain at least two rectangles, each having strictly positive integer dimensions and therefore an area of at least 1. As a result, the total area n^2 must be at least the number of rectangles, giving 2 ≤ |P| ≤ n^2. However, when n ≤ 1, the total area satisfies n^2 ≤ 1, yielding the contradiction 2 ≤ 1.
Assume for contradiction that an admissible partition P exists; the sum of the rectangle areas in P equals n^2.
We proceed by contradiction: suppose there exists an admissible Mondrian partition P of an n × n square (hypothesis hP). By mondrian_partition_area_sum, the sum of the areas of all rectangles in P is equal to the square's total area, n^2.
uses
mondrian_partition_area_sumrintro ⟨P, hP⟩ have hsum := mondrian_partition_area_sum n P hPEvery rectangle in the partition P has area at least 1.
For every rectangle r in P, the definition of an admissible partition guarantees that its lower-left coordinates are strictly less than its upper-right coordinates (r.1 < r.2.1 and r.2.2.1 < r.2.2.2). Unfolding the definitions of area, width, and height, the width r.2.1 - r.1 and height r.2.2.2 - r.2.2.1 are strictly positive natural numbers. By Nat.mul_ne_zero, their product is non-zero, and by Nat.one_le_iff_ne_zero.2, any non-zero natural number is at least 1.
uses
Nat.one_le_iff_ne_zero.2,Nat.mul_ne_zerohave hpos : ∀ r ∈ P, 1 ≤ mondrian_rect_area r := by intro r hr have h := hP.2.1 r hr unfold mondrian_rect_area mondrian_rect_width mondrian_rect_height exact Nat.one_le_iff_ne_zero.2 (Nat.mul_ne_zero (by omega) (by omega))
The number of rectangles in P is at most the sum of their areas.
Since each rectangle in P has area at least 1, bounding each area from below by 1 shows that the sum of 1 over P is at most the sum of the areas (List.sum_le_sum). Simplifying the sum of 1s to the length |P| of the list (simpa) yields |P| ≤ ∑_{r ∈ P} area(r).
uses
List.sum_le_sumhave hlen : P.length ≤ (P.map mondrian_rect_area).sum := by have : (P.map (fun _ => 1)).sum ≤ (P.map mondrian_rect_area).sum := List.sum_le_sum (by intro r hr exact hpos r hr) simpa using this
A contradiction is reached: the partition must contain at least 2 rectangles, but the total area is at most 1.
By the first condition of an admissible Mondrian partition (hP.1), P contains at least two rectangles (2 ≤ |P|). Meanwhile, since n ≤ 1, monotonicity of exponentiation (Nat.pow_le_pow_left) gives n^2 ≤ 1^2 = 1. Combining these with the previous step yields 2 ≤ |P| ≤ ∑_{r ∈ P} area(r) = n^2 ≤ 1, which implies 2 ≤ 1. Integer linear arithmetic (omega) closes this contradiction, completing the proof.
uses
Nat.pow_le_pow_lefthave h2 := hP.1 have hn2 : n ^ 2 ≤ 1 := by calc n ^ 2 ≤ 1 ^ 2 := Nat.pow_le_pow_left hn 2 _ = 1 := by norm_num omega
mondrian_partition_area_sum- For any admissible Mondrian partition of an n × n square, the sum of the areas of the rectangles in the partition equals n^2.
Nat.one_le_iff_ne_zero.2- A natural number is at least 1 if it is non-zero (the right-to-left direction of 1 ≤ n ↔ n ≠ 0).
Nat.mul_ne_zero- The product of two non-zero natural numbers is non-zero.
List.sum_le_sum- If f(x) ≤ g(x) for every element x of a list, then the sum of f over the list is at most the sum of g over the list.
Nat.pow_le_pow_left- If a ≤ b, then a^k ≤ b^k for any natural exponent k.
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.
/-- An integer square of side n <= 1 has no admissible Mondrian partition. -/theorem mondrian_partition_zero_one_impossible (n : ℕ) (hn : n ≤ 1) : ¬ ∃ P, mondrian_is_partition n P := by rintro ⟨P, hP⟩ have hsum := mondrian_partition_area_sum n P hP have hpos : ∀ r ∈ P, 1 ≤ mondrian_rect_area r := by intro r hr have h := hP.2.1 r hr unfold mondrian_rect_area mondrian_rect_width mondrian_rect_height exact Nat.one_le_iff_ne_zero.2 (Nat.mul_ne_zero (by omega) (by omega)) have hlen : P.length ≤ (P.map mondrian_rect_area).sum := by have : (P.map (fun _ => 1)).sum ≤ (P.map mondrian_rect_area).sum := List.sum_le_sum (by intro r hr exact hpos r hr) simpa using this have h2 := hP.1 have hn2 : n ^ 2 ≤ 1 := by calc n ^ 2 ≤ 1 ^ 2 := Nat.pow_le_pow_left hn 2 _ = 1 := by norm_num omega