@@ -49,9 +49,6 @@ theorem mul_mem {x y : ℝ} (hx : x ∈ I) (hy : y ∈ I) : x * y ∈ I :=
4949theorem div_mem {x y : ℝ} (hx : 0 ≤ x) (hy : 0 ≤ y) (hxy : x ≤ y) : x / y ∈ I :=
5050 ⟨div_nonneg hx hy, div_le_one_of_le₀ hxy hy⟩
5151
52- /-- The midpoint of the unit interval. -/
53- def half : I := ⟨1 / 2 , by constructor <;> linarith⟩
54-
5552theorem fract_mem (x : ℝ) : fract x ∈ I :=
5653 ⟨fract_nonneg _, (fract_lt_one _).le⟩
5754
@@ -337,7 +334,7 @@ theorem convexCombo_eq {a b : ℝ} (x : Icc a b) (t : unitInterval) : convexComb
337334
338335@ [simp, grind =]
339336theorem convexCombo_same {a b : ℝ} (x : Icc a b) (t : unitInterval) : convexCombo x x t = x := by
340- convexCombo_eq x t
337+ simp [convexCombo_eq]
341338
342339/-- Convex combination of the endpoints of the unit interval gives the parameter. -/
343340@[simp]
@@ -477,12 +474,6 @@ theorem eq_convexCombo {a b : ℝ} {x y z : Icc a b} (hxy : x ≤ y) (hyz : y
477474 · field_simp
478475 ring_nf
479476
480- theorem continuous_convexCombo {a b : ℝ} :
481- Continuous (fun (p : Icc a b × Icc a b × unitInterval) => convexCombo p.1 p.2 .1 p.2 .2 ) := by
482- apply Continuous.subtype_mk
483- fun_prop
484-
485-
486477end Set.Icc
487478
488479open scoped unitInterval
@@ -735,122 +726,6 @@ lemma exists_strictMono_Icc_subset_open_cover_unitInterval {ι} {c : ι → Set
735726 · ext; exact ht0
736727 · ext; exact htn
737728
738- lemma exists_monotone_Icc_subset_open_cover_unitInterval_prod_self {ι} {c : ι → Set (I × I)}
739- (hc₁ : ∀ i, IsOpen (c i)) (hc₂ : univ ⊆ ⋃ i, c i) :
740- ∃ t : ℕ → I, t 0 = 0 ∧ Monotone t ∧ (∃ n, ∀ m ≥ n, t m = 1 ) ∧
741- ∀ n m, ∃ i, Icc (t n) (t (n + 1 )) ×ˢ Icc (t m) (t (m + 1 )) ⊆ c i := by
742- obtain ⟨δ, δ_pos, ball_subset⟩ := lebesgue_number_lemma_of_metric isCompact_univ hc₁ hc₂
743- have hδ := half_pos δ_pos
744- simp_rw [Subtype.ext_iff]
745- have h : (0 : ℝ) ≤ 1 := zero_le_one
746- refine ⟨addNSMul h (δ/2 ), addNSMul_zero h,
747- monotone_addNSMul h hδ.le, addNSMul_eq_right h hδ, fun n m ↦ ?_⟩
748- obtain ⟨i, hsub⟩ := ball_subset (addNSMul h (δ / 2 ) n, addNSMul h (δ / 2 ) m) trivial
749- exact ⟨i, fun t ht ↦ hsub (Metric.mem_ball.mpr <| (max_le (abs_sub_addNSMul_le h hδ.le n ht.1 ) <|
750- abs_sub_addNSMul_le h hδ.le m ht.2 ).trans_lt <| half_lt_self δ_pos)⟩
751-
752- /-- Finite partition variant: Any open cover of `[a, b]` can be refined to a finite partition
753- with strictly monotone partition points indexed by `Fin (n + 1)`. -/
754- lemma exists_strictMono_Icc_subset_open_cover_Icc {ι} {a b : ℝ} (h : a ≤ b) {c : ι → Set (Icc a b)}
755- (hc₁ : ∀ i, IsOpen (c i)) (hc₂ : univ ⊆ ⋃ i, c i) :
756- ∃ (n : ℕ) (t : Fin (n + 1 ) → Icc a b),
757- StrictMono t ∧ t 0 = a ∧ t (Fin.last n) = b ∧
758- ∀ i : Fin n, ∃ j : ι, Icc (t i.castSucc) (t i.succ) ⊆ c j := by
759- -- Get Lebesgue number
760- obtain ⟨δ, δ_pos, hδ⟩ := lebesgue_number_lemma_of_metric isCompact_univ hc₁ hc₂
761- -- Pick n: if a = b then n = 0, otherwise pick n large enough so that (b - a) / n < δ
762- by_cases hab : a = b
763- · -- Case a = b: take n = 0 with single partition point
764- subst hab
765- exact ⟨0 , fun _ => ⟨a, by simp⟩, Subsingleton.strictMono (α := Fin 1 ) _, rfl, rfl,
766- fun i => i.elim0⟩
767- · -- Case a < b: pick n with (b - a) / n < δ
768- have hab_pos : 0 < b - a := sub_pos.mpr (Ne.lt_of_le hab h)
769- obtain ⟨n, hn_pos, hn_small⟩ : ∃ n : ℕ, 0 < n ∧ (b - a) / n < δ := by
770- obtain ⟨n, hn⟩ := exists_nat_gt ((b - a) / δ)
771- have hn_pos : 0 < n := by
772- have h1 : 0 < (b - a) / δ := div_pos hab_pos δ_pos
773- have h2 : (0 : ℝ) < n := by linarith
774- exact Nat.cast_pos.mp h2
775- refine ⟨n, hn_pos, ?_⟩
776- have hn_pos' : (0 : ℝ) < n := Nat.cast_pos.mpr hn_pos
777- -- From (b - a) / δ < n, multiply both sides by δ to get b - a < n * δ
778- have h_mul : b - a < n * δ := calc
779- b - a = (b - a) / δ * δ := by field_simp [δ_pos.ne']
780- _ < n * δ := by nlinarith [δ_pos]
781- calc (b - a) / n < (n * δ) / n := by gcongr
782- _ = δ := by field_simp
783- -- Define partition: t k = a + k * (b - a) / n
784- let t : Fin (n + 1 ) → Icc a b := fun k => ⟨a + k * (b - a) / n, by
785- constructor
786- · linarith [mul_nonneg (Nat.cast_nonneg (k : ℕ)) (sub_nonneg.mpr h),
787- div_nonneg (mul_nonneg (Nat.cast_nonneg (k : ℕ)) (sub_nonneg.mpr h)) (Nat.cast_nonneg n)]
788- · have hk : (k : ℝ) ≤ n := Nat.cast_le.mpr (Nat.lt_succ_iff.mp k.is_lt)
789- have hn_pos' : (0 : ℝ) < n := Nat.cast_pos.mpr hn_pos
790- calc a + k * (b - a) / n ≤ a + n * (b - a) / n := by {
791- have : k * (b - a) ≤ n * (b - a) := by nlinarith
792- linarith [div_le_div_of_nonneg_right this hn_pos'.le] }
793- _ = b := by field_simp [hn_pos'.ne']; ring⟩
794- have ht_strict : StrictMono t := by
795- intro i j hij
796- change (t i : ℝ) < (t j : ℝ)
797- simp only [t]
798- have hij' : (i : ℝ) < (j : ℝ) := Nat.cast_lt.mpr hij
799- have hn_pos' : (0 : ℝ) < n := Nat.cast_pos.mpr hn_pos
800- have : i * (b - a) < j * (b - a) := by nlinarith [hab_pos]
801- linarith [div_lt_div_of_pos_right this hn_pos']
802- refine ⟨n, t, ht_strict, ?_, ?_, ?_⟩
803- · -- t 0 = a
804- simp [t]
805- · -- t (Fin.last n) = b
806- simp [t]
807- field_simp [Nat.cast_pos.mpr hn_pos]
808- ring
809- · -- Covering property
810- intro i
811- -- Use StrictMono to get that t i.castSucc < t i.succ
812- have h_mono : (t i.castSucc : ℝ) < (t i.succ : ℝ) := ht_strict i.castSucc_lt_succ
813- -- Define the midpoint
814- let m : Icc a b := ⟨((t i.castSucc : ℝ) + (t i.succ : ℝ)) / 2 , by
815- constructor
816- · linarith [(t i.castSucc).2 .1 , (t i.succ).2 .1 ]
817- · linarith [(t i.castSucc).2 .2 , (t i.succ).2 .2 ]⟩
818- -- The segment is contained in ball m δ
819- have h_subset : Icc (t i.castSucc) (t i.succ) ⊆ Metric.ball m δ := by
820- intro x hx
821- simp only [Metric.ball, mem_setOf_eq]
822- have segment_len : (t i.succ : ℝ) - (t i.castSucc : ℝ) = (b - a) / n := by
823- simp [t]
824- field_simp
825- ring
826- -- x is in the segment, so its distance from midpoint is at most (b-a)/(2n) < δ
827- have hx_bounds : (t i.castSucc : ℝ) ≤ (x : ℝ) ∧ (x : ℝ) ≤ (t i.succ : ℝ) := ⟨hx.1 , hx.2 ⟩
828- have dist_bound : dist (x : ℝ) (m : ℝ) ≤ ((b - a) / n) / 2 := by
829- rw [dist_comm, Real.dist_eq]
830- simp only [m, abs_sub_le_iff]
831- constructor <;>
832- · linarith [hx_bounds.1 , hx_bounds.2 , segment_len]
833- -- Since (b-a)/n < δ, we have (b-a)/(2n) < δ/2 < δ
834- calc dist (x : ℝ) (m : ℝ) ≤ ((b - a) / n) / 2 := dist_bound
835- _ < δ / 2 := by linarith [hn_small]
836- _ < δ := by linarith [δ_pos]
837- -- Apply Lebesgue number property to get the covering set
838- obtain ⟨j, hj⟩ := hδ m trivial
839- exact ⟨j, Subset.trans h_subset hj⟩
840-
841- /-- Finite partition variant: Any open cover of the unit interval can be refined to a finite
842- partition with strictly monotone partition points indexed by `Fin (n + 1)`. -/
843- lemma exists_strictMono_Icc_subset_open_cover_unitInterval {ι} {c : ι → Set I}
844- (hc₁ : ∀ i, IsOpen (c i)) (hc₂ : univ ⊆ ⋃ i, c i) :
845- ∃ (n : ℕ) (t : Fin (n + 1 ) → I),
846- StrictMono t ∧ t 0 = 0 ∧ t (Fin.last n) = 1 ∧
847- ∀ i : Fin n, ∃ j : ι, Icc (t i.castSucc) (t i.succ) ⊆ c j := by
848- obtain ⟨n, t, ht_strict, ht0, htn, ht_cover⟩ :=
849- exists_strictMono_Icc_subset_open_cover_Icc zero_le_one hc₁ hc₂
850- refine ⟨n, t, ht_strict, ?_, ?_, ht_cover⟩
851- · ext; exact ht0
852- · ext; exact htn
853-
854729end partition
855730
856731@[simp]
0 commit comments