AFTD Auto-Formalizing Theoretical Domains

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.
Verified
08 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 2

Lean source view module on GitHub

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
See it in the graphDiscuss this resultChallenge it