Add Erdős Problem 593 (obligatory 3-uniform subhypergraphs, $500 prize)#3774
Add Erdős Problem 593 (obligatory 3-uniform subhypergraphs, $500 prize)#3774henrykmichalewski wants to merge 8 commits into
Conversation
…s ($500 prize) Adds formalization of Erdős Problem 593 (Erdős-Galvin-Hajnal, $500 prize). Reference: https://www.erdosproblems.com/593 Characterize finite 3-uniform hypergraphs appearing in every 3-uniform hypergraph of chromatic number > ℵ₀. Includes ThreeUniformHypergraph structure, chromaticCardinal for hypergraphs, 4 fully proved lemmas, and graph analogue variants. Assisted by Claude (Anthropic).
|
Closes #813 |
mo271
left a comment
There was a problem hiding this comment.
Thanks!
There are some problems here, see comments, I only reviewed up to the first trivially provable open (or not so open) statement
|
|
||
| **Problem (Erdős, $500)**: Characterize those finite 3-uniform hypergraphs which appear in | ||
| every 3-uniform hypergraph of chromatic number $> \aleph_0$. | ||
|
|
||
| **Background:** A hypergraph $H = (V, E)$ is **$r$-uniform** if every hyperedge $e \in E$ | ||
| has exactly $r$ vertices. The **chromatic number** $\chi(H)$ of a hypergraph is the minimum | ||
| number of colors needed to color its vertices so that no hyperedge is monochromatic. A finite | ||
| $r$-uniform hypergraph $F$ is **obligatory** (for the class of $r$-uniform hypergraphs with | ||
| chromatic number $> \aleph_0$) if every $r$-uniform hypergraph with chromatic number | ||
| $> \aleph_0$ contains a copy of $F$ as a sub-hypergraph. | ||
|
|
||
| **Known (graph case, $r = 2$, Erdős–Galvin–Hajnal [EGH75]):** For graphs (2-uniform | ||
| hypergraphs), the problem is completely solved: | ||
| - A graph of chromatic number $\geq \aleph_1$ must contain all finite bipartite graphs. | ||
| - No fixed odd cycle is obligatory: for every odd $k$, there exists a graph with chromatic | ||
| number $\aleph_1$ that contains no cycle of length $k$. | ||
|
|
||
| The 3-uniform case remains **open**. | ||
|
|
||
| **Formalization notes:** We represent a 3-uniform hypergraph on vertex type `V` as a pair | ||
| `(edges, uniform)` where `edges : Set (Finset V)` and every edge has cardinality 3. A proper | ||
| coloring sends vertices to colors such that no hyperedge is monochromatic. The chromatic | ||
| cardinal is the infimum of cardinalities of color types admitting a proper coloring. A finite | ||
| hypergraph `F` *appears* in `H` if there is an injective vertex map carrying edges of `F` | ||
| into edges of `H`. | ||
|
|
||
| We work at universe level `Type` (universe 0) throughout to avoid universe metavariable issues. |
There was a problem hiding this comment.
All this stuff here should go to where it belongs, for instance the Formalisation notes on 3-uniform hypergraphs closer to where the hypergraphs are defined
| /- ## Definitions for 3-uniform hypergraphs -/ | ||
|
|
||
| /-- A **3-uniform hypergraph** on vertex type `V` is a set of 3-element `Finset`s. | ||
| Each element of `edges` is a hyperedge, and `uniform` ensures each has exactly 3 vertices. -/ | ||
| structure ThreeUniformHypergraph (V : Type) where | ||
| /-- The set of hyperedges: each edge is a 3-element finset of vertices. -/ | ||
| edges : Set (Finset V) | ||
| /-- Every hyperedge has exactly 3 vertices. -/ | ||
| uniform : ∀ e ∈ edges, e.card = 3 | ||
|
|
||
| /-- A **proper coloring** of a 3-uniform hypergraph `H` by a color type `C` is a vertex | ||
| coloring such that no hyperedge is monochromatic (all three vertices receive the same color). -/ | ||
| def ThreeUniformHypergraph.IsProperColoring {V : Type} (H : ThreeUniformHypergraph V) | ||
| {C : Type} (f : V → C) : Prop := | ||
| ∀ e ∈ H.edges, ∃ u ∈ e, ∃ v ∈ e, f u ≠ f v | ||
|
|
||
| /-- The **chromatic cardinal** of a 3-uniform hypergraph `H` is the infimum of cardinalities | ||
| of color types admitting a proper coloring. We use `Cardinal.{0}` matching `Type`. -/ | ||
| noncomputable def ThreeUniformHypergraph.chromaticCardinal {V : Type} | ||
| (H : ThreeUniformHypergraph V) : Cardinal.{0} := | ||
| sInf {κ : Cardinal.{0} | ∃ (C : Type), #C = κ ∧ ∃ f : V → C, H.IsProperColoring f} | ||
|
|
||
| /-- A finite 3-uniform hypergraph `F` **appears** in `H` (as a sub-hypergraph) if there | ||
| exists an injective vertex map `φ : W → V` that sends every hyperedge of `F` to a hyperedge | ||
| of `H`. -/ | ||
| def ThreeUniformHypergraph.Appears {W V : Type} [DecidableEq V] | ||
| (F : ThreeUniformHypergraph W) (H : ThreeUniformHypergraph V) : Prop := | ||
| ∃ φ : W → V, Function.Injective φ ∧ | ||
| ∀ e ∈ F.edges, e.image φ ∈ H.edges | ||
|
|
||
| /-- A finite 3-uniform hypergraph `F` on a `Fintype` vertex type is **obligatory** if it | ||
| appears in every 3-uniform hypergraph (on a `Type`-valued vertex set) whose chromatic | ||
| cardinal exceeds `ℵ₀`. -/ | ||
| def IsObligatory {W : Type} [Fintype W] (F : ThreeUniformHypergraph W) : Prop := | ||
| ∀ (V : Type) [DecidableEq V] (H : ThreeUniformHypergraph V), | ||
| ℵ₀ < H.chromaticCardinal → F.Appears H |
There was a problem hiding this comment.
Those definitions should go in our FormalConjecturesForMathlib dir in an appropriate place. I'm surprised that Mathlib doesn't have hypergraphs already
| theorem erdos_593 : answer(sorry) ↔ | ||
| ∃ (P : ∀ (W : Type) [Fintype W], ThreeUniformHypergraph W → Prop), | ||
| ∀ (W : Type) [Fintype W] (F : ThreeUniformHypergraph W), | ||
| IsObligatory F ↔ P W F := by | ||
| sorry |
There was a problem hiding this comment.
AS stated this is trivially true:
theorem erdos_593 : answer(True) ↔
∃ (P : ∀ (W : Type) [Fintype W], ThreeUniformHypergraph W → Prop),
∀ (W : Type) [Fintype W] (F : ThreeUniformHypergraph W),
IsObligatory F ↔ P W F := by
exact ⟨fun _ => ⟨fun _ _ F => IsObligatory F, fun _ _ _ => Iff.rfl⟩, fun _ => trivial⟩
The original problem asks to characterize which finite 3-uniform hypergraphs are obligatory i.e., to give a structural description in terms of simpler properties (analogous to "bipartite" in the graph case). Bare existential quantification over predicates cannot capture this: in formal logic, every property trivially characterizes itself.
This is a known difficulty with formalizing "characterize X" problems. Potentially our answer(sorry) mechanism can help here?
There was a problem hiding this comment.
Good catch — applied your suggestion in 6565a7f (April 17, same day as the review). The trivial existential pattern is gone; the file now states two substantive answer(sorry) theorems capturing the open conjecture from each direction:
@[category research open, AMS 5]
theorem erdos_593 : answer(sorry) ↔
∀ (W : Type) [Fintype W] (F : ThreeUniformHypergraph W),
IsObligatory F → F.IsTwoColorable
@[category research open, AMS 5]
theorem erdos_593.variants.two_colorable_implies_obligatory : answer(sorry) ↔
∀ (W : Type) [Fintype W] (F : ThreeUniformHypergraph W),
F.IsTwoColorable → IsObligatory FThe conjecture is that IsObligatory F ↔ F.IsTwoColorable (analogous to the Erdős–Galvin–Hajnal characterisation of obligatory graphs as the bipartite ones); we file each direction as its own open question via answer(sorry) so neither is trivially provable. Hopefully this captures what you suggested with the answer(sorry) mechanism.
… fix trivial statement Per mo271's review feedback on PR google-deepmind#3774 (Problem 593, $500 prize): 1. Refactor: move ThreeUniformHypergraph, IsProperColoring, chromaticCardinal, Appears, IsTwoColorable, and IsObligatory out of the problem file into FormalConjecturesForMathlib/Combinatorics/Hypergraph/ThreeUniform.lean and register it in FormalConjecturesForMathlib.lean. 2. Fix the trivially-true main theorem: the old statement '∃ P, ∀ F, IsObligatory F ↔ P W F' was proved by the reviewer with a one-liner (P := IsObligatory). Replace with two non-trivial open conjectures based on the 2-colorability (Property B) characterization: - erdos_593: every obligatory finite 3-uniform hypergraph is 2-colorable - erdos_593.variants.two_colorable_implies_obligatory: the converse These mirror the graph case (EGH75: obligatory graphs = bipartite graphs). Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
… fix trivial statement Addresses review feedback by mo271: - Move ThreeUniformHypergraph + related definitions to FormalConjecturesForMathlib/Combinatorics/Hypergraph/ThreeUniform.lean - Import them from new location in 593.lean - Replace trivially-true main theorem with two substantive open conjectures: - erdos_593 (necessary condition): obligatory ⟹ 2-colorable - variants.two_colorable_implies_obligatory (converse, open) Assisted by Claude (Anthropic).
49b3486 to
6565a7f
Compare
Mirrors the Round C docstring pass from the private repo's phase1-infrastructure branch. Each Lean file now carries the canonical source statement and upstream URL inline so reviewers can verify formalization against the source without navigating away from the diff.
|
@mo271 — back here after a long pause. All three of your April 17 review comments were addressed in
PR is |
| **Prize:** \$500 (see erdosproblems.com/593). | ||
| -/ | ||
| @[category research open, AMS 5] | ||
| theorem erdos_593 : answer(sorry) ↔ |
There was a problem hiding this comment.
Does the source ask for a characterization of the finite 3-uniform hypergraphs that are obligatory, rather than just the necessary direction IsObligatory F → F.IsTwoColorable? I think it would be safer to either state the characterization predicate directly, with the unknown class behind answer(sorry), or make this an iff if 2-colorability is intended as the conjectured characterization.
| numbers as colors gives a proper coloring, so $\chi(H) \leq \#\mathbb{N} = \aleph_0$, | ||
| contradicting $\chi(H) > \aleph_0$. | ||
| -/ | ||
| @[category undergraduate, AMS 5] |
There was a problem hiding this comment.
nit: Looks like this file still uses @[category undergraduate] for a few auxiliary/supporting lemmas. This now no longer works on main - the new version of this is textbook.
…ul-Lez review) Per Paul-Lez review on PR google-deepmind#3774, line 94: the source asks for a characterization of the obligatory finite 3-uniform hypergraphs, not just the necessary direction `IsObligatory F → F.IsTwoColorable`. The natural conjectured characterization (analogous to Erdős–Galvin–Hajnal for graphs: bipartite ⇔ obligatory) is IsObligatory F ↔ F.IsTwoColorable. Rewrote the headline `erdos_593` as this iff, behind `answer(sorry)`. The two directions are kept as separate `answer(sorry)`-d open variants: - obligatory_implies_two_colorable (necessary direction; new, replaces the previous one-direction headline) - two_colorable_implies_obligatory (sufficient direction; pre-existing) Note: Paul-Lez's separate `category undergraduate` → `category textbook` rename nit is deferred to a follow-up — the rename would require merging upstream/main into this branch first to pull in the new CategoryLinter keyword (the branch-local linter still expects `undergraduate`). Builds cleanly: lake build FormalConjectures.ErdosProblems.«593»
|
@Paul-Lez — addressed your characterization comment in @[category research open, AMS 5]
theorem erdos_593 : answer(sorry) ↔
∀ (W : Type) [Fintype W] (F : ThreeUniformHypergraph W),
IsObligatory F ↔ F.IsTwoColorable := by
sorrywith both directions kept as separate Your Builds cleanly. |
…ok] + copyright 2026 Per Paul-Lez review on PR google-deepmind#3774. Mechanical nits applied on top of an upstream/main merge to pick up the new attribute infrastructure (google-deepmind#3900).
mo271
left a comment
There was a problem hiding this comment.
Thanks!
There are a few comments which more widely apply to other formalisations and a few specific to the math here. (It is now mostly good, i.e. I didn't find trivial disproofs and it looks like the formalisation faithfully represents the informal maths...)
| **Verbatim statement (Erdős #593, status O):** | ||
| > Characterize those finite 3-uniform hypergraphs which appear in every 3-uniform hypergraph of chromatic number $>\aleph_0$. | ||
|
|
||
| **Source:** https://www.erdosproblems.com/593 | ||
|
|
||
| **Notes:** OPEN - $500 |
There was a problem hiding this comment.
| **Verbatim statement (Erdős #593, status O):** | |
| > Characterize those finite 3-uniform hypergraphs which appear in every 3-uniform hypergraph of chromatic number $>\aleph_0$. | |
| **Source:** https://www.erdosproblems.com/593 | |
| **Notes:** OPEN - $500 |
| *Reference:* [erdosproblems.com/593](https://www.erdosproblems.com/593) | ||
|
|
||
| *References for known results:* |
There was a problem hiding this comment.
| *Reference:* [erdosproblems.com/593](https://www.erdosproblems.com/593) | |
| *References for known results:* | |
| *References:* | |
| - [erdosproblems.com/593](https://www.erdosproblems.com/593) |
(Seeing this for the third time in your Erdős pull request: we generally just list all references under References and don't distinguis between one main one and references for known results, please fix in all of the pending prs)
| **Problem (Erdős, $500)**: Characterize those finite 3-uniform hypergraphs which appear in | ||
| every 3-uniform hypergraph of chromatic number $> \aleph_0$. | ||
|
|
||
| **Background:** A hypergraph $H = (V, E)$ is **$r$-uniform** if every hyperedge $e \in E$ | ||
| has exactly $r$ vertices. The **chromatic number** $\chi(H)$ of a hypergraph is the minimum | ||
| number of colors needed to color its vertices so that no hyperedge is monochromatic. A finite | ||
| $r$-uniform hypergraph $F$ is **obligatory** (for the class of $r$-uniform hypergraphs with | ||
| chromatic number $> \aleph_0$) if every $r$-uniform hypergraph with chromatic number | ||
| $> \aleph_0$ contains a copy of $F$ as a sub-hypergraph. | ||
|
|
||
| **Known (graph case, $r = 2$, Erdős–Galvin–Hajnal [EGH75]):** For graphs (2-uniform | ||
| hypergraphs), the problem is completely solved: | ||
| - A graph of chromatic number $\geq \aleph_1$ must contain all finite bipartite graphs. | ||
| - No fixed odd cycle is obligatory: for every odd $k$, there exists a graph with chromatic | ||
| number $\aleph_1$ that contains no cycle of length $k$. | ||
|
|
||
| The 3-uniform case remains **open**. | ||
|
|
||
| **Formalization notes:** See `FormalConjecturesForMathlib.Combinatorics.Hypergraph.ThreeUniform` | ||
| for the definitions of `ThreeUniformHypergraph`, `IsProperColoring`, `chromaticCardinal`, | ||
| `Appears`, and `IsObligatory` used throughout this file. | ||
|
|
||
| Note: Mathlib does not yet have a general hypergraph API; the infrastructure in | ||
| `FormalConjecturesForMathlib.Combinatorics.Hypergraph.ThreeUniform` fills that gap. |
There was a problem hiding this comment.
| **Problem (Erdős, $500)**: Characterize those finite 3-uniform hypergraphs which appear in | |
| every 3-uniform hypergraph of chromatic number $> \aleph_0$. | |
| **Background:** A hypergraph $H = (V, E)$ is **$r$-uniform** if every hyperedge $e \in E$ | |
| has exactly $r$ vertices. The **chromatic number** $\chi(H)$ of a hypergraph is the minimum | |
| number of colors needed to color its vertices so that no hyperedge is monochromatic. A finite | |
| $r$-uniform hypergraph $F$ is **obligatory** (for the class of $r$-uniform hypergraphs with | |
| chromatic number $> \aleph_0$) if every $r$-uniform hypergraph with chromatic number | |
| $> \aleph_0$ contains a copy of $F$ as a sub-hypergraph. | |
| **Known (graph case, $r = 2$, Erdős–Galvin–Hajnal [EGH75]):** For graphs (2-uniform | |
| hypergraphs), the problem is completely solved: | |
| - A graph of chromatic number $\geq \aleph_1$ must contain all finite bipartite graphs. | |
| - No fixed odd cycle is obligatory: for every odd $k$, there exists a graph with chromatic | |
| number $\aleph_1$ that contains no cycle of length $k$. | |
| The 3-uniform case remains **open**. | |
| **Formalization notes:** See `FormalConjecturesForMathlib.Combinatorics.Hypergraph.ThreeUniform` | |
| for the definitions of `ThreeUniformHypergraph`, `IsProperColoring`, `chromaticCardinal`, | |
| `Appears`, and `IsObligatory` used throughout this file. | |
| Note: Mathlib does not yet have a general hypergraph API; the infrastructure in | |
| `FormalConjecturesForMathlib.Combinatorics.Hypergraph.ThreeUniform` fills that gap. |
Not need to repeat the statement etc in the module docstring: generally the problem statement and variants for the problem should basically only be written down once, i.e. we generally want to have exactly one verbatim copy of what is written on erdosproblems.com spread across the entire file -- statements of variants should go to the lean statement of those variants and not in the module docstring.
Please fix in all pending prs.
|
|
||
| **Status:** OPEN. | ||
|
|
||
| **Prize:** \$500 (see erdosproblems.com/593). |
There was a problem hiding this comment.
There is never a need to mention the **Status**: those are captured in the category tag (research open) and should not be duplicated. Also the "price" shouldn't be mentioned more than once.
| **Status:** OPEN. | |
| **Prize:** \$500 (see erdosproblems.com/593). |
Please also fix in other pending prs.
|
|
||
| **Status:** OPEN. |
There was a problem hiding this comment.
| **Status:** OPEN. |
| **Status:** OPEN. Together with `erdos_593.variants.obligatory_implies_two_colorable`, | ||
| this implies `erdos_593`. |
There was a problem hiding this comment.
| **Status:** OPEN. Together with `erdos_593.variants.obligatory_implies_two_colorable`, | |
| this implies `erdos_593`. | |
| Together with `erdos_593.variants.obligatory_implies_two_colorable`, | |
| this implies `erdos_593`. |
There was a problem hiding this comment.
potentially this implication could also be added as formal statement?
|
|
||
| **Status:** SOLVED [EGH75]. |
There was a problem hiding this comment.
| **Status:** SOLVED [EGH75]. |
|
|
||
| **Status:** SOLVED [EGH75]. |
There was a problem hiding this comment.
| **Status:** SOLVED [EGH75]. |
| ∀ (V : Type*) (G : SimpleGraph V), | ||
| ℵ₀ < G.chromaticCardinal → | ||
| ∀ (W : Type*) [Fintype W] (F : SimpleGraph W), F.IsBipartite → | ||
| Nonempty (F →g G) := by |
There was a problem hiding this comment.
graph_case_bipartite_obligatory uses Nonempty (F →g G) (existence of a graph homomorphism) to express "F appears in G", but the hypergraph Appears definition requires an injective vertex map. These are different notions.
Consider using Nonempty (F ↪g G) (graph embedding) or at least document why homomorphism suffices if it does.
There was a problem hiding this comment.
Done in 7170485. graph_case_bipartite_obligatory now uses Nonempty (F ↪g G) (graph embedding), aligned with the injective vertex map of the hypergraph Appears definition; the docstring caveat is removed. Build green.
- Collapse the two reference blocks into a single *References:* block in the module docstring; drop the duplicated verbatim statement, background paragraph, and formalization note. - Trim the erdos_593 theorem docstring to the verbatim Erdős statement plus a single sentence about the conjectural characterization. - Drop the **Status:** / **Prize:** mentions on erdos_593 and the three solved/open variants (already captured by @[category]). - Add erdos_593.variants.implications_combine: the elementary Iff derivation showing that the two open implications jointly imply the characterization in erdos_593 (mo271 line-123 follow-up). Follow-up flagged in mo271 line-147 review thread: graph_case_bipartite_obligatory uses Nonempty (F →g G) (graph homomorphism) but the hypergraph Appears definition uses an injective vertex map. The two notions differ; switching to Nonempty (F ↪g G) (graph embedding) is left as a follow-up. A docstring note records the discrepancy so it isn't lost.
|
Applied mo271's docstring-convention review pass in
Follow-up flagged in the line-147 thread: Build: |
mo271
left a comment
There was a problem hiding this comment.
Regarding:
Note: this statement uses Nonempty (F →g G) (graph homomorphism), which is weaker than the
injective vertex map used in the hypergraph Appears definition. A future revision may switch
to Nonempty (F ↪g G) (graph embedding) to align with the hypergraph notion.
Let's do this now, rather than in a follow-up
| sorry | ||
|
|
||
| /-- | ||
| **Erdős Problem 593 — Necessary direction (open)**: Every obligatory finite 3-uniform |
There was a problem hiding this comment.
| **Erdős Problem 593 — Necessary direction (open)**: Every obligatory finite 3-uniform | |
| **Erdős Problem 593 — Necessary direction**: Every obligatory finite 3-uniform |
Let's remove the "open" from docstrings altogether -- those are recorded in the category tag and will just be a pain to keep in sync when problems get solved
There was a problem hiding this comment.
Applied the suggestion plus the same rule across all docstrings in the file (necessary/sufficient direction headlines and the two graph-case variants no longer carry (open)/(solved) suffixes — those are captured by the @[category] tag). Commit: 7170485.
…edding (mo271 review); drop open/solved from docstrings
|
Addressed mo271's two follow-ups in
Build: |
fixes #813
Problem
Erdős Problem 593: https://www.erdosproblems.com/593 ($500 prize)
Contents
erdos_593Assisted by Claude (Anthropic).