AFTD Auto-Formalizing Theoretical Domains

mondrian_rect_div_dimensions

theoremverified

Dividing coordinates of a positive rectangle whose side lengths are multiples of a divides its width and height exactly by a.

Statement

theorem mondrian_rect_div_dimensions (a : ℕ) (ha : 0 < a)
    (r : ℕ × ℕ × ℕ × ℕ)
    (hx : r.1 < r.2.1) (hy : r.2.2.1 < r.2.2.2)
    (hw : a ∣ mondrian_rect_width r) (hh : a ∣ mondrian_rect_height r) :
    a * mondrian_rect_width (mondrian_rect_div a r) = mondrian_rect_width r ∧
      a * mondrian_rect_height (mondrian_rect_div a r) = 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
Classical.choiceQuot.soundpropext
Built on 4
  • mondrian_rect_divDivide all four rectangle coordinates by a using natural-number division.
  • mondrian_rect_heightThe height y₁ − y₀ of the rectangle (x₀, x₁, y₀, y₁).
  • mondrian_rect_widthThe width x₁ − x₀ of the rectangle (x₀, x₁, y₀, y₁).
  • mondrian_sub_div_mulFor x at most y and positive a dividing y minus x, the quotient-coordinate difference multiplied by a is y minus x.
Used by 3
  • mondrian_partition_divAn admissible partition of the a times c square, with every tile side a multiple of positive a, becomes an admissible partition of the…
  • mondrian_perfect_partition_divDividing coordinates by a preserves perfect admissible partitions when a is positive and divides every tile side.
  • mondrian_perfect_partition_div_common_areaIf q divides the square side and both dimensions of every tile in a perfect partition, and the common area is q^2 times B, coordinate…

The proof, explained

The conjunction is proved by establishing the width and height equalities independently. Each dimension of the scaled rectangle is the difference of coordinate quotients $y / a - x / a$. Applying `mondrian_sub_div_mul`—which states that $a \cdot (y / a - x / a) = y - x$ when $x \le y$ and $a \mid (y - x)$—recovers the original dimensions for both the width and the height.

  1. $a \cdot \operatorname{width}(r / a) = \operatorname{width}(r)$ and $a \cdot \operatorname{height}(r / a) = \operatorname{height}(r)$

    By definition, the width of the rectangle $r$ is $r.2.1 - r.1$ and the width of the scaled rectangle $r / a$ is $r.2.1 / a - r.1 / a$, and analogously for the height. The two conjuncts are proven by applying `mondrian_sub_div_mul` to the horizontal and vertical coordinates respectively. In each case, the required non-strict inequality ($r.1 \le r.2.1$ and $r.2.2.1 \le r.2.2.2$) is obtained from the strict inequality ($hx$ and $hy$) via `Nat.le_of_lt`, and the divisibility condition is given by hypothesis ($hw$ and $hh$).

    lines 7–8

    uses mondrian_sub_div_mul, Nat.le_of_lt

      exact ⟨mondrian_sub_div_mul a _ _ ha (Nat.le_of_lt hx) hw,
        mondrian_sub_div_mul a _ _ ha (Nat.le_of_lt hy) hh⟩
mondrian_sub_div_mul
If $a > 0$, $x \le y$, and $a$ divides $y - x$, then $a \cdot (y / a - x / a) = y - x$.
Nat.le_of_lt
A strictly smaller natural number is also less than or equal: if $n < m$, then $n \le m$.

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

theorem mondrian_rect_div_dimensions (a : ℕ) (ha : 0 < a)    (r : ℕ × ℕ × ℕ × ℕ)    (hx : r.1 < r.2.1) (hy : r.2.2.1 < r.2.2.2)    (hw : a ∣ mondrian_rect_width r) (hh : a ∣ mondrian_rect_height r) :    a * mondrian_rect_width (mondrian_rect_div a r) = mondrian_rect_width r ∧      a * mondrian_rect_height (mondrian_rect_div a r) = mondrian_rect_height r := by  exact ⟨mondrian_sub_div_mul a _ _ ha (Nat.le_of_lt hx) hw,    mondrian_sub_div_mul a _ _ ha (Nat.le_of_lt hy) hh⟩
See it in the graphDiscuss this resultChallenge it