wiedijk_100_theorems.cubing_a_cubeArchive.Wiedijk100Theorems.CubingACube

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -5,7 +5,7 @@ Authors: Floris van Doorn
 -/
 import Data.Real.Basic
 import Data.Set.Finite
-import Data.Set.Intervals.Disjoint
+import Order.Interval.Set.Disjoint
 
 #align_import wiedijk_100_theorems.cubing_a_cube from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
 
Diff
@@ -40,7 +40,7 @@ theorem Ico_lemma {α} [LinearOrder α] {x₁ x₂ y₁ y₂ z₁ z₂ w : α} (
     (h₂ : y₂ < x₂) (hz₁ : z₁ ≤ y₂) (hz₂ : y₁ ≤ z₂) (hw : w ∉ Ico y₁ y₂ ∧ w ∈ Ico z₁ z₂) :
     ∃ w, w ∈ Ico x₁ x₂ ∧ w ∉ Ico y₁ y₂ ∧ w ∈ Ico z₁ z₂ :=
   by
-  simp only [not_and, not_lt, mem_Ico] at hw 
+  simp only [not_and, not_lt, mem_Ico] at hw
   refine' ⟨max x₁ (min w y₂), _, _, _⟩
   · simp [le_refl, lt_trans h₁ (lt_trans hy h₂), h₂]
   · simp (config := { contextual := true }) [hw, lt_irrefl, not_le_of_lt h₁]
@@ -185,7 +185,7 @@ theorem zero_le_b {i j} : 0 ≤ (cs i).b j :=
 #align theorems_100.«82».correct.zero_le_b Theorems100.«82».Correct.zero_le_b
 
 theorem b_add_w_le_one {j} : (cs i).b j + (cs i).w ≤ 1 := by have := side_subset h;
-  rw [side, Ico_subset_Ico_iff] at this ; convert this.2; simp [hw]
+  rw [side, Ico_subset_Ico_iff] at this; convert this.2; simp [hw]
 #align theorems_100.«82».correct.b_add_w_le_one Theorems100.«82».Correct.b_add_w_le_one
 
 theorem nontrivial_fin : Nontrivial (Fin n) :=
@@ -213,7 +213,7 @@ theorem w_ne_one [Nontrivial ι] (i : ι) : (cs i).w ≠ 1 :=
 theorem shiftUp_bottom_subset_bottoms (hc : (cs i).xm ≠ 1) :
     (cs i).shiftUp.bottom ⊆ ⋃ i : ι, (cs i).bottom :=
   by
-  intro p hp; cases' hp with hp0 hps; rw [tail_shift_up] at hps 
+  intro p hp; cases' hp with hp0 hps; rw [tail_shift_up] at hps
   have : p ∈ (unit_cube : cube (n + 1)).to_set :=
     by
     simp only [to_set, forall_fin_succ, hp0, side_unit_cube, mem_set_of_eq, mem_Ico, head_shift_up]
@@ -221,10 +221,10 @@ theorem shiftUp_bottom_subset_bottoms (hc : (cs i).xm ≠ 1) :
     · rw [← zero_add (0 : ℝ)]; apply add_le_add; apply zero_le_b h; apply (cs i).hw'
     · exact lt_of_le_of_ne (b_add_w_le_one h) hc
     intro j; exact side_subset h (hps j)
-  rw [← h.2, mem_Union] at this ; rcases this with ⟨i', hi'⟩
+  rw [← h.2, mem_Union] at this; rcases this with ⟨i', hi'⟩
   rw [mem_Union]; use i'; refine' ⟨_, fun j => hi' j.succ⟩
   have : i ≠ i' := by rintro rfl; apply not_le_of_lt (hi' 0).2; rw [hp0]; rfl
-  have := h.1 this; rw [on_fun, to_set_disjoint, exists_fin_succ] at this 
+  have := h.1 this; rw [on_fun, to_set_disjoint, exists_fin_succ] at this
   rcases this with (h0 | ⟨j, hj⟩)
   rw [hp0]; symm; apply eq_of_Ico_disjoint h0 (by simp [hw]) _
   convert hi' 0; rw [hp0]; rfl
@@ -263,7 +263,7 @@ theorem valley_unitCube [Nontrivial ι] (h : Correct cs) : Valley cs unitCube :=
       by
       dsimp only [to_set, unit_cube, mem_set_of_eq]
       rw [forall_fin_succ, h0]; constructor; norm_num [side, unit_cube]; exact hv
-    rw [← h.2, mem_Union] at this ; rcases this with ⟨i, hi⟩
+    rw [← h.2, mem_Union] at this; rcases this with ⟨i, hi⟩
     use i
     constructor; · apply le_antisymm; rw [h0]; exact h.zero_le_b; exact (hi 0).1
     intro j; exact hi _
@@ -295,7 +295,7 @@ theorem b_le_b (hi : i ∈ bcubes cs c) (j : Fin n) : c.b j.succ ≤ (cs i).b j.
 
 theorem t_le_t (hi : i ∈ bcubes cs c) (j : Fin n) : (cs i).b j.succ + (cs i).w ≤ c.b j.succ + c.w :=
   by
-  have h' := tail_sub hi j; dsimp only [side] at h' ; rw [Ico_subset_Ico_iff] at h' 
+  have h' := tail_sub hi j; dsimp only [side] at h'; rw [Ico_subset_Ico_iff] at h'
   exact h'.2; simp [hw]
 #align theorems_100.«82».t_le_t Theorems100.«82».t_le_t
 
@@ -401,7 +401,7 @@ theorem smallest_onBoundary {j} (bi : OnBoundary (mi_mem_bcubes : mi h v ∈ _)
     rcases(nontrivial_bcubes h v).exists_ne i with ⟨i', hi', h2i'⟩
     exact ⟨i', hi', h2i'⟩
   rcases Set.exists_min_image s (w ∘ cs) (Set.toFinite _) hs with ⟨i', ⟨hi', h2i'⟩, h3i'⟩
-  rw [mem_singleton_iff] at h2i' 
+  rw [mem_singleton_iff] at h2i'
   let x := c.b j.succ + c.w - (cs i').w
   have hx : x < (cs i).b j.succ := by
     dsimp only [x]; rw [← bi, add_sub_assoc, add_lt_iff_neg_left, sub_lt_zero]
@@ -486,7 +486,7 @@ theorem mi_not_on_boundary' (j : Fin n) :
       (cs (mi h v)).tail.b j + (cs (mi h v)).w < c.tail.b j + c.w :=
   by
   have := mi_not_on_boundary h v j
-  simp only [on_boundary, not_or] at this ; cases' this with h1 h2
+  simp only [on_boundary, not_or] at this; cases' this with h1 h2
   constructor
   apply lt_of_le_of_ne (b_le_b mi_mem_bcubes _) h1
   apply lt_of_le_of_ne _ h2
@@ -501,15 +501,15 @@ theorem valley_mi : Valley cs (cs (mi h v)).shiftUp :=
   let i := mi h v; have hi : i ∈ bcubes cs c := mi_mem_bcubes
   refine' ⟨_, _, _⟩
   · intro p; apply h.shift_up_bottom_subset_bottoms mi_xm_ne_one
-  · rintro i' hi' ⟨p2, hp2, h2p2⟩; simp only [head_shift_up] at hi' 
+  · rintro i' hi' ⟨p2, hp2, h2p2⟩; simp only [head_shift_up] at hi'
     classical
     by_contra h2i'
-    rw [tail_shift_up] at h2p2 
-    simp only [not_subset, tail_shift_up] at h2i' 
+    rw [tail_shift_up] at h2p2
+    simp only [not_subset, tail_shift_up] at h2i'
     rcases h2i' with ⟨p1, hp1, h2p1⟩
     have : ∃ p3, p3 ∈ (cs i').tail.to_set ∧ p3 ∉ (cs i).tail.to_set ∧ p3 ∈ c.tail.to_set :=
       by
-      simp only [to_set, Classical.not_forall, mem_set_of_eq] at h2p1 ; cases' h2p1 with j hj
+      simp only [to_set, Classical.not_forall, mem_set_of_eq] at h2p1; cases' h2p1 with j hj
       rcases Ico_lemma (mi_not_on_boundary' j).1 (by simp [hw]) (mi_not_on_boundary' j).2
           (le_trans (hp2 j).1 <| le_of_lt (h2p2 j).2) (le_trans (h2p2 j).1 <| le_of_lt (hp2 j).2)
           ⟨hj, hp1 j⟩ with
@@ -546,7 +546,7 @@ theorem valley_mi : Valley cs (cs (mi h v)).shiftUp :=
     rw [← hi', ← hi''.1, hi.1]
     rfl
   · intro i' hi' h2i'
-    dsimp only [shift_up] at h2i' 
+    dsimp only [shift_up] at h2i'
     replace h2i' := h.injective h2i'.symm
     induction h2i'
     exact b_ne_xm (cs i) hi'
Diff
@@ -503,6 +503,48 @@ theorem valley_mi : Valley cs (cs (mi h v)).shiftUp :=
   · intro p; apply h.shift_up_bottom_subset_bottoms mi_xm_ne_one
   · rintro i' hi' ⟨p2, hp2, h2p2⟩; simp only [head_shift_up] at hi' 
     classical
+    by_contra h2i'
+    rw [tail_shift_up] at h2p2 
+    simp only [not_subset, tail_shift_up] at h2i' 
+    rcases h2i' with ⟨p1, hp1, h2p1⟩
+    have : ∃ p3, p3 ∈ (cs i').tail.to_set ∧ p3 ∉ (cs i).tail.to_set ∧ p3 ∈ c.tail.to_set :=
+      by
+      simp only [to_set, Classical.not_forall, mem_set_of_eq] at h2p1 ; cases' h2p1 with j hj
+      rcases Ico_lemma (mi_not_on_boundary' j).1 (by simp [hw]) (mi_not_on_boundary' j).2
+          (le_trans (hp2 j).1 <| le_of_lt (h2p2 j).2) (le_trans (h2p2 j).1 <| le_of_lt (hp2 j).2)
+          ⟨hj, hp1 j⟩ with
+        ⟨w, hw, h2w, h3w⟩
+      refine' ⟨fun j' => if j' = j then w else p2 j', _, _, _⟩
+      · intro j'; by_cases h : j' = j
+        · simp only [if_pos h]; convert h3w
+        · simp only [if_neg h]; exact hp2 j'
+      · simp only [to_set, Classical.not_forall, mem_set_of_eq]; use j; rw [if_pos rfl]; convert h2w
+      · intro j'; by_cases h : j' = j
+        · simp only [if_pos h, side_tail]; convert hw
+        · simp only [if_neg h]; apply hi.2; apply h2p2
+    rcases this with ⟨p3, h1p3, h2p3, h3p3⟩
+    let p := @cons n (fun _ => ℝ) (c.b 0) p3
+    have hp : p ∈ c.bottom := by refine' ⟨rfl, _⟩; rwa [tail_cons]
+    rcases v.1 hp with ⟨_, ⟨i'', rfl⟩, hi''⟩
+    have h2i'' : i'' ∈ bcubes cs c := by
+      use hi''.1.symm; apply v.2.1 i'' hi''.1.symm
+      use tail p; constructor; exact hi''.2; rw [tail_cons]; exact h3p3
+    have h3i'' : (cs i).w < (cs i'').w := by apply mi_strict_minimal _ h2i''; rintro rfl;
+      apply h2p3; convert hi''.2; rw [tail_cons]
+    let p' := @cons n (fun _ => ℝ) (cs i).xm p3
+    have hp' : p' ∈ (cs i').to_set := by simpa [to_set, forall_fin_succ, p', hi'.symm] using h1p3
+    have h2p' : p' ∈ (cs i'').to_set :=
+      by
+      simp only [to_set, forall_fin_succ, p', cons_succ, cons_zero, mem_set_of_eq]
+      refine' ⟨_, by simpa [to_set, p] using hi''.2⟩
+      have : (cs i).b 0 = (cs i'').b 0 := by rw [hi.1, h2i''.1]
+      simp [side, hw', xm, this, h3i'']
+    apply not_disjoint_iff.mpr ⟨p', hp', h2p'⟩
+    apply h.1
+    rintro rfl
+    apply (cs i).b_ne_xm
+    rw [← hi', ← hi''.1, hi.1]
+    rfl
   · intro i' hi' h2i'
     dsimp only [shift_up] at h2i' 
     replace h2i' := h.injective h2i'.symm
Diff
@@ -503,48 +503,6 @@ theorem valley_mi : Valley cs (cs (mi h v)).shiftUp :=
   · intro p; apply h.shift_up_bottom_subset_bottoms mi_xm_ne_one
   · rintro i' hi' ⟨p2, hp2, h2p2⟩; simp only [head_shift_up] at hi' 
     classical
-    by_contra h2i'
-    rw [tail_shift_up] at h2p2 
-    simp only [not_subset, tail_shift_up] at h2i' 
-    rcases h2i' with ⟨p1, hp1, h2p1⟩
-    have : ∃ p3, p3 ∈ (cs i').tail.to_set ∧ p3 ∉ (cs i).tail.to_set ∧ p3 ∈ c.tail.to_set :=
-      by
-      simp only [to_set, Classical.not_forall, mem_set_of_eq] at h2p1 ; cases' h2p1 with j hj
-      rcases Ico_lemma (mi_not_on_boundary' j).1 (by simp [hw]) (mi_not_on_boundary' j).2
-          (le_trans (hp2 j).1 <| le_of_lt (h2p2 j).2) (le_trans (h2p2 j).1 <| le_of_lt (hp2 j).2)
-          ⟨hj, hp1 j⟩ with
-        ⟨w, hw, h2w, h3w⟩
-      refine' ⟨fun j' => if j' = j then w else p2 j', _, _, _⟩
-      · intro j'; by_cases h : j' = j
-        · simp only [if_pos h]; convert h3w
-        · simp only [if_neg h]; exact hp2 j'
-      · simp only [to_set, Classical.not_forall, mem_set_of_eq]; use j; rw [if_pos rfl]; convert h2w
-      · intro j'; by_cases h : j' = j
-        · simp only [if_pos h, side_tail]; convert hw
-        · simp only [if_neg h]; apply hi.2; apply h2p2
-    rcases this with ⟨p3, h1p3, h2p3, h3p3⟩
-    let p := @cons n (fun _ => ℝ) (c.b 0) p3
-    have hp : p ∈ c.bottom := by refine' ⟨rfl, _⟩; rwa [tail_cons]
-    rcases v.1 hp with ⟨_, ⟨i'', rfl⟩, hi''⟩
-    have h2i'' : i'' ∈ bcubes cs c := by
-      use hi''.1.symm; apply v.2.1 i'' hi''.1.symm
-      use tail p; constructor; exact hi''.2; rw [tail_cons]; exact h3p3
-    have h3i'' : (cs i).w < (cs i'').w := by apply mi_strict_minimal _ h2i''; rintro rfl;
-      apply h2p3; convert hi''.2; rw [tail_cons]
-    let p' := @cons n (fun _ => ℝ) (cs i).xm p3
-    have hp' : p' ∈ (cs i').to_set := by simpa [to_set, forall_fin_succ, p', hi'.symm] using h1p3
-    have h2p' : p' ∈ (cs i'').to_set :=
-      by
-      simp only [to_set, forall_fin_succ, p', cons_succ, cons_zero, mem_set_of_eq]
-      refine' ⟨_, by simpa [to_set, p] using hi''.2⟩
-      have : (cs i).b 0 = (cs i'').b 0 := by rw [hi.1, h2i''.1]
-      simp [side, hw', xm, this, h3i'']
-    apply not_disjoint_iff.mpr ⟨p', hp', h2p'⟩
-    apply h.1
-    rintro rfl
-    apply (cs i).b_ne_xm
-    rw [← hi', ← hi''.1, hi.1]
-    rfl
   · intro i' hi' h2i'
     dsimp only [shift_up] at h2i' 
     replace h2i' := h.injective h2i'.symm
Diff
@@ -509,7 +509,7 @@ theorem valley_mi : Valley cs (cs (mi h v)).shiftUp :=
     rcases h2i' with ⟨p1, hp1, h2p1⟩
     have : ∃ p3, p3 ∈ (cs i').tail.to_set ∧ p3 ∉ (cs i).tail.to_set ∧ p3 ∈ c.tail.to_set :=
       by
-      simp only [to_set, not_forall, mem_set_of_eq] at h2p1 ; cases' h2p1 with j hj
+      simp only [to_set, Classical.not_forall, mem_set_of_eq] at h2p1 ; cases' h2p1 with j hj
       rcases Ico_lemma (mi_not_on_boundary' j).1 (by simp [hw]) (mi_not_on_boundary' j).2
           (le_trans (hp2 j).1 <| le_of_lt (h2p2 j).2) (le_trans (h2p2 j).1 <| le_of_lt (hp2 j).2)
           ⟨hj, hp1 j⟩ with
@@ -518,7 +518,7 @@ theorem valley_mi : Valley cs (cs (mi h v)).shiftUp :=
       · intro j'; by_cases h : j' = j
         · simp only [if_pos h]; convert h3w
         · simp only [if_neg h]; exact hp2 j'
-      · simp only [to_set, not_forall, mem_set_of_eq]; use j; rw [if_pos rfl]; convert h2w
+      · simp only [to_set, Classical.not_forall, mem_set_of_eq]; use j; rw [if_pos rfl]; convert h2w
       · intro j'; by_cases h : j' = j
         · simp only [if_pos h, side_tail]; convert hw
         · simp only [if_neg h]; apply hi.2; apply h2p2
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2019 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 -/
-import Mathbin.Data.Real.Basic
-import Mathbin.Data.Set.Finite
-import Mathbin.Data.Set.Intervals.Disjoint
+import Data.Real.Basic
+import Data.Set.Finite
+import Data.Set.Intervals.Disjoint
 
 #align_import wiedijk_100_theorems.cubing_a_cube from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2019 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
-
-! This file was ported from Lean 3 source module wiedijk_100_theorems.cubing_a_cube
-! leanprover-community/mathlib commit 08b081ea92d80e3a41f899eea36ef6d56e0f1db0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.Real.Basic
 import Mathbin.Data.Set.Finite
 import Mathbin.Data.Set.Intervals.Disjoint
 
+#align_import wiedijk_100_theorems.cubing_a_cube from "leanprover-community/mathlib"@"08b081ea92d80e3a41f899eea36ef6d56e0f1db0"
+
 /-!
 > THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
 > Any changes to this file require a corresponding PR to mathlib4.
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 
 ! This file was ported from Lean 3 source module wiedijk_100_theorems.cubing_a_cube
-! leanprover-community/mathlib commit 5563b1b49e86e135e8c7b556da5ad2f5ff881cad
+! leanprover-community/mathlib commit 08b081ea92d80e3a41f899eea36ef6d56e0f1db0
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -13,6 +13,9 @@ import Mathbin.Data.Set.Finite
 import Mathbin.Data.Set.Intervals.Disjoint
 
 /-!
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 Proof that a cube (in dimension n ≥ 3) cannot be cubed:
 There does not exist a partition of a cube into finitely many smaller cubes (at least two)
 of different sizes.
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2019 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 
-! This file was ported from Lean 3 source module «100-theorems-list».«82_cubing_a_cube»
-! leanprover-community/mathlib commit 328375597f2c0dd00522d9c2e5a33b6a6128feeb
+! This file was ported from Lean 3 source module wiedijk_100_theorems.cubing_a_cube
+! leanprover-community/mathlib commit 5563b1b49e86e135e8c7b556da5ad2f5ff881cad
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/

Changes in mathlib4

mathlib3
mathlib4
chore: adapt to multiple goal linter 1 (#12338)

A PR accompanying #12339.

Zulip discussion

Diff
@@ -182,8 +182,8 @@ theorem zero_le_b {i j} : 0 ≤ (cs i).b j :=
 theorem b_add_w_le_one {j} : (cs i).b j + (cs i).w ≤ 1 := by
   have : side (cs i) j ⊆ Ico 0 1 := side_subset h
   rw [side, Ico_subset_Ico_iff] at this
-  convert this.2
-  simp [hw]
+  · convert this.2
+  · simp [hw]
 #align theorems_100.«82».correct.b_add_w_le_one Theorems100.«82».Correct.b_add_w_le_one
 
 theorem nontrivial_fin : Nontrivial (Fin n) :=
@@ -199,9 +199,12 @@ theorem w_ne_one [Nontrivial ι] (i : ι) : (cs i).w ≠ 1 := by
   have h2p : p ∈ (cs i).toSet := by
     intro j; constructor
     trans (0 : ℝ)
-    · rw [← add_le_add_iff_right (1 : ℝ)]; convert b_add_w_le_one h; rw [hi]; rw [zero_add]
-    apply zero_le_b h; apply lt_of_lt_of_le (side_subset h <| (cs i').b_mem_side j).2
-    simp [hi, zero_le_b h]
+    · rw [← add_le_add_iff_right (1 : ℝ)]; convert b_add_w_le_one h
+      · rw [hi]
+      · rw [zero_add]
+    · apply zero_le_b h
+    · apply lt_of_lt_of_le (side_subset h <| (cs i').b_mem_side j).2
+      simp [hi, zero_le_b h]
   exact (h.PairwiseDisjoint hi').le_bot ⟨hp, h2p⟩
 #align theorems_100.«82».correct.w_ne_one Theorems100.«82».Correct.w_ne_one
 
@@ -213,7 +216,9 @@ theorem shiftUp_bottom_subset_bottoms (hc : (cs i).xm ≠ 1) :
   have : p ∈ (unitCube : Cube (n + 1)).toSet := by
     simp only [toSet, forall_fin_succ, hp0, side_unitCube, mem_setOf_eq, mem_Ico, head_shiftUp]
     refine' ⟨⟨_, _⟩, _⟩
-    · rw [← zero_add (0 : ℝ)]; apply add_le_add; apply zero_le_b h; apply (cs i).hw'
+    · rw [← zero_add (0 : ℝ)]; apply add_le_add
+      · apply zero_le_b h
+      · apply (cs i).hw'
     · exact lt_of_le_of_ne (b_add_w_le_one h) hc
     intro j; exact side_subset h (hps j)
   rw [← h.2, mem_iUnion] at this; rcases this with ⟨i', hi'⟩
@@ -222,9 +227,9 @@ theorem shiftUp_bottom_subset_bottoms (hc : (cs i).xm ≠ 1) :
   have := h.1 this
   rw [onFun, comp_apply, comp_apply, toSet_disjoint, exists_fin_succ] at this
   rcases this with (h0 | ⟨j, hj⟩)
-  rw [hp0]; symm; apply eq_of_Ico_disjoint h0 (by simp [hw]) _
-  convert hi' 0; rw [hp0]; rfl
-  exfalso; apply not_disjoint_iff.mpr ⟨tail p j, hps j, hi' j.succ⟩ hj
+  · rw [hp0]; symm; apply eq_of_Ico_disjoint h0 (by simp [hw]) _
+    convert hi' 0; rw [hp0]; rfl
+  · exfalso; apply not_disjoint_iff.mpr ⟨tail p j, hps j, hi' j.succ⟩ hj
 #align theorems_100.«82».correct.shift_up_bottom_subset_bottoms Theorems100.«82».Correct.shiftUp_bottom_subset_bottoms
 
 end Correct
@@ -255,11 +260,15 @@ theorem valley_unitCube [Nontrivial ι] (h : Correct cs) : Valley cs unitCube :=
     intro h0 hv
     have : v ∈ (unitCube : Cube (n + 1)).toSet := by
       dsimp only [toSet, unitCube, mem_setOf_eq]
-      rw [forall_fin_succ, h0]; constructor; norm_num [side, unitCube]; exact hv
+      rw [forall_fin_succ, h0]; constructor
+      · norm_num [side, unitCube]
+      · exact hv
     rw [← h.2, mem_iUnion] at this; rcases this with ⟨i, hi⟩
     use i
     constructor
-    · apply le_antisymm; rw [h0]; exact h.zero_le_b; exact (hi 0).1
+    · apply le_antisymm
+      · rw [h0]; exact h.zero_le_b
+      · exact (hi 0).1
     intro j; exact hi _
   · intro i _ _; rw [toSet_subset]; intro j; convert h.side_subset using 1; simp [side_tail]
   · intro i _; exact h.w_ne_one i
@@ -290,7 +299,8 @@ theorem b_le_b (hi : i ∈ bcubes cs c) (j : Fin n) : c.b j.succ ≤ (cs i).b j.
 theorem t_le_t (hi : i ∈ bcubes cs c) (j : Fin n) :
     (cs i).b j.succ + (cs i).w ≤ c.b j.succ + c.w := by
   have h' := tail_sub hi j; dsimp only [side] at h'; rw [Ico_subset_Ico_iff] at h'
-  exact h'.2; simp [hw]
+  · exact h'.2
+  · simp [hw]
 #align theorems_100.«82».t_le_t Theorems100.«82».t_le_t
 
 /-- Every cube in the valley must be smaller than it -/
@@ -362,9 +372,11 @@ theorem mi_strict_minimal (hii' : mi h v ≠ i) (hi : i ∈ bcubes cs c) :
 /-- The top of `mi` cannot be 1, since there is a larger cube in the valley -/
 theorem mi_xm_ne_one : (cs <| mi h v).xm ≠ 1 := by
   apply ne_of_lt; rcases (nontrivial_bcubes h v).exists_ne (mi h v) with ⟨i, hi, h2i⟩
-  apply lt_of_lt_of_le _ h.b_add_w_le_one; exact i; exact 0
-  rw [xm, mi_mem_bcubes.1, hi.1, _root_.add_lt_add_iff_left]
-  exact mi_strict_minimal h2i.symm hi
+  · apply lt_of_lt_of_le _ h.b_add_w_le_one
+    · exact i
+    · exact 0
+    rw [xm, mi_mem_bcubes.1, hi.1, _root_.add_lt_add_iff_left]
+    exact mi_strict_minimal h2i.symm hi
 #align theorems_100.«82».mi_xm_ne_one Theorems100.«82».mi_xm_ne_one
 
 /-- If `mi` lies on the boundary of the valley in dimension j, then this lemma expresses that all
@@ -382,8 +394,8 @@ theorem smallest_onBoundary {j} (bi : OnBoundary (mi_mem_bcubes : mi h v ∈ _)
     · simp [side, bi, hw', w_lt_w h v hi]
     · intro h'; simpa [lt_irrefl] using h'.2
     intro i' hi' i'_i h2i'; constructor
-    apply le_trans h2i'.1
-    · simp [hw']
+    · apply le_trans h2i'.1
+      simp [hw']
     apply lt_of_lt_of_le (add_lt_add_left (mi_strict_minimal i'_i.symm hi') _)
     simp [bi.symm, b_le_b hi']
   let s := bcubes cs c \ {i}
@@ -401,7 +413,7 @@ theorem smallest_onBoundary {j} (bi : OnBoundary (mi_mem_bcubes : mi h v ∈ _)
     rw [add_assoc, le_add_iff_nonneg_right, ← sub_eq_add_neg, sub_nonneg]
     apply le_of_lt (w_lt_w h v hi')
   · simp only [side, not_and_or, not_lt, not_le, mem_Ico]; left; exact hx
-  intro i'' hi'' h2i'' h3i''; constructor; swap; apply lt_trans hx h3i''.2
+  intro i'' hi'' h2i'' h3i''; constructor; swap; · apply lt_trans hx h3i''.2
   rw [le_sub_iff_add_le]
   refine' le_trans _ (t_le_t hi'' j); rw [add_le_add_iff_left]; apply h3i' i'' ⟨hi'', _⟩
   simp [mem_singleton, h2i'']
@@ -429,14 +441,16 @@ theorem mi_not_onBoundary (j : Fin n) : ¬OnBoundary (mi_mem_bcubes : mi h v ∈
   have h2i' : i' ∈ bcubes cs c := ⟨hi'.1.symm, v.2.1 i' hi'.1.symm ⟨tail p, hi'.2, hp.2⟩⟩
   have i_i' : i ≠ i' := by rintro rfl; simpa [p, side_tail, h2x] using hi'.2 j
   have : Nonempty (↥((cs i').tail.side j' \ (cs i).tail.side j')) := by
-    apply nonempty_Ico_sdiff; apply mi_strict_minimal i_i' h2i'; apply hw
+    apply nonempty_Ico_sdiff
+    · apply mi_strict_minimal i_i' h2i'
+    · apply hw
   rcases this with ⟨⟨x', hx'⟩⟩
   let p' : Fin (n + 1) → ℝ := cons (c.b 0) fun j₂ => if j₂ = j' then x' else (cs i).b j₂.succ
   have hp' : p' ∈ c.bottom := by
     suffices ∀ j : Fin n, ite (j = j') x' ((cs i).b j.succ) ∈ c.side j.succ by
       simpa [p', bottom, toSet, tail, side_tail]
     intro j₂
-    by_cases hj₂ : j₂ = j'; simp [hj₂]; apply tail_sub h2i'; apply hx'.1
+    by_cases hj₂ : j₂ = j'; · simp [hj₂]; apply tail_sub h2i'; apply hx'.1
     simp only [if_congr, if_false, hj₂]; apply tail_sub hi; apply b_mem_side
   rcases v.1 hp' with ⟨_, ⟨i'', rfl⟩, hi''⟩
   have h2i'' : i'' ∈ bcubes cs c := ⟨hi''.1.symm, v.2.1 i'' hi''.1.symm ⟨tail p', hi''.2, hp'.2⟩⟩
@@ -474,7 +488,7 @@ theorem mi_not_onBoundary' (j : Fin n) :
   have := mi_not_onBoundary h v j
   simp only [OnBoundary, not_or] at this; cases' this with h1 h2
   constructor
-  apply lt_of_le_of_ne (b_le_b mi_mem_bcubes _) h1
+  · apply lt_of_le_of_ne (b_le_b mi_mem_bcubes _) h1
   apply lt_of_le_of_ne _ h2
   apply ((Ico_subset_Ico_iff _).mp (tail_sub mi_mem_bcubes j)).2
   simp [hw]
@@ -512,7 +526,9 @@ theorem valley_mi : Valley cs (cs (mi h v)).shiftUp := by
     rcases v.1 hp with ⟨_, ⟨i'', rfl⟩, hi''⟩
     have h2i'' : i'' ∈ bcubes cs c := by
       use hi''.1.symm; apply v.2.1 i'' hi''.1.symm
-      use tail p; constructor; exact hi''.2; rw [tail_cons]; exact h3p3
+      use tail p; constructor
+      · exact hi''.2
+      · rw [tail_cons]; exact h3p3
     have h3i'' : (cs i).w < (cs i'').w := by
       apply mi_strict_minimal _ h2i''; rintro rfl; apply h2p3; convert hi''.2
     let p' := @cons n (fun _ => ℝ) (cs i).xm p3
chore: Move intervals (#11765)

Move Set.Ixx, Finset.Ixx, Multiset.Ixx together under two different folders:

  • Order.Interval for their definition and basic properties
  • Algebra.Order.Interval for their algebraic properties

Move the definitions of Multiset.Ixx to what is now Order.Interval.Multiset. I believe we could just delete this file in a later PR as nothing uses it (and I already had doubts when defining Multiset.Ixx three years ago).

Move the algebraic results out of what is now Order.Interval.Finset.Basic to a new file Algebra.Order.Interval.Finset.Basic.

Diff
@@ -3,10 +3,10 @@ Copyright (c) 2019 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 -/
+import Mathlib.Algebra.Order.Interval.Set.Group
 import Mathlib.Data.Real.Basic
 import Mathlib.Data.Set.Finite
-import Mathlib.Data.Set.Intervals.Disjoint
-import Mathlib.Data.Set.Intervals.Group
+import Mathlib.Order.Interval.Set.Disjoint
 
 #align_import wiedijk_100_theorems.cubing_a_cube from "leanprover-community/mathlib"@"5563b1b49e86e135e8c7b556da5ad2f5ff881cad"
 
chore: tidy various files (#11624)
Diff
@@ -573,7 +573,7 @@ theorem cannot_cube_a_cube :
     ∀ {s : Set (Cube n)}, s.Finite →           -- given a finite collection of (hyper)cubes
     s.Nontrivial →                             -- containing at least two elements
     s.PairwiseDisjoint Cube.toSet →            -- which is pairwise disjoint
-    ⋃ c ∈ s, Cube.toSet c = unitCube.toSet → -- whose union is the unit cube
+    ⋃ c ∈ s, Cube.toSet c = unitCube.toSet →   -- whose union is the unit cube
     InjOn Cube.w s →                           -- such that the widths of all cubes are different
     False := by                                -- then we can derive a contradiction
   intro n hn s hfin h2 hd hU hinj
chore: avoid Ne.def (adaptation for nightly-2024-03-27) (#11801)
Diff
@@ -307,7 +307,7 @@ theorem nontrivial_bcubes : (bcubes cs c).Nontrivial := by
   have h2i : i ∈ bcubes cs c :=
     ⟨hi.1.symm, v.2.1 i hi.1.symm ⟨tail c.b, hi.2, fun j => c.b_mem_side j.succ⟩⟩
   let j : Fin (n + 1) := ⟨2, h.three_le⟩
-  have hj : 0 ≠ j := by simp only [Fin.ext_iff, Ne.def]; norm_num
+  have hj : 0 ≠ j := by simp only [Fin.ext_iff, Ne]; norm_num
   let p : Fin (n + 1) → ℝ := fun j' => if j' = j then c.b j + (cs i).w else c.b j'
   have hp : p ∈ c.bottom := by
     constructor
chore: prepare Lean version bump with explicit simp (#10999)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -311,17 +311,17 @@ theorem nontrivial_bcubes : (bcubes cs c).Nontrivial := by
   let p : Fin (n + 1) → ℝ := fun j' => if j' = j then c.b j + (cs i).w else c.b j'
   have hp : p ∈ c.bottom := by
     constructor
-    · simp only [bottom, if_neg hj]
+    · simp only [p, bottom, if_neg hj]
     intro j'; simp only [tail, side_tail]
     by_cases hj' : j'.succ = j
-    · simp [if_pos, side, hj', hw', w_lt_w h v h2i]
-    · simp [if_neg hj']
+    · simp [p, if_pos, side, hj', hw', w_lt_w h v h2i]
+    · simp [p, if_neg hj']
   rcases v.1 hp with ⟨_, ⟨i', rfl⟩, hi'⟩
   have h2i' : i' ∈ bcubes cs c := ⟨hi'.1.symm, v.2.1 i' hi'.1.symm ⟨tail p, hi'.2, hp.2⟩⟩
   refine' ⟨i, h2i, i', h2i', _⟩
   rintro rfl
   apply not_le_of_lt (hi'.2 ⟨1, Nat.le_of_succ_le_succ h.three_le⟩).2
-  simp only [tail, Cube.tail]
+  simp only [tail, Cube.tail, p]
   rw [if_pos, add_le_add_iff_right]
   · exact (hi.2 _).1
   rfl
@@ -394,10 +394,10 @@ theorem smallest_onBoundary {j} (bi : OnBoundary (mi_mem_bcubes : mi h v ∈ _)
   rw [mem_singleton_iff] at h2i'
   let x := c.b j.succ + c.w - (cs i').w
   have hx : x < (cs i).b j.succ := by
-    dsimp only; rw [← bi, add_sub_assoc, add_lt_iff_neg_left, sub_lt_zero]
+    dsimp only [x]; rw [← bi, add_sub_assoc, add_lt_iff_neg_left, sub_lt_zero]
     apply mi_strict_minimal (Ne.symm h2i') hi'
   refine' ⟨x, ⟨_, _⟩, _⟩
-  · simp only [side, neg_lt_zero, hw, add_lt_iff_neg_left, and_true_iff, mem_Ico, sub_eq_add_neg]
+  · simp only [side, neg_lt_zero, hw, add_lt_iff_neg_left, and_true_iff, mem_Ico, sub_eq_add_neg, x]
     rw [add_assoc, le_add_iff_nonneg_right, ← sub_eq_add_neg, sub_nonneg]
     apply le_of_lt (w_lt_w h v hi')
   · simp only [side, not_and_or, not_lt, not_le, mem_Ico]; left; exact hx
@@ -420,21 +420,21 @@ theorem mi_not_onBoundary (j : Fin n) : ¬OnBoundary (mi_mem_bcubes : mi h v ∈
   let p : Fin (n + 1) → ℝ := cons (c.b 0) fun j₂ => if j₂ = j then x else (cs i).b j₂.succ
   have hp : p ∈ c.bottom := by
     suffices ∀ j' : Fin n, ite (j' = j) x ((cs i).b j'.succ) ∈ c.side j'.succ by
-      simpa [bottom, toSet, tail, side_tail]
+      simpa [p, bottom, toSet, tail, side_tail]
     intro j₂
     by_cases hj₂ : j₂ = j
     · simp [hj₂, hx]
     simp only [hj₂, if_false]; apply tail_sub hi; apply b_mem_side
   rcases v.1 hp with ⟨_, ⟨i', rfl⟩, hi'⟩
   have h2i' : i' ∈ bcubes cs c := ⟨hi'.1.symm, v.2.1 i' hi'.1.symm ⟨tail p, hi'.2, hp.2⟩⟩
-  have i_i' : i ≠ i' := by rintro rfl; simpa [side_tail, h2x] using hi'.2 j
+  have i_i' : i ≠ i' := by rintro rfl; simpa [p, side_tail, h2x] using hi'.2 j
   have : Nonempty (↥((cs i').tail.side j' \ (cs i).tail.side j')) := by
     apply nonempty_Ico_sdiff; apply mi_strict_minimal i_i' h2i'; apply hw
   rcases this with ⟨⟨x', hx'⟩⟩
   let p' : Fin (n + 1) → ℝ := cons (c.b 0) fun j₂ => if j₂ = j' then x' else (cs i).b j₂.succ
   have hp' : p' ∈ c.bottom := by
     suffices ∀ j : Fin n, ite (j = j') x' ((cs i).b j.succ) ∈ c.side j.succ by
-      simpa [bottom, toSet, tail, side_tail]
+      simpa [p', bottom, toSet, tail, side_tail]
     intro j₂
     by_cases hj₂ : j₂ = j'; simp [hj₂]; apply tail_sub h2i'; apply hx'.1
     simp only [if_congr, if_false, hj₂]; apply tail_sub hi; apply b_mem_side
@@ -445,10 +445,10 @@ theorem mi_not_onBoundary (j : Fin n) : ¬OnBoundary (mi_mem_bcubes : mi h v ∈
     have : (cs i).b ∈ (cs i').toSet := by
       simp only [toSet, forall_fin_succ, hi.1, bottom_mem_side h2i', true_and_iff, mem_setOf_eq]
       intro j₂; by_cases hj₂ : j₂ = j
-      · simpa [side_tail, hj'.symm, hj₂] using hi''.2 j
-      · simpa [hj₂] using hi'.2 j₂
+      · simpa [p', side_tail, hj'.symm, hj₂] using hi''.2 j
+      · simpa [p, hj₂] using hi'.2 j₂
     apply not_disjoint_iff.mpr ⟨(cs i).b, (cs i).b_mem_toSet, this⟩ (h.1 i_i')
-  have i_i'' : i ≠ i'' := by intro h; induction h; simpa [hx'.2] using hi''.2 j'
+  have i_i'' : i ≠ i'' := by intro h; induction h; simpa [p', hx'.2] using hi''.2 j'
   apply Not.elim _ (h.1 i'_i'')
   -- Porting note: simp regression, `simp_rw` can't use `onFun`
   rw [onFun]; simp_rw [comp, toSet_disjoint, not_exists, not_disjoint_iff, forall_fin_succ]
@@ -456,13 +456,13 @@ theorem mi_not_onBoundary (j : Fin n) : ¬OnBoundary (mi_mem_bcubes : mi h v ∈
   intro j₂
   by_cases hj₂ : j₂ = j
   · cases hj₂; refine' ⟨x, _, _⟩
-    · convert hi'.2 j using 1; simp
-    apply h3x h2i'' i_i''.symm; convert hi''.2 j using 1; simp [hj'.symm]
+    · convert hi'.2 j using 1; simp [p]
+    apply h3x h2i'' i_i''.symm; convert hi''.2 j using 1; simp [p', hj'.symm]
   by_cases h2j₂ : j₂ = j'
-  · cases h2j₂; refine' ⟨x', hx'.1, _⟩; convert hi''.2 j' using 1; simp
+  · cases h2j₂; refine' ⟨x', hx'.1, _⟩; convert hi''.2 j' using 1; simp [p']
   refine' ⟨(cs i).b j₂.succ, _, _⟩
-  · convert hi'.2 j₂ using 1; simp [hj₂]
-  · convert hi''.2 j₂ using 1; simp [h2j₂]
+  · convert hi'.2 j₂ using 1; simp [p, hj₂]
+  · convert hi''.2 j₂ using 1; simp [p', h2j₂]
 #align theorems_100.«82».mi_not_on_boundary Theorems100.«82».mi_not_onBoundary
 
 variable {h v}
@@ -516,9 +516,9 @@ theorem valley_mi : Valley cs (cs (mi h v)).shiftUp := by
     have h3i'' : (cs i).w < (cs i'').w := by
       apply mi_strict_minimal _ h2i''; rintro rfl; apply h2p3; convert hi''.2
     let p' := @cons n (fun _ => ℝ) (cs i).xm p3
-    have hp' : p' ∈ (cs i').toSet := by simpa [toSet, forall_fin_succ, hi'.symm] using h1p3
+    have hp' : p' ∈ (cs i').toSet := by simpa [p', toSet, forall_fin_succ, hi'.symm] using h1p3
     have h2p' : p' ∈ (cs i'').toSet := by
-      simp only [toSet, forall_fin_succ, cons_succ, cons_zero, mem_setOf_eq]
+      simp only [p', toSet, forall_fin_succ, cons_succ, cons_zero, mem_setOf_eq]
       refine' ⟨_, by simpa [toSet] using hi''.2⟩
       have : (cs i).b 0 = (cs i'').b 0 := by rw [hi.1, h2i''.1]
       simp [side, hw', xm, this, h3i'']
chore: split Data.Real.Basic (#8356)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -6,6 +6,7 @@ Authors: Floris van Doorn
 import Mathlib.Data.Real.Basic
 import Mathlib.Data.Set.Finite
 import Mathlib.Data.Set.Intervals.Disjoint
+import Mathlib.Data.Set.Intervals.Group
 
 #align_import wiedijk_100_theorems.cubing_a_cube from "leanprover-community/mathlib"@"5563b1b49e86e135e8c7b556da5ad2f5ff881cad"
 
refactor: add explicit equation lemmas for comp and flip (#8371)

This will mostly be a no-op in the current version of Lean, but will override the new behavior from leanprover/lean4#2783.

Once consequence of this is that rw [comp] no longer uses "smart unfolding"; it introduces a non-beta reduced term if the composition was applied. As a result, these places need to use rw [comp_apply] instead. My claim is that this is no big deal.

This is split from the lean bump PR #8023, targeting master, to make clear what the fallout is.

Diff
@@ -219,7 +219,7 @@ theorem shiftUp_bottom_subset_bottoms (hc : (cs i).xm ≠ 1) :
   rw [mem_iUnion]; use i'; refine' ⟨_, fun j => hi' j.succ⟩
   have : i ≠ i' := by rintro rfl; apply not_le_of_lt (hi' 0).2; rw [hp0]; rfl
   have := h.1 this
-  rw [onFun, comp, comp, toSet_disjoint, exists_fin_succ] at this
+  rw [onFun, comp_apply, comp_apply, toSet_disjoint, exists_fin_succ] at this
   rcases this with (h0 | ⟨j, hj⟩)
   rw [hp0]; symm; apply eq_of_Ico_disjoint h0 (by simp [hw]) _
   convert hi' 0; rw [hp0]; rfl
feat: fix norm num with arguments (#6600)

norm_num was passing the wrong syntax node to elabSimpArgs when elaborating, which essentially had the effect of ignoring all arguments it was passed, i.e. norm_num [add_comm] would not try to commute addition in the simp step. The fix itself is very simple (though not obvious to debug!), probably using TSyntax more would help avoid such issues in future.

Due to this bug many norm_num [blah] became rw [blah]; norm_num or similar, sometimes with porting notes, sometimes not, we fix these porting notes and other regressions during the port also.

Interestingly cancel_denoms uses norm_num [<- mul_assoc] internally, so cancel_denoms also got stronger with this change.

Diff
@@ -137,7 +137,7 @@ def unitCube : Cube n :=
 
 @[simp]
 theorem side_unitCube {j : Fin n} : unitCube.side j = Ico 0 1 := by
-  rw [unitCube, side]; norm_num
+  norm_num [unitCube, side]
 #align theorems_100.«82».cube.side_unit_cube Theorems100.«82».Cube.side_unitCube
 
 end Cube
@@ -254,7 +254,7 @@ theorem valley_unitCube [Nontrivial ι] (h : Correct cs) : Valley cs unitCube :=
     intro h0 hv
     have : v ∈ (unitCube : Cube (n + 1)).toSet := by
       dsimp only [toSet, unitCube, mem_setOf_eq]
-      rw [forall_fin_succ, h0]; constructor; rw [side, unitCube]; norm_num; exact hv
+      rw [forall_fin_succ, h0]; constructor; norm_num [side, unitCube]; exact hv
     rw [← h.2, mem_iUnion] at this; rcases this with ⟨i, hi⟩
     use i
     constructor
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2019 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
-
-! This file was ported from Lean 3 source module wiedijk_100_theorems.cubing_a_cube
-! leanprover-community/mathlib commit 5563b1b49e86e135e8c7b556da5ad2f5ff881cad
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.Real.Basic
 import Mathlib.Data.Set.Finite
 import Mathlib.Data.Set.Intervals.Disjoint
 
+#align_import wiedijk_100_theorems.cubing_a_cube from "leanprover-community/mathlib"@"5563b1b49e86e135e8c7b556da5ad2f5ff881cad"
+
 /-!
 Proof that a cube (in dimension n ≥ 3) cannot be cubed:
 There does not exist a partition of a cube into finitely many smaller cubes (at least two)
fix: precedences of ⨆⋃⋂⨅ (#5614)
Diff
@@ -152,7 +152,7 @@ variable {ι : Type} {cs : ι → Cube (n + 1)} {i i' : ι}
 /-- A finite family of (at least 2) cubes partitioning the unit cube with different sizes -/
 structure Correct (cs : ι → Cube n) : Prop where
   PairwiseDisjoint : Pairwise (Disjoint on Cube.toSet ∘ cs)
-  iUnion_eq : (⋃ i : ι, (cs i).toSet) = unitCube.toSet
+  iUnion_eq : ⋃ i : ι, (cs i).toSet = unitCube.toSet
   Injective : Injective (Cube.w ∘ cs)
   three_le : 3 ≤ n
 #align theorems_100.«82».correct Theorems100.«82».Correct
@@ -575,7 +575,7 @@ theorem cannot_cube_a_cube :
     ∀ {s : Set (Cube n)}, s.Finite →           -- given a finite collection of (hyper)cubes
     s.Nontrivial →                             -- containing at least two elements
     s.PairwiseDisjoint Cube.toSet →            -- which is pairwise disjoint
-    (⋃ c ∈ s, Cube.toSet c) = unitCube.toSet → -- whose union is the unit cube
+    ⋃ c ∈ s, Cube.toSet c = unitCube.toSet → -- whose union is the unit cube
     InjOn Cube.w s →                           -- such that the widths of all cubes are different
     False := by                                -- then we can derive a contradiction
   intro n hn s hfin h2 hd hU hinj
feat: port Dynamics.Ergodic.AddCircle (#5251)

Dependencies 7 + 275

276 files ported (97.5%)
113109 lines ported (97.4%)
Show graph

The unported dependencies are