/-
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 FormalConjecturesUtilWritten on the Wall II - Conjecture 59
References:
namespace WrittenOnTheWallII.GraphConjecture59open SimpleGraphvariable {α : Type*} [Fintype α] [DecidableEq α] [Nontrivial α]WOWII Conjecture 59
For a simple connected graph $G$, the size $f(G)$ of a largest induced forest satisfies $f(G) \ge \lceil \sqrt{\mathrm{residue}(G) \cdot b(G)} \rceil$, where $\mathrm{residue}(G)$ is the Havel-Hakimi residue (the number of zeros remaining after applying the Havel-Hakimi algorithm to the degree sequence until termination) and $b(G)$ is the size of a largest induced bipartite subgraph.
See: Favaron, Mahéo, Saclé (1991) for the residue; DeLaVina's Graffiti.pc for the conjecture.
This conjecture is false. There is a connected counterexample on 123 vertices
with residue G = 101, b G = 122, and G.largestInducedForestSize = 111.
Indeed, 101 * 122 = 12322 = 111 ^ 2 + 1, so the conjectured lower bound is 112.
@[category research solved, AMS 5, formal_proof using lean4 at "https://github.com/QDKStorm/wowii59-counterexample/blob/main/Counterexample59.lean"]
theorem conjecture59 : answer(False) ↔
∀ (α : Type) [Fintype α] [DecidableEq α] [Nontrivial α]
(G : SimpleGraph α) [DecidableRel G.Adj] (_ : G.Connected),
⌈Real.sqrt ((residue G : ℝ) * b G)⌉ ≤ (G.largestInducedForestSize : ℝ) := ⊢ False ↔
∀ (α : Type) [inst : Fintype α] [DecidableEq α] [Nontrivial α] (G : SimpleGraph α) [inst_3 : DecidableRel G.Adj],
G.Connected → ↑⌈√(↑G.residue * G.b)⌉ ≤ ↑G.largestInducedForestSize
All goals completed! 🐙-- Sanity checks
The largestInducedForestSize is nonneg.
@[category test, AMS 5]
example (G : SimpleGraph (Fin 3)) : 0 ≤ G.largestInducedForestSize := Nat.zero_le _The residue of $K_2$ equals $1$: degree sequence is $[1, 1]$; one Havel-Hakimi step gives $[0]$, leaving a single zero.
@[category test, AMS 5]
example : residue (⊤ : SimpleGraph (Fin 2)) = 1 := α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αinst✝:Nontrivial α⊢ ⊤.residue = 1
α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αinst✝:Nontrivial α⊢ residueAux ((Multiset.map (fun v ↦ ⊤.degree v) Finset.univ.val).sort fun x1 x2 ↦ x1 ≥ x2) = 1; All goals completed! 🐙end WrittenOnTheWallII.GraphConjecture59