AFTD Auto-Formalizing Theoretical Domains

Cslib.good_selections_exist

theoremverifiedformalizationimported Lean

There exist an infinite sequence vs of vertex sets, an infinite sequence v of vertices, and an infinite sequence c of colors such that each vs n is a subset of the intersection of all previous vs ms, each v n belongs to the intersection of all previous vs ms but not to vs n, and the edges between v n and all vertices in vs n has the same color c n.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open Function Set in
variable {Vertex Color : Type*} [Finite Color] (color : Finset Vertex → Color) in
variable [Infinite Vertex] in
open scoped Classical in
lemma Cslib.good_selections_exist :
    ∃ vs : ℕ → Set Vertex, ∃ v : ℕ → Vertex, ∃ c : ℕ → Color,
    ∀ n, vs n ⊆ (⋂ m < n, vs m) ∧ v n ∈ (⋂ m < n, vs m) \ (vs n) ∧
      ∀ u ∈ vs n, color {v n, u} = c n
Formalizes
CSLib, `Cslib.good_selections_exist`
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
Built on 5
  • Cslib.GoodSelectionA "good selection" S selects an infinite subset S.vs of an infinite vertex set ivs and a distinguished vertex S.v in ivs but not…
  • Cslib.InfVSetAn InfVSet consists of a set of vertices and a proof that the set is infinite.
  • Cslib.goodSelection_seq_propAt every step, the goodSelection_seq makes a good selection and there are always infinitely many vertices remaining to be selected.
  • Cslib.goodSelection_seqStarting from the infinite set of all vertices, inductively make an infinite sequence of good selections.
  • Cslib.SelectionA Selection consists of an InfVSet, a vertex, and a color.
Used by 1
  • Cslib.infinite_graph_ramseyIf the edges of an infinite complete graph is assigned a finite number of colors, then there must exist a color c and an infinite set…

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true inopen Function Set invariable {Vertex Color : Type*} [Finite Color] (color : Finset Vertex → Color) invariable [Infinite Vertex] inopen scoped Classical in/-- There exist an infinite sequence `vs` of vertex sets, an infinite sequence `v` of vertices, and an infinite sequence `c` of colors such that each `vs n` is a subset of the intersection of all previous `vs m`s, each `v n` belongs to the intersection of all previous `vs m`s but not to `vs n`, and the edges between `v n` and all vertices in `vs n` has the same color `c n`. -/lemma Cslib.good_selections_exist :    ∃ vs : ℕ → Set Vertex, ∃ v : ℕ → Vertex, ∃ c : ℕ → Color,    ∀ n, vs n ⊆ (⋂ m < n, vs m) ∧ v n ∈ (⋂ m < n, vs m) \ (vs n) ∧      ∀ u ∈ vs n, color {v n, u} = c n := by  use (fun k ↦ (goodSelection_seq color k).vs.set)  use (fun k ↦ (goodSelection_seq color k).v)  use (fun k ↦ (goodSelection_seq color k).c)  intro n  obtain ⟨ivs, h_ivs, h_eq⟩ := goodSelection_seq_prop color n  rw [← h_eq]  exact h_ivs
See it in the graphDiscuss this resultChallenge it