mondrian_rect_mul_dimensions
Multiplying coordinates by a multiplies both side lengths by a.
Statement
theorem mondrian_rect_mul_dimensions (a : ℕ) (r : ℕ × ℕ × ℕ × ℕ) :
mondrian_rect_width (mondrian_rect_mul a r) = a * mondrian_rect_width r ∧
mondrian_rect_height (mondrian_rect_mul a r) = a * mondrian_rect_height r- Source
- Helper for OP-280 and mondrian_perfect_partition_large_prime_iff. Related work: arXiv:2610.19193, Section 1 (perfect partitions and scaling); arXiv:2007.09639, Theorem 4.1 (available shapes and prime-power exclusions).
- Verified
- 26 Oct 2026
- Axioms
propext- Built on 3
- mondrian_rect_heightThe height y₁ − y₀ of the rectangle (x₀, x₁, y₀, y₁).
- mondrian_rect_mulMultiply all four rectangle coordinates by a.
- mondrian_rect_widthThe width x₁ − x₀ of the rectangle (x₀, x₁, y₀, y₁).
- Used by 2
- mondrian_partition_mulMultiplying all rectangle coordinates by a positive integer a sends an admissible c-square partition to an admissible a times c square…
- mondrian_rect_mul_areaMultiplying rectangle coordinates by a multiplies its area by a squared.
The proof, explained
The theorem is proved by unfolding the definitions of rectangle scaling, width, and height, which express the new dimensions in terms of the scaled coordinates. The distributive law of multiplication over subtraction (`Nat.mul_sub_left_distrib`) is then applied to factor out $a$, showing that both the width and height of the scaled rectangle equal $a$ times those of the original rectangle.
Scaling a rectangle by $a$ multiplies both its width and its height by $a$.
Unfolding the definitions of rectangle scaling (`mondrian_rect_mul`), width (`mondrian_rect_width`), and height (`mondrian_rect_height`) expresses the dimensions of the scaled rectangle as $a \cdot r_{2,1} - a \cdot r_1$ and $a \cdot r_{2,2,2} - a \cdot r_{2,2,1}$. The simplifier then applies the left distributive law of multiplication over subtraction (`Nat.mul_sub_left_distrib`), converting these to $a * (r_{2,1} - r_1)$ and $a * (r_{2,2,2} - r_{2,2,1})$, which match $a$ times the original width and height respectively, closing both conjuncts.
uses
Nat.mul_sub_left_distribsimp [mondrian_rect_mul, mondrian_rect_width, mondrian_rect_height, Nat.mul_sub_left_distrib]
Nat.mul_sub_left_distrib- Multiplication distributes over subtraction on the left for natural numbers: $n * (m - k) = n * m - n * 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.
theorem mondrian_rect_mul_dimensions (a : ℕ) (r : ℕ × ℕ × ℕ × ℕ) : mondrian_rect_width (mondrian_rect_mul a r) = a * mondrian_rect_width r ∧ mondrian_rect_height (mondrian_rect_mul a r) = a * mondrian_rect_height r := by simp [mondrian_rect_mul, mondrian_rect_width, mondrian_rect_height, Nat.mul_sub_left_distrib]