Lean library · module TopologyByExample.Theorems.OpenFamilyMetacompact

Refining open families on their union

Source file

This file was written by Codex (OpenAI's AI model) working under the direction of David R. MacIver, who reviews it and is responsible for it.

Imports

theorem exists_pointFinite_refinement_of_metacompact_union

TopologyByExample.exists_pointFinite_refinement_of_metacompact_union

An open family whose union is metacompact has a point-finite open refinement with the same union.

theorem exists_pointFinite_refinement_of_metacompact_union
    {X : Type*} [TopologicalSpace X] (U : Set (Set X))
    (hUo : ∀ u ∈ U, IsOpen u) [MetacompactSpace (⋃₀ U)] :
    ∃ V : Set (Set X), (∀ v ∈ V, IsOpen v) ∧ ⋃₀ V = ⋃₀ U ∧
      (∀ x, {v : V | x ∈ (v : Set X)}.Finite) ∧ ∀ v ∈ V, ∃ u ∈ U, v ⊆ u
Proof
:= by
  classical
  let O := ⋃₀ U
  let e : O → X := Subtype.val
  have hO : IsOpen O := isOpen_sUnion hUo
  obtain ⟨V, hVo, hV, hVf, hVU⟩ := MetacompactSpace.pointFinite_refinement
    (preimage e '' U) (by
      rintro _ ⟨u, hu, rfl⟩
      exact (hUo u hu).preimage continuous_subtypeVal) (by
      apply eq_univ_of_forall
      intro x
      obtain ⟨u, hu, hxu⟩ := mem_sUnion.mp x.property
      exact mem_sUnion.mpr ⟨e ⁻¹' u, mem_image_of_mem _ hu, hxu⟩)
  refine ⟨image e '' V, ?_, ?_, ?_, ?_⟩
  · rintro _ ⟨v, hv, rfl⟩
    exact hO.isOpenEmbedding_subtypeVal.isOpenMap v (hVo v hv)
  · ext x
    constructor
    · rintro ⟨_, ⟨v, hv, rfl⟩, y, hy, rfl⟩
      exact y.property
    · intro hx
      obtain ⟨v, hv, hxv⟩ := mem_sUnion.mp (hV ▸ mem_univ (⟨x, hx⟩ : O))
      exact mem_sUnion.mpr ⟨e '' v, ⟨v, hv, rfl⟩, ⟨⟨x, hx⟩, hxv, rfl⟩⟩
  · intro x
    apply Finite.of_finite_image (f := Subtype.val) _ Subtype.val_injective.injOn
    by_cases hx : x ∈ O
    · apply (((hVf ⟨x, hx⟩).image Subtype.val).image (image e)).subset
      rintro _ ⟨⟨_, ⟨v, hv, rfl⟩⟩, ⟨y, hyv, hyx⟩, rfl⟩
      have hy : y = (⟨x, hx⟩ : O) := Subtype.ext hyx
      exact ⟨v, ⟨⟨v, hv⟩, by simpa [hy] using hyv, rfl⟩, rfl⟩
    · apply finite_empty.subset
      rintro _ ⟨⟨_, ⟨v, hv, rfl⟩⟩, ⟨y, _, hyx⟩, rfl⟩
      exact (hx (hyx ▸ y.property)).elim
  · rintro _ ⟨v, hv, rfl⟩
    obtain ⟨_, ⟨u, hu, rfl⟩, hvu⟩ := hVU v hv
    exact ⟨u, hu, image_subset_iff.mpr hvu⟩