Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4.8 — continuity by preimages of open sets

Proved
Rudin.ch04_continuous_iff_preimage_open

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

analysistopology

A mapping fff of a metric space XXX into a metric space YYY is continuous if and only if f−1(V)f^{-1}(V)f−1(V) is open in XXX for every open V⊆YV \subseteq YV⊆Y.

Preamble
import Mathlib
import Definitions.Def_Rudin_ch04_continuity

open Filter Topology
Formal statement
namespace Rudin

/-- Rudin, Theorem 4.8: a mapping `f` of a metric space `X` into a metric space `Y` is
continuous if and only if the preimage of every open subset of `Y` is open in `X`. -/
theorem ch04_continuous_iff_preimage_open {X Y : Type*} [MetricSpace X] [MetricSpace Y]
    (f : X → Y) : Continuous f ↔ ∀ V : Set Y, IsOpen V → IsOpen (f ⁻¹' V) := by sorry

end Rudin
Source
Walter Rudin, Principles of Mathematical Analysis, 3rd edition, McGraw-Hill, 1976, Chapter 4, p. 86, Theorem 4.8
Read-back

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

Let XXX and YYY be metric spaces and f:X→Yf : X \to Yf:X→Y a function defined on all of XXX. Then fff is continuous (globally, with respect to the metric topologies) if and only if for every subset V⊆YV \subseteq YV⊆Y that is open, the preimage

f−1(V)={ x∈X:f(x)∈V }f^{-1}(V) = \{\, x \in X : f(x) \in V \,\}f−1(V)={x∈X:f(x)∈V}

is open in XXX.

Both directions are asserted; the right-hand condition quantifies over all open subsets of YYY, with no restriction to a basis of balls.

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