AFTD Auto-Formalizing Theoretical Domains

prioritized_borel_eventually_constant_compact_projection_fsigma

theoremverified

Projecting from a compact hidden-run space the closed compatible-run set restricted to traces eventually equal to a fixed priority gives a countable union of closed branch sets.

Statement

theorem prioritized_borel_eventually_constant_compact_projection_fsigma
    {B X P : Type*} [TopologicalSpace B] [TopologicalSpace X] [CompactSpace X]
    [TopologicalSpace P] [T2Space P] (C : Set (B × X)) (hC : IsClosed C)
    (prio : X → ℕ → P) (hprio : ∀ n, Continuous (fun x => prio x n)) (p : P) :
    ∃ F : ℕ → Set B, (∀ n, IsClosed (F n)) ∧
      {b | ∃ x, (b, x) ∈ C ∧ ∃ N, ∀ n ≥ N, prio x n = p} = ⋃ n, F n
Source
Filed by the prover as a step towards another result
Verified
12 Nov 2026
Axioms
Classical.choiceQuot.soundpropext

The proof, explained

To show that the projection of the compatible-run set with eventually constant priority is an F_σ set, the condition of eventually stabilizing to priority p is decomposed into the countable union over N ∈ ℕ of stabilizing for all n ≥ N. For each N, the corresponding set of pairs E_N ⊆ B × X is closed as the intersection of C with closed equalizers into the Hausdorff space P. Because X is compact, Kuratowski's theorem ensures that the projection map onto B is closed, so each projected set F_N is closed. The target set is therefore the countable union of the closed sets F_N.

  1. Define a sequence of sets E_N ⊆ B × X restricting C to pairs whose second component satisfies the priority condition from stage N onward.

    For each N ∈ ℕ, let E_N = C ∩ {(b, x) ∈ B × X | ∀ n ≥ N, prio(x, n) = p}. The union of these sets over all N represents the condition that the priority prio(x, n) is eventually equal to p.

    lines 7–9

      classical
      let E : ℕ → Set (B × X) := fun N =>
        C ∩ {z | ∀ n ≥ N, prio z.2 n = p}
  2. Each set E_N is closed in B × X.

    Because C is closed, it suffices to prove that {(b, x) | ∀ n ≥ N, prio(x, n) = p} is closed. This set is the intersection over all n ≥ N of the fibers where prio(x, n) = p. For each n, the map (b, x) ↦ prio(x, n) is continuous as the composition of the second projection with the continuous function prio(·, n). Since the target space P is Hausdorff (T2), the equalizer of this map with the constant function p is closed by isClosed_eq. An arbitrary intersection of closed sets is closed (isClosed_iInter), so the condition holds for all n ≥ N, making E_N an intersection of two closed sets and thus closed.

    lines 10–22

    uses isClosed_iInter, isClosed_eq, continuous_snd, continuous_const

      have hE : ∀ N, IsClosed (E N) := by
        intro N
        apply hC.inter
        have h : {z : B × X | ∀ n ≥ N, prio z.2 n = p} =
            ⋂ n, ⋂ (_ : n ≥ N), {z : B × X | prio z.2 n = p} := by
          ext z
          simp
        rw [h]
        apply isClosed_iInter
        intro n
        apply isClosed_iInter
        intro hn
        exact isClosed_eq ((hprio n).comp continuous_snd) continuous_const
  3. The projections F_N = π₁(E_N) form a sequence of closed subsets of B.

    We choose the sequence of sets F_N = Prod.fst '' E_N. Because X is compact, the projection map Prod.fst : B × X → B is a closed map by isClosedMap_fst_of_compactSpace. Since each E_N is closed, its image F_N under this projection is closed in B.

    lines 23–25

    uses isClosedMap_fst_of_compactSpace

      refine ⟨fun N => Prod.fst '' E N, ?_, ?_⟩
      · intro N
        exact isClosedMap_fst_of_compactSpace _ (hE N)
  4. The projected set equals the countable union ⋃_N F_N.

    By extensionality on b ∈ B and unfolding definitions, b ∈ ⋃_N F_N means there exists N ∈ ℕ and a pair (b', x) ∈ E_N such that b' = b. In turn, (b, x) ∈ E_N means (b, x) ∈ C and prio(x, n) = p for all n ≥ N. Both directions of the equivalence follow directly by unpacking and repackaging the existential witnesses x ∈ X and N ∈ ℕ.

    lines 26–34

    uses Set.mem_ofPred_eq, Set.mem_iUnion, Set.mem_image, Prod.exists, Set.mem_inter_iff

      · ext b
        simp only [Set.mem_ofPred_eq, Set.mem_iUnion, Set.mem_image, Prod.exists,
          E, Set.mem_inter_iff]
        constructor
        · rintro ⟨x, hx, N, hN⟩
          exact ⟨N, b, x, ⟨hx, hN⟩, rfl⟩
        · rintro ⟨N, b', x, ⟨hx, hN⟩, hb⟩
          subst b'
          exact ⟨x, hx, N, hN⟩
isClosedMap_fst_of_compactSpace
The projection from the product of any space with a compact space onto the first factor is a closed map.
continuous_const
A constant function between topological spaces is continuous.
continuous_snd
The projection map from a product space to its second factor is continuous.
isClosed_eq
The equalizer of two continuous maps into a Hausdorff space is closed.
isClosed_iInter
The intersection of any family of closed sets is closed.
Prod.exists
An existential quantifier over a product type is equivalent to existential quantifiers over each component.
Set.mem_image
Membership in an image f '' s is equivalent to being the image under f of some element of s.
Set.mem_inter_iff
Membership in an intersection of two sets is equivalent to membership in both sets.
Set.mem_iUnion
Membership in an indexed union is equivalent to membership in at least one set in the family.
Set.mem_ofPred_eq
An element belongs to a set comprehension {x | p x} if and only if p holds at that element.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

theorem prioritized_borel_eventually_constant_compact_projection_fsigma    {B X P : Type*} [TopologicalSpace B] [TopologicalSpace X] [CompactSpace X]    [TopologicalSpace P] [T2Space P] (C : Set (B × X)) (hC : IsClosed C)    (prio : X → ℕ → P) (hprio : ∀ n, Continuous (fun x => prio x n)) (p : P) :    ∃ F : ℕ → Set B, (∀ n, IsClosed (F n)) ∧      {b | ∃ x, (b, x) ∈ C ∧ ∃ N, ∀ n ≥ N, prio x n = p} = ⋃ n, F n := by  classical  let E : ℕ → Set (B × X) := fun N =>    C ∩ {z | ∀ n ≥ N, prio z.2 n = p}  have hE : ∀ N, IsClosed (E N) := by    intro N    apply hC.inter    have h : {z : B × X | ∀ n ≥ N, prio z.2 n = p} =        ⋂ n, ⋂ (_ : n ≥ N), {z : B × X | prio z.2 n = p} := by      ext z      simp    rw [h]    apply isClosed_iInter    intro n    apply isClosed_iInter    intro hn    exact isClosed_eq ((hprio n).comp continuous_snd) continuous_const  refine ⟨fun N => Prod.fst '' E N, ?_, ?_⟩  · intro N    exact isClosedMap_fst_of_compactSpace _ (hE N)  · ext b    simp only [Set.mem_ofPred_eq, Set.mem_iUnion, Set.mem_image, Prod.exists,      E, Set.mem_inter_iff]    constructor    · rintro ⟨x, hx, N, hN⟩      exact ⟨N, b, x, ⟨hx, hN⟩, rfl⟩    · rintro ⟨N, b', x, ⟨hx, hN⟩, hb⟩      subst b'      exact ⟨x, hx, N, hN⟩
See it in the graphDiscuss this resultChallenge it