Lax14.Ramsey

Ramsey's theorem

concepts/Lax14/Ramsey.lean · lax-14

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Concept map

    Proven claimThis concept

    Evidence

    Each proof establishes this claim relative to its assumptions.

    Theorem

    For all a and b there is an N such that every graph on at least N vertices contains a clique on a vertices or an independent set on b vertices. Equivalently: colouring the edges of a large enough complete graph with two colours always leaves a monochromatic clique.

    Lean source view on GitHub

    1import Mathlib.Combinatorics.SimpleGraph.Clique
    2import Mathlib.Data.Set.Card
    3
    4/-!
    5---
    6title: Ramsey's theorem
    7type: theorem
    8---
    9For all *a* and *b* there is an *N* such that every graph on at least *N*
    10vertices contains a clique on *a* vertices or an independent set on *b*
    11vertices. Equivalently: colouring the edges of a large enough complete
    12graph with two colours always leaves a monochromatic clique.
    13
    14# Formalization notes
    15
    16A clique is a set of pairwise adjacent vertices and an independent set a
    17set of pairwise non-adjacent vertices, both in mathlib's `Set`-valued,
    18`Prop`-valued form (`IsIndepSet` is by definition pairwise
    19non-adjacency, so no complement graph and no decidability appear in the
    20statement). Sizes are counted with `Set.ncard` and stated as "at least",
    21as everywhere in this submission.
    22
    23Graphs range over the canonical carriers `Fin n` for all `n` beyond the
    24bound, so the statement applies to a graph on any finite vertex set by
    25transport along a bijection.
    26
    27This is the two-colour case of the multicolour concept of this
    28submission — colour a pair by whether it is an edge — and it is proved
    29that way, by a glue proof assuming that statement. It gets its own
    30statement because it is the form the literature cites and the form
    31graph-theoretic applications consume, and because a submission's headline
    32should not be reachable only through a strengthening.
    33-/
    34
    35namespace Lax14.Ramsey
    36
    37/-- Ramsey's theorem: a large enough graph contains a clique on `a`
    38vertices or an independent set on `b` vertices. -/
    39axiom exists_clique_or_indepSet (a b : ℕ) :
    40 ∃ N : ℕ, ∀ (n : ℕ) (G : SimpleGraph (Fin n)), N ≤ n →
    41 (∃ S : Set (Fin n), G.IsClique S ∧ a ≤ S.ncard) ∨
    42 (∃ S : Set (Fin n), G.IsIndepSet S ∧ b ≤ S.ncard)
    43
    44end Lax14.Ramsey
    45
    Show Proof

    Formalization notes

    A clique is a set of pairwise adjacent vertices and an independent set a set of pairwise non-adjacent vertices, both in mathlib's SetSet-valued, PropProp-valued form (IsIndepSetIsIndepSet is by definition pairwise non-adjacency, so no complement graph and no decidability appear in the statement). Sizes are counted with Set.ncardSet.ncard and stated as "at least", as everywhere in this submission.

    Graphs range over the canonical carriers FinnFin n for all nn beyond the bound, so the statement applies to a graph on any finite vertex set by transport along a bijection.

    This is the two-colour case of the multicolour concept of this submission — colour a pair by whether it is an edge — and it is proved that way, by a glue proof assuming that statement. It gets its own statement because it is the form the literature cites and the form graph-theoretic applications consume, and because a submission's headline should not be reachable only through a strengthening.

    Community review

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above; your ORCID profile must share a public name.

    0 comments

    Loading discussion…