File: Mathlib/Topology/Compactness/SigmaCompact.lean

full_name: IsSigmaCompact
code: /-- A subset `s ⊆ X` is called **σ-compact** if it is the union of countably many compact sets. -/
def IsSigmaCompact (s : Set X) : Prop 
goal: Prop

full_name: IsCompact.isSigmaCompact
code: /-- Compact sets are σ-compact. -/
lemma IsCompact.isSigmaCompact {s : Set X} (hs : IsCompact s) : IsSigmaCompact s 
goal: IsSigmaCompact s

full_name: isSigmaCompact_empty
code: /-- The empty set is σ-compact. -/
@[simp]
lemma isSigmaCompact_empty : IsSigmaCompact (∅ : Set X) 
goal: IsSigmaCompact ∅

full_name: isSigmaCompact_iUnion_of_isCompact
code: /-- Countable unions of compact sets are σ-compact. -/
lemma isSigmaCompact_iUnion_of_isCompact [hι : Countable ι] (s : ι → Set X)
    (hcomp : ∀ i, IsCompact (s i)) : IsSigmaCompact (⋃ i, s i) 
goal: IsSigmaCompact (⋃ i, s i)

full_name: isSigmaCompact_sUnion_of_isCompact
code: /-- Countable unions of compact sets are σ-compact. -/
lemma isSigmaCompact_sUnion_of_isCompact {S : Set (Set X)} (hc : Set.Countable S)
    (hcomp : ∀ (s : Set X), s ∈ S → IsCompact s) : IsSigmaCompact (⋃₀ S) 
goal: IsSigmaCompact (⋃₀ S)

full_name: isSigmaCompact_iUnion
code: /-- Countable unions of σ-compact sets are σ-compact. -/
lemma isSigmaCompact_iUnion [Countable ι] (s : ι → Set X)
    (hcomp : ∀ i, IsSigmaCompact (s i)) : IsSigmaCompact (⋃ i, s i) 
goal: IsSigmaCompact (⋃ i, s i)

full_name: isSigmaCompact_sUnion
code: /-- Countable unions of σ-compact sets are σ-compact. -/
lemma isSigmaCompact_sUnion (S : Set (Set X)) (hc : Set.Countable S)
    (hcomp : ∀ s : S, IsSigmaCompact s (X := X)) : IsSigmaCompact (⋃₀ S) 
goal: IsSigmaCompact (⋃₀ S)

full_name: isSigmaCompact_biUnion
code: /-- Countable unions of σ-compact sets are σ-compact. -/
lemma isSigmaCompact_biUnion {s : Set ι} {S : ι → Set X} (hc : Set.Countable s)
    (hcomp : ∀ (i : ι), i ∈ s → IsSigmaCompact (S i)) :
    IsSigmaCompact (⋃ (i : ι) (_ : i ∈ s), S i) 
goal: IsSigmaCompact (⋃ i ∈ s, S i)

full_name: IsSigmaCompact.of_isClosed_subset
code: /-- A closed subset of a σ-compact set is σ-compact. -/
lemma IsSigmaCompact.of_isClosed_subset {s t : Set X} (ht : IsSigmaCompact t)
    (hs : IsClosed s) (h : s ⊆ t) : IsSigmaCompact s 
goal: IsSigmaCompact s

full_name: IsSigmaCompact.image_of_continuousOn
code: /-- If `s` is σ-compact and `f` is continuous on `s`, `f(s)` is σ-compact. -/
lemma IsSigmaCompact.image_of_continuousOn {f : X → Y} {s : Set X} (hs : IsSigmaCompact s)
    (hf : ContinuousOn f s) : IsSigmaCompact (f '' s) 
goal: IsSigmaCompact (f '' s)

full_name: IsSigmaCompact.image
code: /-- If `s` is σ-compact and `f` continuous, `f(s)` is σ-compact. -/
lemma IsSigmaCompact.image {f : X → Y} (hf : Continuous f) {s : Set X} (hs : IsSigmaCompact s) :
    IsSigmaCompact (f '' s) 
goal: IsSigmaCompact (f '' s)

full_name: Inducing.isSigmaCompact_iff
code: /-- If `f : X → Y` is `Inducing`, the image `f '' s` of a set `s` is σ-compact
  if and only `s` is σ-compact. -/
lemma Inducing.isSigmaCompact_iff {f : X → Y} {s : Set X}
    (hf : Inducing f) : IsSigmaCompact s ↔ IsSigmaCompact (f '' s) 
goal: IsSigmaCompact s ↔ IsSigmaCompact (f '' s)

full_name: Embedding.isSigmaCompact_iff
code: /-- If `f : X → Y` is an `Embedding`, the image `f '' s` of a set `s` is σ-compact
  if and only `s` is σ-compact. -/
lemma Embedding.isSigmaCompact_iff {f : X → Y} {s : Set X}
    (hf : Embedding f) : IsSigmaCompact s ↔ IsSigmaCompact (f '' s) 
goal: IsSigmaCompact s ↔ IsSigmaCompact (f '' s)

full_name: Subtype.isSigmaCompact_iff
code: /-- Sets of subtype are σ-compact iff the image under a coercion is. -/
lemma Subtype.isSigmaCompact_iff {p : X → Prop} {s : Set { a // p a }} :
    IsSigmaCompact s ↔ IsSigmaCompact ((↑) '' s : Set X) 
goal: IsSigmaCompact s ↔ IsSigmaCompact (Subtype.val '' s)

full_name: SigmaCompactSpace
code: /-- A σ-compact space is a space that is the union of a countable collection of compact subspaces.
  Note that a locally compact separable T₂ space need not be σ-compact.
  The sequence can be extracted using `compactCovering`. -/
class SigmaCompactSpace (X : Type*) [TopologicalSpace X] : Prop where
  /-- In a σ-compact space, `Set.univ` is a σ-compact set. -/
  isSigmaCompact_univ : IsSigmaCompact (univ : Set X)
goal: Prop

full_name: SigmaCompactSpace.isSigmaCompact_univ
code: /-- A σ-compact space is a space that is the union of a countable collection of compact subspaces.
  Note that a locally compact separable T₂ space need not be σ-compact.
  The sequence can be extracted using `compactCovering`. -/
class SigmaCompactSpace (X : Type*) [TopologicalSpace X] : Prop where
  /-- In a σ-compact space, `Set.univ` is a σ-compact set. -/
  isSigmaCompact_univ : IsSigmaCompact (univ : Set X)
goal: IsSigmaCompact Set.univ

full_name: isSigmaCompact_univ_iff
code: /-- A topological space is σ-compact iff `univ` is σ-compact. -/
lemma isSigmaCompact_univ_iff : IsSigmaCompact (univ : Set X) ↔ SigmaCompactSpace X 
goal: IsSigmaCompact Set.univ ↔ SigmaCompactSpace X

full_name: isSigmaCompact_univ
code: /-- In a σ-compact space, `univ` is σ-compact. -/
lemma isSigmaCompact_univ [h : SigmaCompactSpace X] : IsSigmaCompact (univ : Set X) 
goal: IsSigmaCompact Set.univ

full_name: SigmaCompactSpace_iff_exists_compact_covering
code: /-- A topological space is σ-compact iff there exists a countable collection of compact
subspaces that cover the entire space. -/
lemma SigmaCompactSpace_iff_exists_compact_covering :
    SigmaCompactSpace X ↔ ∃ K : ℕ → Set X, (∀ n, IsCompact (K n)) ∧ ⋃ n, K n = univ 
goal: SigmaCompactSpace X ↔ ∃ K, (∀ (n : ℕ), IsCompact (K n)) ∧ ⋃ n, K n = Set.univ

full_name: SigmaCompactSpace.exists_compact_covering
code: lemma SigmaCompactSpace.exists_compact_covering [h : SigmaCompactSpace X] :
    ∃ K : ℕ → Set X, (∀ n, IsCompact (K n)) ∧ ⋃ n, K n = univ 
goal: ∃ K, (∀ (n : ℕ), IsCompact (K n)) ∧ ⋃ n, K n = Set.univ

full_name: isSigmaCompact_range
code: /-- If `X` is σ-compact, `im f` is σ-compact. -/
lemma isSigmaCompact_range {f : X → Y} (hf : Continuous f) [SigmaCompactSpace X] :
    IsSigmaCompact (range f) 
goal: IsSigmaCompact (Set.range f)

full_name: isSigmaCompact_iff_isSigmaCompact_univ
code: /-- A subset `s` is σ-compact iff `s` (with the subspace topology) is a σ-compact space. -/
lemma isSigmaCompact_iff_isSigmaCompact_univ {s : Set X} :
    IsSigmaCompact s ↔ IsSigmaCompact (univ : Set s) 
goal: IsSigmaCompact s ↔ IsSigmaCompact Set.univ

full_name: isSigmaCompact_iff_sigmaCompactSpace
code: lemma isSigmaCompact_iff_sigmaCompactSpace {s : Set X} :
    IsSigmaCompact s ↔ SigmaCompactSpace s 
goal: IsSigmaCompact s ↔ SigmaCompactSpace ↑s

full_name: CompactSpace.sigma_compact
code: instance (priority := 200) CompactSpace.sigma_compact [CompactSpace X] : SigmaCompactSpace X 
goal: SigmaCompactSpace X

full_name: SigmaCompactSpace.of_countable
code: theorem SigmaCompactSpace.of_countable (S : Set (Set X)) (Hc : S.Countable)
    (Hcomp : ∀ s ∈ S, IsCompact s) (HU : ⋃₀ S = univ) : SigmaCompactSpace X 
goal: SigmaCompactSpace X

full_name: sigmaCompactSpace_of_locally_compact_second_countable
code: instance (priority := 100) sigmaCompactSpace_of_locally_compact_second_countable
    [LocallyCompactSpace X] [SecondCountableTopology X] : SigmaCompactSpace X 
goal: SigmaCompactSpace X

full_name: compactCovering
code: /-- A choice of compact covering for a `σ`-compact space, chosen to be monotone. -/
def compactCovering : ℕ → Set X 
goal: ℕ → Set X

full_name: isCompact_compactCovering
code: theorem isCompact_compactCovering (n : ℕ) : IsCompact (compactCovering X n) 
goal: IsCompact (compactCovering X n)

full_name: iUnion_compactCovering
code: theorem iUnion_compactCovering : ⋃ n, compactCovering X n = univ 
goal: ⋃ n, compactCovering X n = Set.univ

full_name: iUnion_closure_compactCovering
code: theorem iUnion_closure_compactCovering : ⋃ n, closure (compactCovering X n) = univ 
goal: ⋃ n, closure (compactCovering X n) = Set.univ

full_name: compactCovering_subset
code: @[mono, gcongr]
theorem compactCovering_subset ⦃m n : ℕ⦄ (h : m ≤ n) : compactCovering X m ⊆ compactCovering X n 
goal: compactCovering X m ⊆ compactCovering X n

full_name: exists_mem_compactCovering
code: theorem exists_mem_compactCovering (x : X) : ∃ n, x ∈ compactCovering X n 
goal: ∃ n, x ∈ compactCovering X n

full_name: instSigmaCompactSpaceProd
code: instance [SigmaCompactSpace Y] : SigmaCompactSpace (X × Y) 
goal: SigmaCompactSpace (X × Y)

full_name: instSigmaCompactSpaceForallOfFinite
code: instance [Finite ι] {X : ι → Type*} [∀ i, TopologicalSpace (X i)] [∀ i, SigmaCompactSpace (X i)] :
    SigmaCompactSpace (∀ i, X i) 
goal: SigmaCompactSpace ((i : ι) → X i)

full_name: instSigmaCompactSpaceSum
code: instance [SigmaCompactSpace Y] : SigmaCompactSpace (X ⊕ Y) 
goal: SigmaCompactSpace (X ⊕ Y)

full_name: instSigmaCompactSpaceSigmaOfCountable
code: instance [Countable ι] {X : ι → Type*} [∀ i, TopologicalSpace (X i)]
    [∀ i, SigmaCompactSpace (X i)] : SigmaCompactSpace (Σi, X i) 
goal: SigmaCompactSpace ((i : ι) × X i)

full_name: ClosedEmbedding.sigmaCompactSpace
code: protected theorem ClosedEmbedding.sigmaCompactSpace {e : Y → X} (he : ClosedEmbedding e) :
    SigmaCompactSpace Y 
goal: SigmaCompactSpace Y

full_name: IsClosed.sigmaCompactSpace
code: theorem IsClosed.sigmaCompactSpace {s : Set X} (hs : IsClosed s) : SigmaCompactSpace s 
goal: SigmaCompactSpace ↑s

full_name: instSigmaCompactSpaceULift
code: instance [SigmaCompactSpace Y] : SigmaCompactSpace (ULift.{u} Y) 
goal: SigmaCompactSpace (ULift.{u, u_2} Y)

full_name: LocallyFinite.countable_univ
code: /-- If `X` is a `σ`-compact space, then a locally finite family of nonempty sets of `X` can have
only countably many elements, `Set.Countable` version. -/
protected theorem LocallyFinite.countable_univ {f : ι → Set X} (hf : LocallyFinite f)
    (hne : ∀ i, (f i).Nonempty) : (univ : Set ι).Countable 
goal: Set.univ.Countable

full_name: LocallyFinite.encodable
code: /-- If `f : ι → Set X` is a locally finite covering of a σ-compact topological space by nonempty
sets, then the index type `ι` is encodable. -/
protected noncomputable def LocallyFinite.encodable {ι : Type*} {f : ι → Set X}
    (hf : LocallyFinite f) (hne : ∀ i, (f i).Nonempty) : Encodable ι 
goal: Encodable ι

full_name: countable_cover_nhdsWithin_of_sigma_compact
code: /-- In a topological space with sigma compact topology, if `f` is a function that sends each point
`x` of a closed set `s` to a neighborhood of `x` within `s`, then for some countable set `t ⊆ s`,
the neighborhoods `f x`, `x ∈ t`, cover the whole set `s`. -/
theorem countable_cover_nhdsWithin_of_sigma_compact {f : X → Set X} {s : Set X} (hs : IsClosed s)
    (hf : ∀ x ∈ s, f x ∈ 𝓝[s] x) : ∃ t ⊆ s, t.Countable ∧ s ⊆ ⋃ x ∈ t, f x 
goal: ∃ t ⊆ s, t.Countable ∧ s ⊆ ⋃ x ∈ t, f x

full_name: countable_cover_nhds_of_sigma_compact
code: /-- In a topological space with sigma compact topology, if `f` is a function that sends each
point `x` to a neighborhood of `x`, then for some countable set `s`, the neighborhoods `f x`,
`x ∈ s`, cover the whole space. -/
theorem countable_cover_nhds_of_sigma_compact {f : X → Set X} (hf : ∀ x, f x ∈ 𝓝 x) :
    ∃ s : Set X, s.Countable ∧ ⋃ x ∈ s, f x = univ 
goal: ∃ s, s.Countable ∧ ⋃ x ∈ s, f x = Set.univ

full_name: CompactExhaustion.toFun
code: /-- An [exhaustion by compact sets](https://en.wikipedia.org/wiki/Exhaustion_by_compact_sets) of a
topological space is a sequence of compact sets `K n` such that `K n ⊆ interior (K (n + 1))` and
`⋃ n, K n = univ`.

If `X` is a locally compact sigma compact space, then `CompactExhaustion.choice X` provides
a choice of an exhaustion by compact sets. This choice is also available as
`(default : CompactExhaustion X)`. -/
structure CompactExhaustion (X : Type*) [TopologicalSpace X] where
  /-- The sequence of compact sets that form a compact exhaustion. -/
  toFun : ℕ → Set X
  /-- The sets in the compact exhaustion are in fact compact. -/
  isCompact' : ∀ n, IsCompact (toFun n)
  /-- The sets in the compact exhaustion form a sequence:
    each set is contained in the interior of the next. -/
  subset_interior_succ' : ∀ n, toFun n ⊆ interior (toFun (n + 1))
  /-- The union of all sets in a compact exhaustion equals the entire space. -/
  iUnion_eq' : ⋃ n, toFun n = univ
goal: ℕ → Set X

full_name: CompactExhaustion.subset_interior_succ'
code: /-- An [exhaustion by compact sets](https://en.wikipedia.org/wiki/Exhaustion_by_compact_sets) of a
topological space is a sequence of compact sets `K n` such that `K n ⊆ interior (K (n + 1))` and
`⋃ n, K n = univ`.

If `X` is a locally compact sigma compact space, then `CompactExhaustion.choice X` provides
a choice of an exhaustion by compact sets. This choice is also available as
`(default : CompactExhaustion X)`. -/
structure CompactExhaustion (X : Type*) [TopologicalSpace X] where
  /-- The sequence of compact sets that form a compact exhaustion. -/
  toFun : ℕ → Set X
  /-- The sets in the compact exhaustion are in fact compact. -/
  isCompact' : ∀ n, IsCompact (toFun n)
  /-- The sets in the compact exhaustion form a sequence:
    each set is contained in the interior of the next. -/
  subset_interior_succ' : ∀ n, toFun n ⊆ interior (toFun (n + 1))
  /-- The union of all sets in a compact exhaustion equals the entire space. -/
  iUnion_eq' : ⋃ n, toFun n = univ
goal: self.toFun n ⊆ interior (self.toFun (n + 1))

full_name: CompactExhaustion
code: /-- An [exhaustion by compact sets](https://en.wikipedia.org/wiki/Exhaustion_by_compact_sets) of a
topological space is a sequence of compact sets `K n` such that `K n ⊆ interior (K (n + 1))` and
`⋃ n, K n = univ`.

If `X` is a locally compact sigma compact space, then `CompactExhaustion.choice X` provides
a choice of an exhaustion by compact sets. This choice is also available as
`(default : CompactExhaustion X)`. -/
structure CompactExhaustion (X : Type*) [TopologicalSpace X] where
  /-- The sequence of compact sets that form a compact exhaustion. -/
  toFun : ℕ → Set X
  /-- The sets in the compact exhaustion are in fact compact. -/
  isCompact' : ∀ n, IsCompact (toFun n)
  /-- The sets in the compact exhaustion form a sequence:
    each set is contained in the interior of the next. -/
  subset_interior_succ' : ∀ n, toFun n ⊆ interior (toFun (n + 1))
  /-- The union of all sets in a compact exhaustion equals the entire space. -/
  iUnion_eq' : ⋃ n, toFun n = univ
goal: Type u_4

full_name: CompactExhaustion.iUnion_eq'
code: /-- An [exhaustion by compact sets](https://en.wikipedia.org/wiki/Exhaustion_by_compact_sets) of a
topological space is a sequence of compact sets `K n` such that `K n ⊆ interior (K (n + 1))` and
`⋃ n, K n = univ`.

If `X` is a locally compact sigma compact space, then `CompactExhaustion.choice X` provides
a choice of an exhaustion by compact sets. This choice is also available as
`(default : CompactExhaustion X)`. -/
structure CompactExhaustion (X : Type*) [TopologicalSpace X] where
  /-- The sequence of compact sets that form a compact exhaustion. -/
  toFun : ℕ → Set X
  /-- The sets in the compact exhaustion are in fact compact. -/
  isCompact' : ∀ n, IsCompact (toFun n)
  /-- The sets in the compact exhaustion form a sequence:
    each set is contained in the interior of the next. -/
  subset_interior_succ' : ∀ n, toFun n ⊆ interior (toFun (n + 1))
  /-- The union of all sets in a compact exhaustion equals the entire space. -/
  iUnion_eq' : ⋃ n, toFun n = univ
goal: ⋃ n, self.toFun n = Set.univ

full_name: CompactExhaustion.isCompact'
code: /-- An [exhaustion by compact sets](https://en.wikipedia.org/wiki/Exhaustion_by_compact_sets) of a
topological space is a sequence of compact sets `K n` such that `K n ⊆ interior (K (n + 1))` and
`⋃ n, K n = univ`.

If `X` is a locally compact sigma compact space, then `CompactExhaustion.choice X` provides
a choice of an exhaustion by compact sets. This choice is also available as
`(default : CompactExhaustion X)`. -/
structure CompactExhaustion (X : Type*) [TopologicalSpace X] where
  /-- The sequence of compact sets that form a compact exhaustion. -/
  toFun : ℕ → Set X
  /-- The sets in the compact exhaustion are in fact compact. -/
  isCompact' : ∀ n, IsCompact (toFun n)
  /-- The sets in the compact exhaustion form a sequence:
    each set is contained in the interior of the next. -/
  subset_interior_succ' : ∀ n, toFun n ⊆ interior (toFun (n + 1))
  /-- The union of all sets in a compact exhaustion equals the entire space. -/
  iUnion_eq' : ⋃ n, toFun n = univ
goal: IsCompact (self.toFun n)

full_name: CompactExhaustion.instFunLikeNatSet
code: instance : FunLike (CompactExhaustion X) ℕ (Set X) 
goal: FunLike (CompactExhaustion X) ℕ (Set X)

full_name: CompactExhaustion.instRelHomClassNatSetLeSubset
code: instance : RelHomClass (CompactExhaustion X) LE.le HasSubset.Subset 
goal: RelHomClass (CompactExhaustion X) LE.le Subset

full_name: CompactExhaustion.toFun_eq_coe
code: @[simp]
theorem toFun_eq_coe : K.toFun = K 
goal: K.toFun = ⇑K

full_name: CompactExhaustion.isCompact
code: protected theorem isCompact (n : ℕ) : IsCompact (K n) 
goal: IsCompact (K n)

full_name: CompactExhaustion.subset_interior_succ
code: theorem subset_interior_succ (n : ℕ) : K n ⊆ interior (K (n + 1)) 
goal: K n ⊆ interior (K (n + 1))

full_name: CompactExhaustion.subset
code: @[mono]
protected theorem subset ⦃m n : ℕ⦄ (h : m ≤ n) : K m ⊆ K n 
goal: K m ⊆ K n

full_name: CompactExhaustion.subset_succ
code: theorem subset_succ (n : ℕ) : K n ⊆ K (n + 1) 
goal: K n ⊆ K (n + 1)

full_name: CompactExhaustion.subset_interior
code: theorem subset_interior ⦃m n : ℕ⦄ (h : m < n) : K m ⊆ interior (K n) 
goal: K m ⊆ interior (K n)

full_name: CompactExhaustion.iUnion_eq
code: theorem iUnion_eq : ⋃ n, K n = univ 
goal: ⋃ n, K n = Set.univ

full_name: CompactExhaustion.exists_mem
code: theorem exists_mem (x : X) : ∃ n, x ∈ K n 
goal: ∃ n, x ∈ K n

full_name: CompactExhaustion.exists_superset_of_isCompact
code: /-- A compact exhaustion eventually covers any compact set. -/
theorem exists_superset_of_isCompact {s : Set X} (hs : IsCompact s) : ∃ n, s ⊆ K n 
goal: ∃ n, s ⊆ K n

full_name: CompactExhaustion.find
code: /-- The minimal `n` such that `x ∈ K n`. -/
protected noncomputable def find (x : X) : ℕ 
goal: ℕ

full_name: CompactExhaustion.mem_find
code: theorem mem_find (x : X) : x ∈ K (K.find x) 
goal: x ∈ K (K.find x)

full_name: CompactExhaustion.mem_iff_find_le
code: theorem mem_iff_find_le {x : X} {n : ℕ} : x ∈ K n ↔ K.find x ≤ n 
goal: x ∈ K n ↔ K.find x ≤ n

full_name: CompactExhaustion.shiftr
code: /-- Prepend the empty set to a compact exhaustion `K n`. -/
def shiftr : CompactExhaustion X 
goal: CompactExhaustion X

full_name: CompactExhaustion.find_shiftr
code: @[simp]
theorem find_shiftr (x : X) : K.shiftr.find x = K.find x + 1 
goal: K.shiftr.find x = K.find x + 1

full_name: CompactExhaustion.mem_diff_shiftr_find
code: theorem mem_diff_shiftr_find (x : X) : x ∈ K.shiftr (K.find x + 1) \ K.shiftr (K.find x) 
goal: x ∈ K.shiftr (K.find x + 1) \ K.shiftr (K.find x)

full_name: CompactExhaustion.choice
code: /-- A choice of an
[exhaustion by compact sets](https://en.wikipedia.org/wiki/Exhaustion_by_compact_sets)
of a weakly locally compact σ-compact space. -/
noncomputable def choice (X : Type*) [TopologicalSpace X] [WeaklyLocallyCompactSpace X]
    [SigmaCompactSpace X] : CompactExhaustion X 
goal: CompactExhaustion X

full_name: CompactExhaustion.instInhabitedOfLocallyCompactSpace
code: noncomputable instance [LocallyCompactSpace X] :
    Inhabited (CompactExhaustion X) 
goal: Inhabited (CompactExhaustion X)