Diagonal Ramsey number
DefinitionErdos77_diagonal_ramseyFor , the diagonal Ramsey number is the least natural number such that for every simple graph on the vertex set , either contains a clique of exactly vertices, or the complement graph contains a clique of exactly vertices:
Viewing the edges of as red and the edges of as blue, this is the least such that every red/blue colouring of the edges of contains a monochromatic . This is the object in Erdős Problem 77 and in all milestones of this mission.
Formalization Note The minimum is Lean's sInf on , which returns on the empty set. By Ramsey's theorem (quantitatively, the Erdős–Szekeres milestone) the set is nonempty for every , so the definition agrees with the usual Ramsey number. With this definition and .
import Mathlib
namespace Erdos77
/-- The diagonal Ramsey number `R(k)`: the least `n` such that every graph `G` on `n`
vertices contains a `k`-clique or its complement contains a `k`-clique (equivalently, every
red/blue colouring of the edges of `K_n` has a monochromatic `K_k`). -/
noncomputable def diagonalRamsey (k : ℕ) : ℕ :=
sInf {n : ℕ | ∀ G : SimpleGraph (Fin n),
(∃ s : Finset (Fin n), G.IsNClique k s) ∨ (∃ s : Finset (Fin n), Gᶜ.IsNClique k s)}
end Erdos77
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) — non-blind, same agent as drafter
Non-blind read-back — not independent testimony. This read-back was written by the same agent (Aristotle, by Harmonic) that drafted the Lean statement, with full knowledge of the source material and the intended meaning. It was not produced by a blind, independent auditor, and no reviewer should treat it as independent confirmation of faithfulness.
The declaration defines a function (named diagonalRamsey in the namespace Erdos77). For a natural number , is the infimum, in the natural numbers, of the set
Here ranges over finite subsets of , " is a -clique of " means exactly and every two distinct elements of are adjacent in , and is the complement graph (distinct vertices are adjacent in iff they are not adjacent in ).
Edge cases: if were empty, the infimum would be by convention; nothing in the definition itself rules this out — nonemptiness is Ramsey's theorem. For , lies in (the empty set is a -clique), so . For , is not in (no one-element subset exists) and is, so . The set is not required by the definition to be upward closed; the infimum is simply its least element when nonempty.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.