/-
Copyright 2025 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
import FormalConjecturesUtilMathoverflow 34145
Can the unit square be covered by $1/k$-by-$1/(k+1)$ rectangles (across $1 \le k$ natural)?
I am deliberately not requiring that the rotations can only be $0^\circ, 90^\circ, 180^\circ, \text{ or } 270^\circ$.
Because of indexing, since n : ℕ starts at 0, we change the side lengths to $1 / (n + 1)$ and
$1 / (n + 2)$, so that the first rectangle is $1/1$ by $1/2$, the second is $1/2$ by $1/3$, etc.
Reference: mathoverflow/34145 asked by user Kaveh
open Real MeasureTheory Measure Modulenamespace Mathoverflow34145
A rectangle is specified by its width, height, starting point, and rotation.
The rectangle is assumed to start in the lower left corner. For example, the unit square
${ (x, y) \mid 0 \le x \le 1, 0 \le y \le 1 }$ is specified as ⟨1, 1, (0, 0), 0⟩
structure Rectangle : Type where
width : ℝ
height : ℝ
start : ℝ × ℝ
rotation : AngleA combination of a rotation and a translation to map the standard rectangle to the desired rectangle.
noncomputable def rigidMotion (start : ℝ × ℝ) (θ : Angle) (p : ℝ × ℝ) : (ℝ × ℝ) :=
(start.1 + p.1 * θ.cos - p.2 * θ.sin, start.2 + p.1 * θ.sin + p.2 * θ.cos)@[category test, AMS 51]
lemma rigidMotion_test : rigidMotion (sqrt 2, sqrt 11) (2 * π / 3 : ℝ) (sqrt 5, sqrt 7) =
(sqrt 2 - sqrt 5 / 2 - sqrt 21 / 2, -sqrt 7 / 2 + sqrt 11 + sqrt 15 / 2) := ⊢ rigidMotion (√2, √11) ↑(2 * π / 3) (√5, √7) = (√2 - √5 / 2 - √21 / 2, -√7 / 2 + √11 + √15 / 2)
⊢ √2 + √5 * (2 * (2 ^ 2)⁻¹ - 1) - √7 * (2 * (√3 / 2) * 2⁻¹) = √2 - √5 / 2 - √3 * (√7 / 2) ∧
√11 + √5 * (2 * (√3 / 2) * 2⁻¹) + √7 * (2 * (2 ^ 2)⁻¹ - 1) = -√7 / 2 + √11 + √3 * (√5 / 2)
⊢ True ∧ True; All goals completed! 🐙A scaling to map the unit square to a standard rectangle.
noncomputable def scale (x y : ℝ) (p : ℝ × ℝ) : (ℝ × ℝ) :=
(x * p.1, y * p.2)The unit square.
def unitSquare : Set (ℝ × ℝ) :=
{ p | 0 ≤ p.1 ∧ p.1 ≤ 1 ∧ 0 ≤ p.2 ∧ p.2 ≤ 1 }
Converts a rectangle to a set in ℝ × ℝ.
def Rectangle.toSet (r : Rectangle) : Set (ℝ × ℝ) :=
rigidMotion r.start r.rotation '' (scale r.width r.height '' unitSquare)
The standard Lebesgue measure on ℝ².
noncomputable abbrev lbMeasure : Measure (ℝ × ℝ) :=
(Basis.finTwoProd ℝ).addHaar
lbMeasure is invariant under rigidMotion start θ.
start:ℝ × ℝθ:Angles:Set (ℝ × ℝ)α:ℝ × ℝ → ℝ × ℝ := fun x ↦ (x.1 * θ.cos - x.2 * θ.sin, x.1 * θ.sin + x.2 * θ.cos)β:Basis (Fin 2) ℝ (ℝ × ℝ) := Basis.finTwoProd ℝ⊢ lbMeasure s =
ENNReal.ofReal
|(LinearMap.toMatrix β β) ((β.constr ℝ) ![α (β 0), α (β 1)]) 0 0 *
(LinearMap.toMatrix β β) ((β.constr ℝ) ![α (β 0), α (β 1)]) 1 1 -
(LinearMap.toMatrix β β) ((β.constr ℝ) ![α (β 0), α (β 1)]) 0 1 *
(LinearMap.toMatrix β β) ((β.constr ℝ) ![α (β 0), α (β 1)]) 1 0| *
β.addHaar s
simp [α, β, LinearMap.toMatrix_apply, ← sq] All goals completed! 🐙
lbMeasure is scaled by scale.
@[category test, AMS 51]
lemma lbMeasure_scale (x y : ℝ) (s : Set (ℝ × ℝ)) :
lbMeasure (scale x y '' s) = .ofReal |x * y| * lbMeasure s := by x:ℝy:ℝs:Set (ℝ × ℝ)⊢ lbMeasure (scale x y '' s) = ENNReal.ofReal |x * y| * lbMeasure s
let scaleLinear : (ℝ × ℝ) →ₗ[ℝ] (ℝ × ℝ) :=
{ toFun p := (x * p.1, y * p.2)
map_add' p q := by x:ℝy:ℝs:Set (ℝ × ℝ)p:ℝ × ℝq:ℝ × ℝ⊢ (x * (p + q).1, y * (p + q).2) = (x * p.1, y * p.2) + (x * q.1, y * q.2) x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }⊢ lbMeasure (scale x y '' s) = ENNReal.ofReal |x * y| * lbMeasure s simp [mul_add] All goals completed! 🐙 x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }⊢ lbMeasure (scale x y '' s) = ENNReal.ofReal |x * y| * lbMeasure s
map_smul' c p := by x:ℝy:ℝs:Set (ℝ × ℝ)c:ℝp:ℝ × ℝ⊢ (x * (c • p).1, y * (c • p).2) = (RingHom.id ℝ) c • (x * p.1, y * p.2) x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }⊢ lbMeasure (scale x y '' s) = ENNReal.ofReal |x * y| * lbMeasure s simp [mul_left_comm] All goals completed! 🐙 x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }⊢ lbMeasure (scale x y '' s) = ENNReal.ofReal |x * y| * lbMeasure s } x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }⊢ lbMeasure (scale x y '' s) = ENNReal.ofReal |x * y| * lbMeasure s
have h₁ : scale x y = scaleLinear := rfl x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinear⊢ lbMeasure (scale x y '' s) = ENNReal.ofReal |x * y| * lbMeasure s
have h₂ : scaleLinear.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ) = !![x, 0; 0, y] := by
ext i j x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLineari:Fin 2j:Fin 2⊢ (LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ)) scaleLinear i j = !![x, 0; 0, y] i j x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinearh₂:(LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ)) scaleLinear = !![x, 0; 0, y]⊢ lbMeasure (scale x y '' s) = ENNReal.ofReal |x * y| * lbMeasure s; unfold scaleLinear x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLineari:Fin 2j:Fin 2⊢ (LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))
{ toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ } i j =
!![x, 0; 0, y] i j x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinearh₂:(LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ)) scaleLinear = !![x, 0; 0, y]⊢ lbMeasure (scale x y '' s) = ENNReal.ofReal |x * y| * lbMeasure s; fin_cases i «0» x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinearj:Fin 2⊢ (LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))
{ toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ } ((fun i ↦ i) ⟨0, ⋯⟩) j =
!![x, 0; 0, y] ((fun i ↦ i) ⟨0, ⋯⟩) j«1» x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinearj:Fin 2⊢ (LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))
{ toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ } ((fun i ↦ i) ⟨1, ⋯⟩) j =
!![x, 0; 0, y] ((fun i ↦ i) ⟨1, ⋯⟩) j x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinearh₂:(LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ)) scaleLinear = !![x, 0; 0, y]⊢ lbMeasure (scale x y '' s) = ENNReal.ofReal |x * y| * lbMeasure s <;> «0» x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinearj:Fin 2⊢ (LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))
{ toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ } ((fun i ↦ i) ⟨0, ⋯⟩) j =
!![x, 0; 0, y] ((fun i ↦ i) ⟨0, ⋯⟩) j«1» x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinearj:Fin 2⊢ (LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))
{ toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ } ((fun i ↦ i) ⟨1, ⋯⟩) j =
!![x, 0; 0, y] ((fun i ↦ i) ⟨1, ⋯⟩) j x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinearh₂:(LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ)) scaleLinear = !![x, 0; 0, y]⊢ lbMeasure (scale x y '' s) = ENNReal.ofReal |x * y| * lbMeasure s fin_cases j «1».«0» x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinear⊢ (LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))
{ toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ } ((fun i ↦ i) ⟨1, ⋯⟩) ((fun i ↦ i) ⟨0, ⋯⟩) =
!![x, 0; 0, y] ((fun i ↦ i) ⟨1, ⋯⟩) ((fun i ↦ i) ⟨0, ⋯⟩)«1».«1» x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinear⊢ (LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))
{ toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ } ((fun i ↦ i) ⟨1, ⋯⟩) ((fun i ↦ i) ⟨1, ⋯⟩) =
!![x, 0; 0, y] ((fun i ↦ i) ⟨1, ⋯⟩) ((fun i ↦ i) ⟨1, ⋯⟩) x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinearh₂:(LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ)) scaleLinear = !![x, 0; 0, y]⊢ lbMeasure (scale x y '' s) = ENNReal.ofReal |x * y| * lbMeasure s <;> «0».«0» x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinear⊢ (LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))
{ toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ } ((fun i ↦ i) ⟨0, ⋯⟩) ((fun i ↦ i) ⟨0, ⋯⟩) =
!![x, 0; 0, y] ((fun i ↦ i) ⟨0, ⋯⟩) ((fun i ↦ i) ⟨0, ⋯⟩)«0».«1» x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinear⊢ (LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))
{ toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ } ((fun i ↦ i) ⟨0, ⋯⟩) ((fun i ↦ i) ⟨1, ⋯⟩) =
!![x, 0; 0, y] ((fun i ↦ i) ⟨0, ⋯⟩) ((fun i ↦ i) ⟨1, ⋯⟩)«1».«0» x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinear⊢ (LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))
{ toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ } ((fun i ↦ i) ⟨1, ⋯⟩) ((fun i ↦ i) ⟨0, ⋯⟩) =
!![x, 0; 0, y] ((fun i ↦ i) ⟨1, ⋯⟩) ((fun i ↦ i) ⟨0, ⋯⟩)«1».«1» x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinear⊢ (LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))
{ toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ } ((fun i ↦ i) ⟨1, ⋯⟩) ((fun i ↦ i) ⟨1, ⋯⟩) =
!![x, 0; 0, y] ((fun i ↦ i) ⟨1, ⋯⟩) ((fun i ↦ i) ⟨1, ⋯⟩) x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinearh₂:(LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ)) scaleLinear = !![x, 0; 0, y]⊢ lbMeasure (scale x y '' s) = ENNReal.ofReal |x * y| * lbMeasure s simp [LinearMap.toMatrix_apply] x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinearh₂:(LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ)) scaleLinear = !![x, 0; 0, y]⊢ lbMeasure (scale x y '' s) = ENNReal.ofReal |x * y| * lbMeasure s x:ℝy:ℝs:Set (ℝ × ℝ)scaleLinear:ℝ × ℝ →ₗ[ℝ] ℝ × ℝ := { toFun := fun p ↦ (x * p.1, y * p.2), map_add' := ⋯, map_smul' := ⋯ }h₁:scale x y = ⇑scaleLinearh₂:(LinearMap.toMatrix (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ)) scaleLinear = !![x, 0; 0, y]⊢ lbMeasure (scale x y '' s) = ENNReal.ofReal |x * y| * lbMeasure s
simp [h₁, ← LinearMap.det_toMatrix (Basis.finTwoProd ℝ), h₂] All goals completed! 🐙
The Lebesgue measure of the unit square is 1.
@[category test, AMS 51]
lemma lbMeasure_unitSquare : lbMeasure unitSquare = 1 := by ⊢ lbMeasure unitSquare = 1
convert (Basis.addHaar_eq_iff (Basis.finTwoProd ℝ) _).1 rfl ⊢ unitSquare = ↑(Basis.finTwoProd ℝ).parallelepiped
ext p p:ℝ × ℝ⊢ p ∈ unitSquare ↔ p ∈ ↑(Basis.finTwoProd ℝ).parallelepiped
simp only [unitSquare, Set.mem_ofPred_eq, Basis.coe_parallelepiped, mem_parallelepiped_iff,
Set.mem_Icc, Fin.sum_univ_two, Fin.isValue, Basis.finTwoProd_zero, Prod.smul_mk, smul_eq_mul,
mul_one, mul_zero, Basis.finTwoProd_one, Prod.mk_add_mk, add_zero, zero_add, Pi.le_def] p:ℝ × ℝ⊢ 0 ≤ p.1 ∧ p.1 ≤ 1 ∧ 0 ≤ p.2 ∧ p.2 ≤ 1 ↔ ∃ t, ((∀ (i : Fin 2), 0 i ≤ t i) ∧ ∀ (i : Fin 2), t i ≤ 1 i) ∧ p = (t 0, t 1)
exact ⟨fun h ↦ ⟨![p.1, p.2], by p:ℝ × ℝh:0 ≤ p.1 ∧ p.1 ≤ 1 ∧ 0 ≤ p.2 ∧ p.2 ≤ 1⊢ ((∀ (i : Fin 2), 0 i ≤ ![p.1, p.2] i) ∧ ∀ (i : Fin 2), ![p.1, p.2] i ≤ 1 i) ∧ p = (![p.1, p.2] 0, ![p.1, p.2] 1) simp [Fin.forall_fin_succ, h] All goals completed! 🐙⟩,
fun ⟨t, ht⟩ ↦ ht.2 ▸ ⟨ht.1.1 0, ht.1.2 0, ht.1.1 1, ht.1.2 1⟩⟩
The Lebesgue measure of the a rectangle r is r.width * r.height
@[category test, AMS 51]
lemma lbMeasure_rectangle_toSet (r : Rectangle) :
lbMeasure r.toSet = .ofReal |r.width * r.height| := by r:Rectangle⊢ lbMeasure r.toSet = ENNReal.ofReal |r.width * r.height|
rw [Rectangle.toSet, r:Rectangle⊢ lbMeasure (rigidMotion r.start r.rotation '' scale r.width r.height '' unitSquare) = ENNReal.ofReal |r.width * r.height| All goals completed! 🐙 lbMeasure_rigidMotion, r:Rectangle⊢ lbMeasure (scale r.width r.height '' unitSquare) = ENNReal.ofReal |r.width * r.height| All goals completed! 🐙 lbMeasure_scale, r:Rectangle⊢ ENNReal.ofReal |r.width * r.height| * lbMeasure unitSquare = ENNReal.ofReal |r.width * r.height| All goals completed! 🐙 lbMeasure_unitSquare, r:Rectangle⊢ ENNReal.ofReal |r.width * r.height| * 1 = ENNReal.ofReal |r.width * r.height| All goals completed! 🐙 mul_one r:Rectangle⊢ ENNReal.ofReal |r.width * r.height| = ENNReal.ofReal |r.width * r.height| All goals completed! 🐙] All goals completed! 🐙The areas of the required rectangles sum to 1.
@[category test, AMS 51]
lemma tsum_area_eq_one : ∑' (n : ℕ), ((1 / (n + 1)) * (1 / (n + 2)) : ℝ) = 1 := by ⊢ ∑' (n : ℕ), 1 / (↑n + 1) * (1 / (↑n + 2)) = 1
have (n : ℕ) : ∑ i ∈ Finset.range n, (1 / (i + 1) * (1 / (i + 2)) : ℝ) = 1 - 1 / (n + 1) := by
induction n with
| zero => zero ⊢ ∑ i ∈ Finset.range 0, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑0 + 1) this:∀ (n : ℕ), ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ ∑' (n : ℕ), 1 / (↑n + 1) * (1 / (↑n + 2)) = 1 simp All goals completed! 🐙 this:∀ (n : ℕ), ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ ∑' (n : ℕ), 1 / (↑n + 1) * (1 / (↑n + 2)) = 1
| succ n ih => succ n:ℕih:∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ ∑ i ∈ Finset.range (n + 1), 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑(n + 1) + 1) this:∀ (n : ℕ), ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ ∑' (n : ℕ), 1 / (↑n + 1) * (1 / (↑n + 2)) = 1 rw [Finset.sum_range_succ, succ n:ℕih:∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ ∑ x ∈ Finset.range n, 1 / (↑x + 1) * (1 / (↑x + 2)) + 1 / (↑n + 1) * (1 / (↑n + 2)) = 1 - 1 / (↑(n + 1) + 1) succ n:ℕih:∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ 1 - 1 / (↑n + 1) + 1 / (↑n + 1) * (1 / (↑n + 2)) = 1 - 1 / (↑(n + 1) + 1) this:∀ (n : ℕ), ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ ∑' (n : ℕ), 1 / (↑n + 1) * (1 / (↑n + 2)) = 1 ih succ n:ℕih:∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ 1 - 1 / (↑n + 1) + 1 / (↑n + 1) * (1 / (↑n + 2)) = 1 - 1 / (↑(n + 1) + 1)succ n:ℕih:∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ 1 - 1 / (↑n + 1) + 1 / (↑n + 1) * (1 / (↑n + 2)) = 1 - 1 / (↑(n + 1) + 1) this:∀ (n : ℕ), ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ ∑' (n : ℕ), 1 / (↑n + 1) * (1 / (↑n + 2)) = 1]succ n:ℕih:∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ 1 - 1 / (↑n + 1) + 1 / (↑n + 1) * (1 / (↑n + 2)) = 1 - 1 / (↑(n + 1) + 1) this:∀ (n : ℕ), ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ ∑' (n : ℕ), 1 / (↑n + 1) * (1 / (↑n + 2)) = 1; field_simp succ n:ℕih:∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ ((↑n + 1 - 1) * (↑n + 2) + 1) * (↑(n + 1) + 1) = (↑n + 1) * (↑n + 2) * (↑(n + 1) + 1 - 1) this:∀ (n : ℕ), ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ ∑' (n : ℕ), 1 / (↑n + 1) * (1 / (↑n + 2)) = 1; push_cast succ n:ℕih:∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ ((↑n + 1 - 1) * (↑n + 2) + 1) * (↑n + 1 + 1) = (↑n + 1) * (↑n + 2) * (↑n + 1 + 1 - 1) this:∀ (n : ℕ), ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ ∑' (n : ℕ), 1 / (↑n + 1) * (1 / (↑n + 2)) = 1; ring this:∀ (n : ℕ), ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ ∑' (n : ℕ), 1 / (↑n + 1) * (1 / (↑n + 2)) = 1 this:∀ (n : ℕ), ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ ∑' (n : ℕ), 1 / (↑n + 1) * (1 / (↑n + 2)) = 1
refine HasSum.tsum_eq ((hasSum_iff_tendsto_nat_of_nonneg (fun i ↦ ?_) _).2 ?_) refine_1 this:∀ (n : ℕ), ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)i:ℕ⊢ 0 ≤ 1 / (↑i + 1) * (1 / (↑i + 2))refine_2 this:∀ (n : ℕ), ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ Filter.Tendsto (fun n ↦ ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2))) Filter.atTop (nhds 1)
· refine_1 this:∀ (n : ℕ), ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)i:ℕ⊢ 0 ≤ 1 / (↑i + 1) * (1 / (↑i + 2)) positivity All goals completed! 🐙
· refine_2 this:∀ (n : ℕ), ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ Filter.Tendsto (fun n ↦ ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2))) Filter.atTop (nhds 1) simp_rw [ refine_2 this:∀ (n : ℕ), ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ Filter.Tendsto (fun n ↦ ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2))) Filter.atTop (nhds 1)this refine_2 this:∀ (n : ℕ), ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ Filter.Tendsto (fun n ↦ 1 - 1 / (↑n + 1)) Filter.atTop (nhds 1)]
convert tendsto_one_div_add_atTop_nhds_zero_nat.const_sub (1 : ℝ) (c := 0) using 1 this:∀ (n : ℕ), ∑ i ∈ Finset.range n, 1 / (↑i + 1) * (1 / (↑i + 2)) = 1 - 1 / (↑n + 1)⊢ nhds 1 = nhds (1 - 0)
norm_num All goals completed! 🐙
A configuration of rectangles of sides 1 / (n + 1) and 1 / (n + 2).
structure Configuration : Type where
rect (n : ℕ) : Rectangle
rect_width (n : ℕ) : (rect n).width = 1 / (n + 1)
rect_height (n : ℕ) : (rect n).height = 1 / (n + 2)A "packing" means that the interiors of any two rectangles are disjoint.
def Configuration.IsPacking (c : Configuration) : Prop :=
Pairwise fun m n ↦ interior (c.rect m).toSet ∩ interior (c.rect n).toSet = ∅
Can a unit square be covered by rectangles of width 1 / (n + 1) and height 1 / (n + 2)?
@[category research open, AMS 51]
theorem rectangles_cover_unit_square :
answer(sorry) ↔ ∃ c : Configuration, ∀ p ∈ unitSquare, ∃ n, p ∈ (c.rect n).toSet := by ⊢ True ↔ ∃ c, ∀ p ∈ unitSquare, ∃ n, p ∈ (c.rect n).toSet
sorry All goals completed! 🐙
Equivalently, can a unit square be packed with rectangles of width 1 / (n + 1) and height
1 / (n + 2)?
@[category research open, AMS 51]
theorem rectangles_pack_unit_square :
answer(sorry) ↔ ∃ c : Configuration, (∀ n, (c.rect n).toSet ⊆ unitSquare) ∧ c.IsPacking := by ⊢ True ↔ ∃ c, (∀ (n : ℕ), (c.rect n).toSet ⊆ unitSquare) ∧ c.IsPacking
sorry All goals completed! 🐙
It is known that packing the rectangles into a square of side length 133/132 is possible.
Reference: https://www.sciencedirect.com/science/article/pii/0097316594901163
@[category research solved, AMS 51]
theorem rectangles_pack_square_133_div_132 :
(∃ c : Configuration,
(∀ n, (c.rect n).toSet ⊆ Rectangle.toSet ⟨133/132, 133/132, (0, 0), 0⟩) ∧
c.IsPacking) := by ⊢ ∃ c,
(∀ (n : ℕ), (c.rect n).toSet ⊆ { width := 133 / 132, height := 133 / 132, start := (0, 0), rotation := 0 }.toSet) ∧
c.IsPacking
sorry All goals completed! 🐙
It is known that packing the rectangles into a square of side length 501/500 is possible.
Reference: https://www.sciencedirect.com/science/article/pii/S0167506008706009
@[category research solved, AMS 51]
theorem rectangles_pack_square_501_div_500 :
(∃ c : Configuration,
(∀ n, (c.rect n).toSet ⊆ Rectangle.toSet ⟨501/500, 501/500, (0, 0), 0⟩) ∧
c.IsPacking) := by ⊢ ∃ c,
(∀ (n : ℕ), (c.rect n).toSet ⊆ { width := 501 / 500, height := 501 / 500, start := (0, 0), rotation := 0 }.toSet) ∧
c.IsPacking
sorry All goals completed! 🐙end Mathoverflow34145