@@ -533,9 +533,7 @@ theorem TotallyBounded.exists_subset {s : Set α} (hs : TotallyBounded s) {U : S
533
533
theorem totallyBounded_iff_subset {s : Set α} :
534
534
TotallyBounded s ↔
535
535
∀ d ∈ 𝓤 α, ∃ t, t ⊆ s ∧ Set.Finite t ∧ s ⊆ ⋃ y ∈ t, { x | (x, y) ∈ d } :=
536
- ⟨fun H _ hd => H.exists_subset hd, fun H d hd =>
537
- let ⟨t, _, ht⟩ := H d hd
538
- ⟨t, ht⟩⟩
536
+ ⟨fun H _ hd ↦ H.exists_subset hd, fun H d hd ↦ let ⟨t, _, ht⟩ := H d hd; ⟨t, ht⟩⟩
539
537
#align totally_bounded_iff_subset totallyBounded_iff_subset
540
538
541
539
theorem Filter.HasBasis.totallyBounded_iff {ι} {p : ι → Prop } {U : ι → Set (α × α)}
@@ -552,15 +550,14 @@ theorem totallyBounded_of_forall_symm {s : Set α}
552
550
simpa only [ball_eq_of_symmetry hV.2 ] using h V hV.1 hV.2
553
551
#align totally_bounded_of_forall_symm totallyBounded_of_forall_symm
554
552
555
- theorem totallyBounded_subset {s₁ s₂ : Set α} (hs : s₁ ⊆ s₂) (h : TotallyBounded s₂) :
553
+ theorem TotallyBounded.subset {s₁ s₂ : Set α} (hs : s₁ ⊆ s₂) (h : TotallyBounded s₂) :
556
554
TotallyBounded s₁ := fun d hd =>
557
555
let ⟨t, ht₁, ht₂⟩ := h d hd
558
556
⟨t, ht₁, Subset.trans hs ht₂⟩
559
- #align totally_bounded_subset totallyBounded_subset
557
+ #align totally_bounded_subset TotallyBounded.subset
560
558
561
- theorem totallyBounded_empty : TotallyBounded (∅ : Set α) := fun _ _ =>
562
- ⟨∅, finite_empty, empty_subset _⟩
563
- #align totally_bounded_empty totallyBounded_empty
559
+ @[deprecated (since := "2024-06-01")]
560
+ alias totallyBounded_subset := TotallyBounded.subset
564
561
565
562
/-- The closure of a totally bounded set is totally bounded. -/
566
563
theorem TotallyBounded.closure {s : Set α} (h : TotallyBounded s) : TotallyBounded (closure s) :=
@@ -571,6 +568,70 @@ theorem TotallyBounded.closure {s : Set α} (h : TotallyBounded s) : TotallyBoun
571
568
htf.isClosed_biUnion fun _ _ => hV.2 .preimage (continuous_id.prod_mk continuous_const)⟩
572
569
#align totally_bounded.closure TotallyBounded.closure
573
570
571
+ @[simp]
572
+ lemma totallyBounded_closure {s : Set α} : TotallyBounded (closure s) ↔ TotallyBounded s :=
573
+ ⟨fun h ↦ h.subset subset_closure, TotallyBounded.closure⟩
574
+
575
+ /-- A finite indexed union is totally bounded
576
+ if and only if each set of the family is totally bounded. -/
577
+ @[simp]
578
+ lemma totallyBounded_iUnion {ι : Sort *} [Finite ι] {s : ι → Set α} :
579
+ TotallyBounded (⋃ i, s i) ↔ ∀ i, TotallyBounded (s i) := by
580
+ refine ⟨fun h i ↦ h.subset (subset_iUnion _ _), fun h U hU ↦ ?_⟩
581
+ choose t htf ht using (h · U hU)
582
+ refine ⟨⋃ i, t i, finite_iUnion htf, ?_⟩
583
+ rw [biUnion_iUnion]
584
+ gcongr; apply ht
585
+
586
+ /-- A union indexed by a finite set is totally bounded
587
+ if and only if each set of the family is totally bounded. -/
588
+ lemma totallyBounded_biUnion {ι : Type *} {I : Set ι} (hI : I.Finite) {s : ι → Set α} :
589
+ TotallyBounded (⋃ i ∈ I, s i) ↔ ∀ i ∈ I, TotallyBounded (s i) := by
590
+ have := hI.to_subtype
591
+ rw [biUnion_eq_iUnion, totallyBounded_iUnion, Subtype.forall]
592
+
593
+ /-- A union of a finite family of sets is totally bounded
594
+ if and only if each set of the family is totally bounded. -/
595
+ lemma totallyBounded_sUnion {S : Set (Set α)} (hS : S.Finite) :
596
+ TotallyBounded (⋃₀ S) ↔ ∀ s ∈ S, TotallyBounded s := by
597
+ rw [sUnion_eq_biUnion, totallyBounded_biUnion hS]
598
+
599
+ /-- A finite set is totally bounded. -/
600
+ lemma Set.Finite.totallyBounded {s : Set α} (hs : s.Finite) : TotallyBounded s := fun _U hU ↦
601
+ ⟨s, hs, fun _x hx ↦ mem_biUnion hx <| refl_mem_uniformity hU⟩
602
+
603
+ /-- A subsingleton is totally bounded. -/
604
+ lemma Set.Subsingleton.totallyBounded {s : Set α} (hs : s.Subsingleton) :
605
+ TotallyBounded s :=
606
+ hs.finite.totallyBounded
607
+
608
+ @[simp]
609
+ lemma totallyBounded_singleton (a : α) : TotallyBounded {a} := (finite_singleton a).totallyBounded
610
+
611
+ @[simp]
612
+ theorem totallyBounded_empty : TotallyBounded (∅ : Set α) := finite_empty.totallyBounded
613
+ #align totally_bounded_empty totallyBounded_empty
614
+
615
+ /-- The union of two sets is totally bounded
616
+ if and only if each of the two sets is totally bounded.-/
617
+ @[simp]
618
+ lemma totallyBounded_union {s t : Set α} :
619
+ TotallyBounded (s ∪ t) ↔ TotallyBounded s ∧ TotallyBounded t := by
620
+ rw [union_eq_iUnion, totallyBounded_iUnion]
621
+ simp [and_comm]
622
+
623
+ /-- The union of two totally bounded sets is totally bounded. -/
624
+ protected lemma TotallyBounded.union {s t : Set α} (hs : TotallyBounded s) (ht : TotallyBounded t) :
625
+ TotallyBounded (s ∪ t) :=
626
+ totallyBounded_union.2 ⟨hs, ht⟩
627
+
628
+ @[simp]
629
+ lemma totallyBounded_insert (a : α) {s : Set α} :
630
+ TotallyBounded (insert a s) ↔ TotallyBounded s := by
631
+ simp_rw [← singleton_union, totallyBounded_union, totallyBounded_singleton, true_and]
632
+
633
+ protected alias ⟨_, TotallyBounded.insert⟩ := totallyBounded_insert
634
+
574
635
/-- The image of a totally bounded set under a uniformly continuous map is totally bounded. -/
575
636
theorem TotallyBounded.image [UniformSpace β] {f : α → β} {s : Set α} (hs : TotallyBounded s)
576
637
(hf : UniformContinuous f) : TotallyBounded (f '' s) := fun t ht =>
@@ -662,9 +723,9 @@ theorem isCompact_of_totallyBounded_isClosed [CompleteSpace α] {s : Set α} (ht
662
723
/-- Every Cauchy sequence over `ℕ` is totally bounded. -/
663
724
theorem CauchySeq.totallyBounded_range {s : ℕ → α} (hs : CauchySeq s) :
664
725
TotallyBounded (range s) := by
665
- refine totallyBounded_iff_subset. 2 fun a ha => ?_
726
+ intro a ha
666
727
cases' cauchySeq_iff.1 hs a ha with n hn
667
- refine ⟨s '' { k | k ≤ n }, image_subset_range _ _, (finite_le_nat _).image _, ?_⟩
728
+ refine ⟨s '' { k | k ≤ n }, (finite_le_nat _).image _, ?_⟩
668
729
rw [range_subset_iff, biUnion_image]
669
730
intro m
670
731
rw [mem_iUnion₂]
0 commit comments