Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2.24 — unions and intersections of open and closed sets

Proved
Rudin.ch02_open_closed_ops

by LG · Sep 12, 2026 · Mathlib 0df444a (Lean v4.33.1)

topology

In a metric space: (a) any union of open sets is open; (b) any intersection of closed sets is closed; (c) a finite intersection of open sets is open; (d) a finite union of closed sets is closed. The finiteness in (c) and (d) is essential, as Rudin's Example 2.25 shows.

Preamble
import Mathlib
Formal statement
namespace Rudin

/-- Rudin, Theorem 2.24: arbitrary unions of open sets are open, arbitrary intersections of
closed sets are closed, finite intersections of open sets are open, and finite unions of closed
sets are closed. -/
theorem ch02_open_closed_ops (X : Type) [MetricSpace X] :
    (∀ (ι : Type) (G : ι → Set X), (∀ i, IsOpen (G i)) → IsOpen (⋃ i, G i)) ∧
    (∀ (ι : Type) (F : ι → Set X), (∀ i, IsClosed (F i)) → IsClosed (⋂ i, F i)) ∧
    (∀ (n : ℕ) (G : Fin n → Set X), (∀ i, IsOpen (G i)) → IsOpen (⋂ i, G i)) ∧
    (∀ (n : ℕ) (F : Fin n → Set X), (∀ i, IsClosed (F i)) → IsClosed (⋃ i, F i)) := by sorry

end Rudin
Source
Walter Rudin, Principles of Mathematical Analysis, 3rd edition, McGraw-Hill, 1976, Chapter 2, p. 34, Theorem 2.24
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic)

Let XXX be a metric space (a type in the lowest universe with a metric, hence with its induced topology). Four assertions are made simultaneously:

  1. For every index type ι\iotaι (again in the lowest universe) and every family G:ι→P(X)G : \iota \to \mathcal{P}(X)G:ι→P(X), if each GiG_iGi​ is open then ⋃iGi\bigcup_{i} G_i⋃i​Gi​ is open.
  2. For every index type ι\iotaι and every family F:ι→P(X)F : \iota \to \mathcal{P}(X)F:ι→P(X), if each FiF_iFi​ is closed then ⋂iFi\bigcap_{i} F_i⋂i​Fi​ is closed.
  3. For every natural number nnn and every family GGG of subsets indexed by {0,…,n−1}\{0,\dots,n-1\}{0,…,n−1}, if each GiG_iGi​ is open then ⋂iGi\bigcap_{i} G_i⋂i​Gi​ is open.
  4. For every natural number nnn and every family FFF of subsets indexed by {0,…,n−1}\{0,\dots,n-1\}{0,…,n−1}, if each FiF_iFi​ is closed then ⋃iFi\bigcup_{i} F_i⋃i​Fi​ is closed.

The index types in 1 and 2 are completely arbitrary, including the empty type: then ⋃iGi=∅\bigcup_i G_i = \emptyset⋃i​Gi​=∅ and ⋂iFi=X\bigcap_i F_i = X⋂i​Fi​=X. Likewise 3 and 4 include n=0n = 0n=0, where the intersection is all of XXX and the union is empty. "Finite" in 3 and 4 is realized specifically by index sets of the form {0,…,n−1}\{0,\dots,n-1\}{0,…,n−1}.

Human review
  • Endorsed by Shuze Chen · Sep 12, 2026

  • Endorsed by LG · Sep 12, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me