Add Caccetta–Häggkvist conjecture (directed cycles vs minimum out-degree)#4231
Open
henrykmichalewski wants to merge 2 commits into
Open
Add Caccetta–Häggkvist conjecture (directed cycles vs minimum out-degree)#4231henrykmichalewski wants to merge 2 commits into
henrykmichalewski wants to merge 2 commits into
Conversation
|
👋 This is an automated welcome message. 🤖 A few friendly reminders while the review gets started:
Thanks again for helping improve Formal Conjectures. |
mo271
reviewed
Jun 20, 2026
mo271
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, lgtm, except for the hallucinated link and one of the defintions, see comments...
| e.g. $c = 3 - \sqrt{7} \approx 0.3542$ (Shen). | ||
|
|
||
| *References:* | ||
| * [Wikipedia](https://en.wikipedia.org/wiki/Caccetta%E2%80%93H%C3%A4ggkvist_conjecture) |
Collaborator
There was a problem hiding this comment.
this link is hallucinated. Let's instead use https://www.openproblemgarden.org/op/caccetta_haggkvist_conjecture and move this file to a new directory "OpenProblemGarden"!
Comment on lines
+47
to
+52
| /-- | ||
| The out-degree of a vertex `v` in a digraph `G` on a finite vertex type: the number of | ||
| vertices `w` with an arc `v → w`. | ||
| -/ | ||
| def outDegree [Fintype V] (G : Digraph V) [DecidableRel G.Adj] (v : V) : ℕ := | ||
| (Finset.univ.filter fun w => G.Adj v w).card |
Collaborator
There was a problem hiding this comment.
This should be either inlined (my preference) or moved to FormalConjecturesForMathlib.
Surprising how much stuff is missing for digraphs...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the Caccetta–Häggkvist conjecture (1978) as
FormalConjectures/Wikipedia/CaccettaHaggkvistConjecture.lean.Statement. Every simple digraph on$n \ge 1$ vertices in which every vertex has out-degree at least $n/r$ contains a directed cycle of length at most $r$ . The degree hypothesis is stated in the integer form $n \le r \cdot \operatorname{outdeg}(v)$ .
Encoding.
Digraph V; "simple" is captured by anIrreflexive G.Adjhypothesis (loops forbidden, digons allowed, matching the standard statement).HasDirectedCycleOfLength, defined locally with a docstring since Mathlib has no digraph cycle API).outDegree) as a filtered-univ cardinality, since Mathlib'sDigraphhas no degree API.1 ≤ nhypothesis excludes the empty digraph, for which the degree hypothesis is vacuous but the conclusion fails.Contents.
caccetta_haggkvist— the conjecture,@[category research open, AMS 5](open since 1978).variants.caccetta_haggkvist_triangle— the famous@[category test]sanity checks, both closed bydecidewithout sorry: the complete loopless digraph on 3 vertices has a directed 3-cycle, and each of its vertices has out-degree 2.Sorry count: 2 (the two open conjecture statements only).
🤖 Generated with Claude Code