|
| 1 | +/- |
| 2 | +Copyright (c) 2025 Peter Pfaffelhuber. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Rémy Degenne, Peter Pfaffelhuber |
| 5 | +-/ |
| 6 | +module |
| 7 | + |
| 8 | +public import Mathlib.MeasureTheory.PiSystem |
| 9 | +public import Mathlib.Topology.Separation.Hausdorff |
| 10 | + |
| 11 | +/-! |
| 12 | +# Compact systems |
| 13 | +
|
| 14 | +This file defines compact systems of sets. |
| 15 | +
|
| 16 | +## Main definitions |
| 17 | +
|
| 18 | +* `IsCompactSystem`: A set of sets is a compact system if, whenever a countable subfamily has empty |
| 19 | + intersection, then finitely many of them already have empty intersection. |
| 20 | +
|
| 21 | +## Main results |
| 22 | +
|
| 23 | +* `isCompactSystem_insert_univ_iff`: A set system is a compact system iff inserting `univ` |
| 24 | + gives a compact system. |
| 25 | +* `isCompactSystem_isCompact_isClosed`: The set of closed and compact sets is a compact system. |
| 26 | +* `isCompactSystem_isCompact`: In a `T2Space`, the set of compact sets is a compact system. |
| 27 | +-/ |
| 28 | + |
| 29 | +@[expose] public section |
| 30 | + |
| 31 | +open Set Finset Nat |
| 32 | + |
| 33 | +variable {α : Type*} {S : Set (Set α)} {C : ℕ → Set α} |
| 34 | + |
| 35 | +section definition |
| 36 | + |
| 37 | +/-- A set of sets is a compact system if, whenever a countable subfamily has empty intersection, |
| 38 | +then finitely many of them already have empty intersection. -/ |
| 39 | +def IsCompactSystem (S : Set (Set α)) : Prop := |
| 40 | + ∀ C : ℕ → Set α, (∀ i, C i ∈ S) → ⋂ i, C i = ∅ → ∃ (n : ℕ), dissipate C n = ∅ |
| 41 | + |
| 42 | +end definition |
| 43 | + |
| 44 | +namespace IsCompactSystem |
| 45 | + |
| 46 | +lemma of_nonempty_iInter |
| 47 | + (h : ∀ C : ℕ → Set α, (∀ i, C i ∈ S) → (∀ n, (dissipate C n).Nonempty) → (⋂ i, C i).Nonempty) : |
| 48 | + IsCompactSystem S := by |
| 49 | + intro C hC |
| 50 | + contrapose! |
| 51 | + exact h C hC |
| 52 | + |
| 53 | +lemma nonempty_iInter (hp : IsCompactSystem S) {C : ℕ → Set α} (hC : ∀ i, C i ∈ S) |
| 54 | + (h_nonempty : ∀ n, (dissipate C n).Nonempty) : |
| 55 | + (⋂ i, C i).Nonempty := by |
| 56 | + revert h_nonempty |
| 57 | + contrapose! |
| 58 | + exact hp C hC |
| 59 | + |
| 60 | +theorem iff_nonempty_iInter (S : Set (Set α)) : |
| 61 | + IsCompactSystem S ↔ |
| 62 | + ∀ C : ℕ → Set α, (∀ i, C i ∈ S) → (∀ n, (dissipate C n).Nonempty) → (⋂ i, C i).Nonempty := |
| 63 | + ⟨nonempty_iInter, of_nonempty_iInter⟩ |
| 64 | + |
| 65 | +@[simp] |
| 66 | +lemma of_IsEmpty [IsEmpty α] (S : Set (Set α)) : IsCompactSystem S := |
| 67 | + fun s _ _ ↦ ⟨0, Set.eq_empty_of_isEmpty (dissipate s 0)⟩ |
| 68 | + |
| 69 | +/-- Any subset of a compact system is a compact system. -/ |
| 70 | +theorem mono {T : Set (Set α)} (hT : IsCompactSystem T) (hST : S ⊆ T) : |
| 71 | + IsCompactSystem S := fun C hC1 hC2 ↦ hT C (fun i ↦ hST (hC1 i)) hC2 |
| 72 | + |
| 73 | +/-- Inserting `∅` into a compact system gives a compact system. -/ |
| 74 | +lemma insert_empty (h : IsCompactSystem S) : IsCompactSystem (insert ∅ S) := by |
| 75 | + intro s h' hd |
| 76 | + by_cases g : ∃ n, s n = ∅ |
| 77 | + · use g.choose |
| 78 | + rw [← subset_empty_iff] at hd ⊢ |
| 79 | + exact (dissipate_subset le_rfl).trans g.choose_spec.le |
| 80 | + · push_neg at g |
| 81 | + exact h s (fun i ↦ (mem_of_mem_insert_of_ne (h' i) (g i).ne_empty)) hd |
| 82 | + |
| 83 | +/-- Inserting `univ` into a compact system gives a compact system. -/ |
| 84 | +lemma insert_univ (h : IsCompactSystem S) : IsCompactSystem (insert univ S) := by |
| 85 | + rcases isEmpty_or_nonempty α with hα | _ |
| 86 | + · simp |
| 87 | + rw [IsCompactSystem.iff_nonempty_iInter] at h ⊢ |
| 88 | + intro s h' hd |
| 89 | + by_cases! h₀ : ∀ n, s n ∉ S |
| 90 | + · simp_all |
| 91 | + classical |
| 92 | + let n := Nat.find h₀ |
| 93 | + let s' := fun i ↦ if s i ∈ S then s i else s n |
| 94 | + have h₁ : ∀ i, s' i ∈ S := by simp [s']; grind |
| 95 | + have h₂ : ⋂ i, s i = ⋂ i, s' i := by ext; simp; grind |
| 96 | + apply h₂ ▸ h s' h₁ |
| 97 | + by_contra! ⟨j, hj⟩ |
| 98 | + have h₃ (v : ℕ) (hv : n ≤ v) : dissipate s v = dissipate s' v := by ext; simp; grind |
| 99 | + have h₇ : dissipate s' (max j n) = ∅ := by |
| 100 | + rw [← subset_empty_iff] at hj ⊢ |
| 101 | + exact (antitone_dissipate (Nat.le_max_left j n)).trans hj |
| 102 | + specialize h₃ (max j n) (Nat.le_max_right j n) |
| 103 | + specialize hd (max j n) |
| 104 | + simp [h₃, h₇] at hd |
| 105 | + |
| 106 | +end IsCompactSystem |
| 107 | + |
| 108 | +/-- In this equivalent formulation for a compact system, |
| 109 | +note that we use `⋂ k < n, C k` rather than `⋂ k ≤ n, C k`. -/ |
| 110 | +lemma isCompactSystem_iff_nonempty_iInter_of_lt (S : Set (Set α)) : |
| 111 | + IsCompactSystem S ↔ |
| 112 | + ∀ C : ℕ → Set α, (∀ i, C i ∈ S) → (∀ n, (⋂ k < n, C k).Nonempty) → (⋂ i, C i).Nonempty := by |
| 113 | + simp_rw [IsCompactSystem.iff_nonempty_iInter] |
| 114 | + refine ⟨fun h C hi h'↦ h C hi (fun n ↦ dissipate_eq_biInter_lt ▸ (h' (n + 1))), |
| 115 | + fun h C hi h' ↦ h C hi ?_⟩ |
| 116 | + simp_rw [Set.nonempty_iff_ne_empty] at h' ⊢ |
| 117 | + refine fun n g ↦ h' n ?_ |
| 118 | + simp_rw [← subset_empty_iff, dissipate] at g ⊢ |
| 119 | + exact le_trans (fun x ↦ by simp; grind) g |
| 120 | + |
| 121 | +/-- A set system is a compact system iff adding `∅` gives a compact system. -/ |
| 122 | +lemma isCompactSystem_insert_empty_iff : |
| 123 | + IsCompactSystem (insert ∅ S) ↔ IsCompactSystem S := |
| 124 | + ⟨fun h ↦ h.mono (subset_insert _ _), .insert_empty⟩ |
| 125 | + |
| 126 | +/-- A set system is a compact system iff adding `univ` gives a compact system. -/ |
| 127 | +lemma isCompactSystem_insert_univ_iff : IsCompactSystem (insert univ S) ↔ IsCompactSystem S := |
| 128 | + ⟨fun h ↦ h.mono (subset_insert _ _), .insert_univ⟩ |
| 129 | + |
| 130 | +/-- To prove that a set of sets is a compact system, it suffices to consider directed families of |
| 131 | +sets. -/ |
| 132 | +theorem isCompactSystem_iff_of_directed (hpi : IsPiSystem S) : |
| 133 | + IsCompactSystem S ↔ |
| 134 | + ∀ (C : ℕ → Set α), Directed (· ⊇ ·) C → (∀ i, C i ∈ S) → ⋂ i, C i = ∅ → ∃ n, C n = ∅ := by |
| 135 | + rw [← isCompactSystem_insert_empty_iff] |
| 136 | + refine ⟨fun h ↦ fun C hdi hi ↦ ?_, fun h C h1 h2 ↦ ?_⟩ |
| 137 | + · rw [← exists_dissipate_eq_empty_iff_of_directed hdi] |
| 138 | + exact h C (by simp [hi]) |
| 139 | + rw [← biInter_le_eq_iInter] at h2 |
| 140 | + suffices (∀ n, dissipate C n ∈ S ∨ dissipate C n = ∅) ∧ (⋂ n, dissipate C n = ∅) by |
| 141 | + by_cases! f : ∀ n, dissipate C n ∈ S |
| 142 | + · exact h (dissipate C) directed_dissipate f this.2 |
| 143 | + · obtain ⟨n, hn⟩ := f |
| 144 | + exact ⟨n, by simpa [hn] using this.1 n⟩ |
| 145 | + refine ⟨fun n ↦ ?_, h2⟩ |
| 146 | + by_cases g : (dissipate C n).Nonempty |
| 147 | + · simpa [or_comm] using hpi.insert_empty.dissipate_mem h1 n g |
| 148 | + · exact .inr (Set.not_nonempty_iff_eq_empty.mp g) |
| 149 | + |
| 150 | +/-- To prove that a set of sets is a compact system, it suffices to consider directed families of |
| 151 | +sets. -/ |
| 152 | +theorem isCompactSystem_iff_nonempty_iInter_of_directed (hpi : IsPiSystem S) : |
| 153 | + IsCompactSystem S ↔ |
| 154 | + ∀ (C : ℕ → Set α), (Directed (· ⊇ ·) C) → (∀ i, C i ∈ S) → (∀ n, (C n).Nonempty) → |
| 155 | + (⋂ i, C i).Nonempty := by |
| 156 | + rw [isCompactSystem_iff_of_directed hpi] |
| 157 | + refine ⟨fun h1 C h3 h4 ↦ ?_, fun h1 C h3 s ↦ ?_⟩ <;> rw [← not_imp_not] <;> push_neg |
| 158 | + · exact h1 C h3 h4 |
| 159 | + · exact h1 C h3 s |
| 160 | + |
| 161 | +section IsCompactIsClosed |
| 162 | + |
| 163 | +/-- The set of compact and closed sets is a compact system. -/ |
| 164 | +theorem isCompactSystem_isCompact_isClosed (α : Type*) [TopologicalSpace α] : |
| 165 | + IsCompactSystem {s : Set α | IsCompact s ∧ IsClosed s} := by |
| 166 | + refine IsCompactSystem.of_nonempty_iInter fun C hC_cc h_nonempty ↦ ?_ |
| 167 | + rw [← iInter_dissipate] |
| 168 | + refine IsCompact.nonempty_iInter_of_sequence_nonempty_isCompact_isClosed (Set.dissipate C) |
| 169 | + (fun n ↦ ?_) h_nonempty ?_ (fun n ↦ isClosed_biInter (fun i _ ↦ (hC_cc i).2)) |
| 170 | + · exact Set.antitone_dissipate (by lia) |
| 171 | + · simpa using (hC_cc 0).1 |
| 172 | + |
| 173 | +/-- In a `T2Space` the set of compact sets is a compact system. -/ |
| 174 | +theorem isCompactSystem_isCompact (α : Type*) [TopologicalSpace α] [T2Space α] : |
| 175 | + IsCompactSystem {s : Set α | IsCompact s} := by |
| 176 | + convert isCompactSystem_isCompact_isClosed α with s |
| 177 | + simpa using IsCompact.isClosed |
| 178 | + |
| 179 | +/-- The set of sets which are either compact and closed, or `univ`, is a compact system. -/ |
| 180 | +theorem isCompactSystem_insert_univ_isCompact_isClosed (α : Type*) [TopologicalSpace α] : |
| 181 | + IsCompactSystem (insert univ {s : Set α | IsCompact s ∧ IsClosed s}) := |
| 182 | + (isCompactSystem_isCompact_isClosed α).insert_univ |
| 183 | + |
| 184 | +end IsCompactIsClosed |
0 commit comments