Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The Erdős–Hajnal property for a fixed forbidden induced subgraph HHH

Definition
TenChallenges_ErdosHajnal

by utkuokur · Nov 4, 2026 · Mathlib 0df444a (Lean v4.33.1)

erdos-hajnalgraph-theoryinduced-subgraphsramsey-theory

The definition behind Challenge 5 of the Ten Challenges benchmark. For a graph HHH on a vertex type WWW, the Erdős–Hajnal property for HHH says that there is a real constant c>0c>0c>0 such that for every finite graph GGG (on a vertex type in the lowest universe) containing no induced subgraph isomorphic to HHH, there is a finite set sss of vertices of GGG which is a clique of GGG or a clique of the complement of GGG (an independent set), with

∣s∣ ≥ ∣V(G)∣c.|s| \ \ge\ |V(G)|^{c}.∣s∣ ≥ ∣V(G)∣c.

The constant ccc depends only on HHH. The Erdős–Hajnal conjecture asserts this property for every finite graph HHH; the property is the basic object of the theory of induced subgraph density.

Formalization Note. "No induced copy of HHH" is ¬ H ⊴ G with Mathlib's induced-subgraph relation; the size bound is stated in the reals with real exponentiation, so ∣V(G)∣=0|V(G)|=0∣V(G)∣=0 is covered by s=∅s=\emptysets=∅.

Definition code
import Mathlib.Combinatorics.SimpleGraph.Hasse
import Mathlib.Analysis.SpecialFunctions.Pow.Real

open SimpleGraph

/-- The Erdős–Hajnal conjecture for a fixed forbidden graph `H`: there is `c_H > 0`
such that every finite `H`-free graph `G` has a clique or an independent set of
size at least `|V(G)|^c_H`. -/
def ErdosHajnalConjectureFor {W : Type*} (H : SimpleGraph W) : Prop :=
  ∃ c : ℝ, 0 < c ∧
    ∀ {V : Type} [Fintype V] (G : SimpleGraph V), ¬ H ⊴ G →
      ∃ s : Finset V, (G.IsClique s ∨ Gᶜ.IsClique s) ∧
        (s.card : ℝ) ≥ (Fintype.card V : ℝ) ^ c
Source
Ten Challenges repository, file Defs_and_Lems/ErdosHajnal.lean (commit ff14a56), https://github.com/TenChallenges/ten-challenges/blob/main/Defs_and_Lems/ErdosHajnal.lean; conjecture as in P. Erdős, A. Hajnal, Ramsey-type theorems, Discrete Appl. Math. 25 (1989).
Read-back

What the Lean code literally says, in plain math · claude-fable-5-1

Read-back of the definition ErdosHajnalConjectureFor.

The definition takes a type WWW (any type, in any universe, possibly empty or infinite) and a simple graph HHH on vertex set WWW (a simple graph is an irreflexive, symmetric adjacency relation ∼H\sim_H∼H​ on WWW: no loops, no multiple edges). It produces the following proposition, written here in full:

∃ c∈R:  0<c  ∧  ∀ V finite, ∀ G a simple graph on V:H⋬G  ⟹  ∃ s⊆V: (s is a clique of G  ∨  s is a clique of G‾)  ∧  ∣s∣≥∣V∣c.\exists\, c \in \mathbb{R}:\; 0 < c \;\wedge\; \forall\, V\ \text{finite},\ \forall\, G \text{ a simple graph on } V:\quad H \not\trianglelefteq G \;\Longrightarrow\; \exists\, s \subseteq V:\ \big(s \text{ is a clique of } G \;\vee\; s \text{ is a clique of } \overline{G}\big) \;\wedge\; |s| \ge |V|^{c}.∃c∈R:0<c∧∀V finite, ∀G a simple graph on V:H⊴G⟹∃s⊆V: (s is a clique of G∨s is a clique of G)∧∣s∣≥∣V∣c.

Every binder and hypothesis, in order:

  • ccc: there exists a real number ccc with 0<c0 < c0<c (strict). No upper bound is imposed on ccc. The quantifier on ccc comes before those on VVV and GGG, so a single ccc (depending only on HHH) must work for all VVV and GGG below.

  • VVV: for every type VVV in the lowest universe (ordinary sets) that is equipped with a finiteness structure; i.e. VVV ranges over all finite vertex sets, the empty set included. No decidability or other assumptions are made on VVV.

  • GGG: for every simple graph GGG on vertex set VVV (adjacency written ∼G\sim_G∼G​).

  • Hypothesis H⋬GH \not\trianglelefteq GH⊴G: it is not the case that HHH is inducingly contained in GGG. Here H⊴GH \trianglelefteq GH⊴G means that there exists a graph embedding of HHH into GGG, i.e. an injective map f:W→Vf : W \to Vf:W→V such that for all a,b∈Wa, b \in Wa,b∈W: f(a)∼Gf(b)f(a) \sim_G f(b)f(a)∼G​f(b) if and only if a∼Hba \sim_H ba∼H​b. Equivalently, GGG has an induced subgraph isomorphic to HHH. So the hypothesis says: GGG contains no induced copy of HHH. (It is not the weaker statement "GGG contains no subgraph isomorphic to HHH": a copy of HHH in GGG with extra edges among its vertices does not violate the hypothesis.)

  • Conclusion: there exists a finite set sss of vertices of GGG (any subset of the finite set VVV; sss may be empty) such that

    1. either sss is a clique of GGG, meaning: for all u,v∈su, v \in su,v∈s with u≠vu \ne vu=v, u∼Gvu \sim_G vu∼G​v (every two distinct elements of sss are adjacent);
    2. or sss is a clique of the complement graph G‾\overline{G}G, whose adjacency is "u≠vu \ne vu=v and u̸∼Gvu \not\sim_G vu∼G​v"; i.e. for all u,v∈su, v \in su,v∈s with u≠vu \ne vu=v, u̸∼Gvu \not\sim_G vu∼G​v — sss is an independent set of GGG;

    and, comparing real numbers,

∣s∣  ≥  ∣V∣c,|s| \;\ge\; |V|^{c},∣s∣≥∣V∣c,

where ∣s∣|s|∣s∣ is the number of elements of sss, ∣V∣|V|∣V∣ is the number of vertices of GGG (both cast from natural numbers to reals), the inequality is non-strict (≥\ge≥, not >>>), and xcx^{c}xc is the real power with real exponent: for x>0x > 0x>0 it is ecln⁡xe^{c \ln x}eclnx; for x=0x = 0x=0 and c>0c > 0c>0 it is 0c=00^{c} = 00c=0. (Since c>0c > 0c>0 is required, the convention 00=10^0 = 100=1 never comes into play.)

Edge cases silently included by the quantifiers:

  • VVV may be empty. Then ∣V∣c=0c=0|V|^{c} = 0^{c} = 0∣V∣c=0c=0 and s=∅s = \varnothings=∅ satisfies the conclusion, because ∅\varnothing∅ is vacuously a clique of both GGG and G‾\overline{G}G and 0≥00 \ge 00≥0.
  • Any singleton s={v}s = \{v\}s={v} is vacuously both a clique of GGG and a clique of G‾\overline{G}G; so whenever ∣V∣c≤1|V|^{c} \le 1∣V∣c≤1 (for instance ∣V∣=1|V| = 1∣V∣=1, or VVV empty) the conclusion is met by a singleton or by ∅\varnothing∅.
  • If WWW is empty (HHH has no vertices), the empty map is an embedding of HHH into every GGG, so H⊴GH \trianglelefteq GH⊴G always holds, the hypothesis H⋬GH \not\trianglelefteq GH⊴G can never be satisfied, and the universally quantified part is vacuously true; the whole proposition then reduces to "there exists a real c>0c > 0c>0", which is true.
  • If WWW is infinite, no injective map W→VW \to VW→V into a finite VVV exists, so the hypothesis holds for every finite GGG and the proposition asserts the conclusion for all finite simple graphs GGG (on any finite vertex set).
  • Nothing requires HHH to be finite, nonempty, or connected; HHH enters only through the hypothesis H⋬GH \not\trianglelefteq GH⊴G.
Human review
  • Endorsed by Shuze Chen · Nov 4, 2026

    Confirmed by the moderator at approval.

  • Endorsed by utkuokur · Nov 4, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me