AFTD Auto-Formalizing Theoretical Domains

Cslib.GoodSelection

defimported Lean

A "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 in S.vs, and makes sure that the edges between S.v and all vertices in S.vs have the same color S.c.

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
open scoped Classical in
def Cslib.GoodSelection (ivs : InfVSet Vertex) (S : Selection Vertex Color) : Prop
Defined in
CSLib, `Cslib.GoodSelection`
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
none listed
Built on 2
  • Cslib.InfVSetAn InfVSet consists of a set of vertices and a proof that the set is infinite.
  • Cslib.SelectionA Selection consists of an InfVSet, a vertex, and a color.
Used by 4
  • 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.good_selections_existThere exist an infinite sequence vs of vertex sets, an infinite sequence v of vertices, and an infinite sequence c of colors such…
  • Cslib.goodSelection_seqStarting from the infinite set of all vertices, inductively make an infinite sequence of good selections.
  • Cslib.goodSelection_existsGiven any infinite vertex set, a good selection from it always exists.

Lean source view module on GitHub

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
open scoped Classical in
/-- A "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 in `S.vs`, and makes sure that the edges between `S.v` and all vertices in `S.vs` have the same color `S.c`. -/
def Cslib.GoodSelection (ivs : InfVSet Vertex) (S : Selection Vertex Color) : Prop :=
  S.vs.set ⊆ ivs.set ∧ S.v ∈ ivs.set \ S.vs.set ∧ ∀ u ∈ S.vs.set, color {S.v, u} = S.c
See it in the graphDiscuss this resultChallenge it