Cslib.infinite_pigeonhole_principle
theoremverifiedformalizationimported Lean
An infinite pigeonhole principle.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Function Set in theorem Cslib.infinite_pigeonhole_principle {X Y : Type*} [Finite Y] (f : X → Y) {s : Set X} (h_inf : s.Infinite) : ∃ y, ∃ t, t.Infinite ∧ t ⊆ s ∧ ∀ x ∈ t, f x = y
- Formalizes
- CSLib, `Cslib.infinite_pigeonhole_principle`
- Lean proof
- By Ching-Tsun Chou, from github.com/leanprover/cslib at
3951377e5a3f(Copyright (c) 2026 Ching-Tsun Chou. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.33.0.Cslib.infinite_pigeonhole_principle← Cslib.infinite_pigeonhole_principle (Cslib/Foundations/Combinatorics/InfiniteGraphRamsey.lean:29): verbatim
- Verified
- 08 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Used by 2
- Cslib.infinite_graph_ramseyIf the edges of an infinite complete graph is assigned a finite number of colors, then there must exist a color
cand an infinite set… - Cslib.goodSelection_existsGiven any infinite vertex set, a good selection from it always exists.
- Cslib.infinite_graph_ramseyIf the edges of an infinite complete graph is assigned a finite number of colors, then there must exist a color
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option autoImplicit true inset_option relaxedAutoImplicit true inopen Function Set in/-- An infinite pigeonhole principle. -/theorem Cslib.infinite_pigeonhole_principle {X Y : Type*} [Finite Y] (f : X → Y) {s : Set X} (h_inf : s.Infinite) : ∃ y, ∃ t, t.Infinite ∧ t ⊆ s ∧ ∀ x ∈ t, f x = y := by have := h_inf.to_subtype obtain ⟨y, h_inf'⟩ := Finite.exists_infinite_fiber (s.domRestrict f) have h_inf_iff := Equiv.infinite_iff <| Equiv.subtypeSubtypeEquivSubtypeInter (· ∈ s) (fun x ↦ f x = y) use y, {x | x ∈ s ∧ f x = y}, infinite_coe_iff.mp <| h_inf_iff.mp h_inf' grind