Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions FormalConjectures/ErdosProblems/1014.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/-
Copyright 2026 The Formal Conjectures Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/

import FormalConjectures.Util.ProblemImports

/-!
# Erdős Problem 1014

Erdős conjectured that for fixed $k \geq 3$, the ratio of consecutive Ramsey numbers
$R(k, l+1) / R(k, l)$ tends to $1$ as $l \to \infty$.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Erdős conjectured that for fixed $k \geq 3$, the ratio of consecutive Ramsey numbers
$R(k, l+1) / R(k, l)$ tends to $1$ as $l \to \infty$.

No need to repeat the docstring here: we have it already at the main theorem!

See also problems [544] and [1030].

*Reference:* [erdosproblems.com/1014](https://www.erdosproblems.com/1014)

[Er71] Erdős, P., _Topics in combinatorial analysis_, pp. 95-99, 1971.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The article seems to only be 19 pages long. Please check all references!

-/

open SimpleGraph

namespace Erdos1014

/--
Erdős Problem 1014 [Er71, p.99]:

For fixed $k \geq 3$,
$$\lim_{l \to \infty} R(k, l+1) / R(k, l) = 1,$$
where $R(k, l)$ is the Ramsey number.

Formulated as: for every $\varepsilon > 0$, there exists $L_0$ such that for all $l \geq L_0$,
$|R(k, l+1) / R(k, l) - 1| \leq \varepsilon$.
-/
@[category research open, AMS 5]
theorem erdos_1014 (k : ℕ) (hk : k ≥ 3) :
Comment on lines +37 to +45
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you state the k = 3 separately since it already is open?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And also perhaps a statement of category undergraduate for the case k=2?

/--
The k=2 case: R(2, l+1)/R(2, l) → 1, since R(2, l) = l for all l.

This follows from the fact that for any graph G on n vertices, either G has an edge
(a 2-clique) or G = ⊥ and Gᶜ = ⊤ contains an l-clique (when l ≤ n).
-/
@[category undergraduate, AMS 5]
theorem erdos_1014_k_eq_2 :
    Tendsto (fun l : ℕ =>
      (graphRamseyNumber 2 (l + 1) : ℝ) / (graphRamseyNumber 2 l : ℝ))
      atTop (nhds 1) := by
  simp_rw [graphRamseyNumber_two]
  suffices h : Tendsto (fun l : ℕ => (1 : ℝ) / (l : ℝ)) atTop (nhds 0) by
    have := tendsto_const_nhds (x := (1 : ℝ)).add h
    simp only [add_zero] at this
    apply this.congr'
    filter_upwards [Ici_mem_atTop 1] with l (hl : 1 ≤ l)
    have : (l : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr (by omega)
    push_cast; field_simp
  exact (tendsto_inv_atTop_zero (𝕜 := ℝ)).comp tendsto_natCast_atTop_atTop
    |>.congr fun n => (one_div (n : ℝ)).symm

This works together with graphRamseyNumber_two suggested below in Ramsey.lean

∀ ε : ℝ, ε > 0 →
∃ L₀ : ℕ, ∀ l : ℕ, l ≥ L₀ →
|(graphRamseyNumber k (l + 1) : ℝ) / (graphRamseyNumber k l : ℝ) - 1| ≤ ε := by
Comment thread
YaelDillies marked this conversation as resolved.
Outdated
sorry

end Erdos1014
62 changes: 62 additions & 0 deletions FormalConjectures/ErdosProblems/1029.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/-
Copyright 2026 The Formal Conjectures Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/

import FormalConjectures.Util.ProblemImports

/-!
# Erdős Problem 1029

*Reference:* [erdosproblems.com/1029](https://www.erdosproblems.com/1029)

If $R(k)$ is the diagonal Ramsey number for $K_k$, the minimal $n$ such that every
2-colouring of the edges of $K_n$ contains a monochromatic copy of $K_k$, then
$$
R(k) / (k \cdot 2^{k/2}) \to \infty.
$$

Erdős and Szekeres [ErSz35] proved $k \cdot 2^{k/2} \ll R(k) \leq \binom{2k-1}{k-1}$.
The probabilistic method gives $R(k) \geq (1+o(1)) \cdot \frac{1}{\sqrt{2}\, e} \cdot k \cdot 2^{k/2}$,
improved by Spencer [Sp75] to $R(k) \geq (1+o(1)) \cdot \frac{\sqrt{2}}{e} \cdot k \cdot 2^{k/2}$.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If $R(k)$ is the diagonal Ramsey number for $K_k$, the minimal $n$ such that every
2-colouring of the edges of $K_n$ contains a monochromatic copy of $K_k$, then
$$
R(k) / (k \cdot 2^{k/2}) \to \infty.
$$
Erdős and Szekeres [ErSz35] proved $k \cdot 2^{k/2} \ll R(k) \leq \binom{2k-1}{k-1}$.
The probabilistic method gives $R(k) \geq (1+o(1)) \cdot \frac{1}{\sqrt{2}\, e} \cdot k \cdot 2^{k/2}$,
improved by Spencer [Sp75] to $R(k) \geq (1+o(1)) \cdot \frac{\sqrt{2}}{e} \cdot k \cdot 2^{k/2}$.


[ErSz35] Erdős, P. and Szekeres, G., *A combinatorial problem in geometry*, Compositio Math. 2 (1935), 463–470.

[Sp75] Spencer, J., *Ramsey's theorem — a new lower bound*, J. Combin. Theory Ser. A 18 (1975), 108–115.

[Er93] Erdős, P., *On some of my favourite theorems* (1993).
-/

open Finset SimpleGraph

namespace Erdos1029

/--
Erdős Problem 1029 [Er93, p.337]:

$R(k) / (k \cdot 2^{k/2}) \to \infty$ as $k \to \infty$.

Formulated as: for every $C > 0$, there exists $K_0$ such that for all $k \geq K_0$,
$R(k) \geq C \cdot k \cdot 2^{k/2}$.

Here $R(k)$ is the diagonal Ramsey number, expressed as `diagRamseyNumber k`.
-/
@[category research open, AMS 5]
theorem erdos_1029 :
∀ C : ℝ, C > 0 →
∃ K₀ : ℕ, ∀ k : ℕ, k ≥ K₀ →
(diagRamseyNumber k : ℝ) ≥ C * (k : ℝ) * (2 : ℝ) ^ ((k : ℝ) / 2) := by
Comment thread
YaelDillies marked this conversation as resolved.
Outdated
sorry

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a -- TODO for the missing variants. Here and in the other problems if not all variants from the additional text are provided!

end Erdos1029
82 changes: 82 additions & 0 deletions FormalConjectures/ErdosProblems/1030.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/-
Copyright 2026 The Formal Conjectures Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/

import FormalConjectures.Util.ProblemImports

/-!
# Erdős Problem 1030

*Reference:* [erdosproblems.com/1030](https://www.erdosproblems.com/1030)

If $R(k,l)$ is the Ramsey number then prove the existence of some $c > 0$ such that
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only Ramsey number?? 😁

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree this is odd phrasing but is coming directly from the source website: https://www.erdosproblems.com/1030

I've submitted a comment there on the problem to suggest an edit:

The way this problem is phrased could probably be improved ("the Ramsey number"?) and it appears the limit needs defining (is that k -> infinity?). I don't have access to the source but am working on contributing a formalization at #3588 and this was raised as an issue :)

$$
\lim_{k \to \infty} \frac{R(k+1, k)}{R(k, k)} > 1 + c.
$$

A problem of Erdős and Sós, who could not even prove whether
$R(k+1,k) - R(k,k) > k^c$ for any $c > 1$.

Burr, Erdős, Faudree, and Schelp [BEFS89] proved that
$R(k+1,k) - R(k,k) \geq 2k - 5$.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If $R(k,l)$ is the Ramsey number then prove the existence of some $c > 0$ such that
$$
\lim_{k \to \infty} \frac{R(k+1, k)}{R(k, k)} > 1 + c.
$$
A problem of Erdős and Sós, who could not even prove whether
$R(k+1,k) - R(k,k) > k^c$ for any $c > 1$.
Burr, Erdős, Faudree, and Schelp [BEFS89] proved that
$R(k+1,k) - R(k,k) \geq 2k - 5$.


See also problems [544](https://www.erdosproblems.com/544) and
[1014](https://www.erdosproblems.com/1014).

OEIS: [A000791](https://oeis.org/A000791), [A059442](https://oeis.org/A059442).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the relevance of the first one?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.erdosproblems.com/1030 lists these two sequences as relevant which is why it's listed here.

It appears that 544 is marked as relevant since it describes R(3,k), and that OEIS sequence is listed as the relevant one.


[Er93] Erdős, P., _On some of my favourite theorems_. Combinatorics, Paul Erdős is eighty,
Vol. 2 (Keszthely, 1993), 97–132, p. 339.

[BEFS89] Burr, S.A., Erdős, P., Faudree, R.J., and Schelp, R.H.,
_On the difference between consecutive Ramsey numbers_. Utilitas Math. (1989), 115–118.
-/

open SimpleGraph

namespace Erdos1030

/--
Erdős Problem 1030 [Er93, p. 339]:

There exists $c > 0$ such that
$$
\lim_{k \to \infty} \frac{R(k+1, k)}{R(k, k)} > 1 + c.
$$

Formulated as: there exist $c > 0$ and $K_0$ such that for all $k \geq K_0$,
$R(k+1, k) / R(k, k) \geq 1 + c$.
Comment on lines +47 to +48
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is not quite the same thing as on the website, is it?
It might be that it doesn't converge to a limit but still is eventually larger than 1 + c?
Perhaps add both versions?

-/
@[category research open, AMS 5]
theorem erdos_1030 :
∃ c : ℝ, c > 0 ∧
∃ K₀ : ℕ, ∀ k : ℕ, k ≥ K₀ →
(graphRamseyNumber (k + 1) k : ℝ) / (graphRamseyNumber k k : ℝ) ≥ 1 + c := by
sorry

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's also add "It is trivial that $R(k+1,k)-R(k,k)\geq k-2$." Perhaps eve with proof? Fine to have it without proof as well

/--
Weaker variant of Erdős Problem 1030 [Er93, p. 339]:

There exists $c > 1$ such that $R(k+1,k) - R(k,k) > k^c$ for all sufficiently large $k$.

Erdős and Sós could not even prove this weaker statement.
-/
@[category research open, AMS 5]
theorem erdos_1030_weak :
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
theorem erdos_1030_weak :
theorem erdos_1030.variants.weak :

∃ c : ℝ, c > 1 ∧ ∃ K₀ : ℕ, ∀ k : ℕ, k ≥ K₀ →
(graphRamseyNumber (k + 1) k : ℝ) - (graphRamseyNumber k k : ℝ) > (k : ℝ) ^ c := by
sorry

end Erdos1030
154 changes: 154 additions & 0 deletions FormalConjectures/ErdosProblems/112.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
/-
Copyright 2026 The Formal Conjectures Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/

import FormalConjectures.Util.ProblemImports

/-!
# Erdős Problem 112

*Reference:* [erdosproblems.com/112](https://www.erdosproblems.com/112)

A problem of Erdős and Rado on directed Ramsey numbers $k(n,m)$: the minimal $k$ such that
any directed graph on $k$ vertices must contain either an independent set of size $n$ or a
transitive tournament of size $m$. Determine $k(n,m)$.

[ErRa67] Erdős, P. and Rado, R., _Partition relations and transitivity domains of binary
relations_, J. London Math. Soc. (1967), 624–633.

[LaMi97] Larson, J. and Mitchell, W., _On a problem of Erdős and Rado_, Ann. Comb. (1997),
245–252.
-/

namespace Erdos112

/-- An oriented graph on vertex type $V$: an irreflexive, antisymmetric binary relation
representing directed edges ($\mathrm{adj}(u, v)$ means there is a directed edge from $u$ to $v$).
Each pair of distinct vertices has at most one directed edge between them. -/
structure Digraph (V : Type*) where
adj : V → V → Prop
loopless : ∀ v, ¬ adj v v
antisymm : ∀ u v, adj u v → ¬ adj v u
Comment on lines +32 to +38
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't redefine Digraph, but use what is in mathlib about this!


/-- An independent set in a directed graph: a set $S$ of vertices with no directed
edges between any two of its members (in either direction). -/
def Digraph.IsIndepSet {V : Type*} (G : Digraph V) (S : Finset V) : Prop :=
∀ u ∈ S, ∀ v ∈ S, ¬ G.adj u v

/-- A transitive tournament on vertex set $S$ in directed graph $G$: there is a bijection
$f : \mathrm{Fin}(|S|) \to S$ such that $G.\mathrm{adj}(f(i), f(j))$ holds
if and only if $i < j$. This encodes a total ordering of $S$ compatible with the
edge relation. -/
def Digraph.IsTransTournament {V : Type*} (G : Digraph V) (S : Finset V) : Prop :=
∃ f : Fin S.card → {x : V // x ∈ S}, Function.Bijective f ∧
∀ i j : Fin S.card, G.adj (f i : V) (f j : V) ↔ i < j

/-- The directed Ramsey number $k(n,m)$: the minimal $k$ such that every directed graph
on $k$ vertices contains either an independent set of size $n$ or a transitive
tournament of size $m$. -/
noncomputable def dirRamseyNum (n m : ℕ) : ℕ :=
sInf {k : ℕ | ∀ (V : Type) [Fintype V], Fintype.card V = k →
∀ G : Digraph V,
(∃ S : Finset V, S.card = n ∧ G.IsIndepSet S) ∨
(∃ S : Finset V, S.card = m ∧ G.IsTransTournament S)}
Comment on lines +40 to +60
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should move to ForMathlib and should be more aligned with the other Ramsey defintion (and standard Digraph from Mathlib.


/--
Erdős Problem 112: Determine the directed Ramsey number $k(n,m)$.
The exact value is still open.
-/
@[category research open, AMS 5]
theorem erdos_112 :
∀ n m : ℕ, 2 ≤ n → 2 ≤ m →
dirRamseyNum n m = answer(sorry) := by
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
dirRamseyNum n m = answer(sorry) := by
dirRamseyNum n m = (answer(sorry) : ℕ → ℕ → ℕ) n m := by

Otherwise the answer sorry value will just be a global number independent of n and m!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add the smallest open cases here!

sorry

/--
Erdős–Rado upper bound [ErRa67]:
$$k(n,m) \leq \frac{2^{m-1} (n-1)^m + n - 2}{2n - 3}.$$
-/
@[category research solved, AMS 5]
theorem erdos_112.variants.erdos_rado_upper_bound :
∀ n m : ℕ, 2 ≤ n → 2 ≤ m →
dirRamseyNum n m ≤ (2 ^ (m - 1) * (n - 1) ^ m + n - 2) / (2 * n - 3) := by
sorry

/--
Larson–Mitchell bound [LaMi97]: $k(n, 3) \leq n^2$.
-/
@[category research solved, AMS 5]
theorem erdos_112.variants.larson_mitchell :
∀ n : ℕ, 2 ≤ n →
dirRamseyNum n 3 ≤ n ^ 2 := by
sorry

/-- The classical 2-color graph Ramsey number $R(n, m)$: the minimal $k$ such that every
2-coloring of the edges of $K_k$ contains either a red clique of size $n$ or a blue clique
of size $m$. -/
noncomputable def graphRamseyNum (n m : ℕ) : ℕ :=
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The definition ∀ (c : Fin k → Fin k → Bool) quantifies over all functions c, including non-symmetric ones (where c u v ≠ c v u). But edge colorings of complete graphs should be symmetric?
So that meas it is potentially smaller?

sInf {k : ℕ | ∀ (c : Fin k → Fin k → Bool),
(∃ S : Finset (Fin k), S.card = n ∧ ∀ u ∈ S, ∀ v ∈ S, u ≠ v → c u v = true) ∨
(∃ S : Finset (Fin k), S.card = m ∧ ∀ u ∈ S, ∀ v ∈ S, u ≠ v → c u v = false)}

/-- The 3-color graph Ramsey number $R(a, b, c)$: the minimal $k$ such that every
3-coloring of the edges of $K_k$ contains a monochromatic clique of size $a$, $b$, or $c$
in the respective color. -/
noncomputable def graphRamseyNum3 (a b c : ℕ) : ℕ :=
sInf {k : ℕ | ∀ (col : Fin k → Fin k → Fin 3),
(∃ S : Finset (Fin k), S.card = a ∧ ∀ u ∈ S, ∀ v ∈ S, u ≠ v → col u v = 0) ∨
(∃ S : Finset (Fin k), S.card = b ∧ ∀ u ∈ S, ∀ v ∈ S, u ≠ v → col u v = 1) ∨
(∃ S : Finset (Fin k), S.card = c ∧ ∀ u ∈ S, ∀ v ∈ S, u ≠ v → col u v = 2)}

/--
Ramsey number sandwich (Hunter): $R(n,m) \leq k(n,m) \leq R(n,m,m)$, where $R$ is the
classical graph Ramsey number and $R(n,m,m)$ is the 3-color Ramsey number. The lower bound
holds because any undirected graph can be oriented, and the upper bound holds because the
three options for each pair of vertices (no edge, forward edge, backward edge) correspond
to a 3-coloring.
-/
@[category research solved, AMS 5]
theorem erdos_112.variants.ramsey_sandwich :
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is something wrong here: AlphaProof could disprove the statment!

@[category research solved, AMS 5]
theorem erdos_112.variants.ramsey_sandwich :
    ¬ (∀ n m : ℕ, 2 ≤ n → 2 ≤ m →
      graphRamseyNum n m ≤ dirRamseyNum n m ∧
      dirRamseyNum n m ≤ graphRamseyNum3 n m m) := by
  -- AlphaProof found a disproof
  push_neg
  delta graphRamseyNum3 graphRamseyNum dirRamseyNum
  use 2,2
  rw[{s |_}.eq_empty_of_subset_empty]
  · use refl _,refl _, fun and=>?_
    rw[{s |_}.eq_empty_of_subset_empty]
    · rewrite[Nat.sInf_empty,Nat.lt_iff_add_one_le,le_csInf_iff]
      · exact (fun a s=>a.pos_of_ne_zero (by cases. with cases(s) PEmpty rfl (by repeat use default) with use (by valid:).elim (·.eq_empty_of_isEmpty▸nofun)))
      · bound
      use 3,fun _ _ _ a=>?_
      rcases a
      delta Erdos112.Digraph.IsTransTournament Erdos112.Digraph.IsIndepSet
      by_cases h:∃ R M,R≠M∧‹∀ R M,Prop› R M
      · simp_rw [ Fintype.bijective_iff_injective_and_card]
        let⟨x,y,z,w⟩ :=h
        classical use Or.inr ⟨ _, Finset.card_pair z, (if ·.1=0 then⟨x,by bound⟩else⟨y,by bound⟩),?_⟩
        simp_all[Function.Injective,z.symm,Fin.forall_iff]
        use fun and Y A B=>match A,and with|0,0|0,1|1,0|1,1=>by grind,fun A B R L=>by match A,R with|0,0|0,1|1,0|1,1=>grind
      · exact (.inl (( Finset.exists_subset_card_eq (le_of_lt (Eq.ge (by assumption)))).imp fun and=>.symm ∘.imp_left fun and _ _ _ _ A=>h ⟨ _, _, fun and=>by simp_all only, A⟩))
    · use fun and f=>match f (if.<. then(0)else 1) with|.inl ⟨x,A, B⟩|.inr<|.inl ⟨x,A, B⟩|.inr<|.inr ⟨x,A, B⟩=>(Finset.one_lt_card.1 A.ge).elim (by grind)
  · use fun and f=>by cases f (.<.) with use (by valid:).elim fun and x =>( Finset.one_lt_card.1 x.1.ge).elim fun and⟨i,A, B, M⟩=>absurd (x.2 and i A B) (absurd (x.2 A B and i) ∘by grind)

The bug could be about the missing symmetry condition flagged above?!

∀ n m : ℕ, 2 ≤ n → 2 ≤ m →
graphRamseyNum n m ≤ dirRamseyNum n m ∧
dirRamseyNum n m ≤ graphRamseyNum3 n m m := by
sorry

/-- A directed path on vertex set $S$ in directed graph $G$: there is a bijection
$f : \mathrm{Fin}(|S|) \to S$ such that $G.\mathrm{adj}(f(i), f(i+1))$ holds for all
consecutive indices. Unlike a transitive tournament, only consecutive vertices need to
be connected. -/
def Digraph.IsDirectedPath {V : Type*} (G : Digraph V) (S : Finset V) : Prop :=
∃ f : Fin S.card → {x : V // x ∈ S}, Function.Bijective f ∧
∀ i : Fin S.card, ∀ h : (i : ℕ) + 1 < S.card,
G.adj (f i : V) (f ⟨i + 1, h⟩ : V)

/-- The directed path Ramsey number: the minimal $k$ such that every directed graph on $k$
vertices contains either an independent set of size $n$ or a directed path of size $m$. -/
noncomputable def dirPathRamseyNum (n m : ℕ) : ℕ :=
sInf {k : ℕ | ∀ (V : Type) [Fintype V], Fintype.card V = k →
∀ G : Digraph V,
(∃ S : Finset V, S.card = n ∧ G.IsIndepSet S) ∨
(∃ S : Finset V, S.card = m ∧ G.IsDirectedPath S)}

/--
Hunter–Steiner result: replacing "transitive tournament" with "directed path" in the
definition of $k(n,m)$ yields the exact answer $k(n,m) = (n-1)(m-1) + 1$.
-/
@[category research solved, AMS 5]
theorem erdos_112.variants.hunter_steiner :
∀ n m : ℕ, 2 ≤ n → 2 ≤ m →
dirPathRamseyNum n m = (n - 1) * (m - 1) + 1 := by
sorry

end Erdos112
Loading
Loading