Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2.47 — connected subsets of the line

Proved
Rudin.ch02_connected_iff_interval

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

topology

A subset EEE of R\mathbb{R}R is connected if and only if it is order-convex: whenever x,y∈Ex, y \in Ex,y∈E and x<z<yx < z < yx<z<y, also z∈Ez \in Ez∈E.

Preamble
import Mathlib
Formal statement
namespace Rudin

/-- Rudin, Theorem 2.47: a subset `E` of the real line is connected if and only if it is
order-convex: whenever `x, y ∈ E` and `x < z < y`, also `z ∈ E`. -/
theorem ch02_connected_iff_interval (E : Set ℝ) :
    IsPreconnected E ↔ ∀ x ∈ E, ∀ y ∈ E, ∀ z : ℝ, x < z → z < y → z ∈ E := by sorry

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

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

For an arbitrary subset E⊆RE \subseteq \mathbb{R}E⊆R, the following are asserted to be equivalent:

  • EEE is preconnected: it cannot be split by two open sets that both meet EEE, cover EEE, and whose intersection misses EEE. (This is the connectedness condition without the nonemptiness requirement, so the empty set qualifies.)
  • EEE is order-convex: for all x∈Ex \in Ex∈E, all y∈Ey \in Ey∈E and all real zzz, if x<zx < zx<z and z<yz < yz<y then z∈Ez \in Ez∈E.

Both inequalities in the convexity condition are strict, and xxx, yyy are not assumed ordered in advance — the condition is vacuous unless x<z<yx < z < yx<z<y. The equivalence is claimed for every EEE, including ∅\emptyset∅ and singletons.

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