/- Copyright 2025 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. -/ module public import FormalConjecturesUtil

Written on the Wall II - Conjecture 24

Verbatim statement (WOWII #24, status F):

If G is a simple connected graph, then b(G) ≥ λ(G) + CEIL[minimum of dist_even(v)/3]

Source: http://cms.uhd.edu/faculty/delavinae/research/wowII/all.html#conj24

The WOWII page records this conjecture as disproved (status F).

Reference: E. DeLaVina, Written on the Wall II, Conjectures of Graffiti.pc

@[expose] public sectionnamespace WrittenOnTheWallII.GraphConjecture24open SimpleGraph

WOWII Conjecture 24 (status F, disproved):

For every finite simple connected graph G, b(G) ≥ λ(G) + ⌈(min_v dist_even(v)) / 3⌉ where b(G) is the size of a largest induced bipartite subgraph, λ(G) := max_v l(v) is the maximum over all vertices of the independence number of the open neighbourhood of v, and dist_even(v) is the number of vertices at even distance from v.

@[category research solved, AMS 5] theorem conjecture24 : ¬ ∀ {α : Type*} [Fintype α] [DecidableEq α] [Nontrivial α], ∀ (G : SimpleGraph α) (_ : G.Connected), let maxL := (Finset.univ.image (fun v => indepNeighborsCard G v)).max' (α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αinst✝:Nontrivial αG:SimpleGraph αx✝:G.Connected⊢ (Finset.image (fun v ↦ G.indepNeighborsCard v) Finset.univ).Nonempty All goals completed! 🐙) let minDistEven := (Finset.univ.image (distEven G)).min' (α:Type u_1inst✝²:Fintype αinst✝¹:DecidableEq αinst✝:Nontrivial αG:SimpleGraph αx✝:G.ConnectedmaxL:ℕ := (Finset.image (fun v ↦ G.indepNeighborsCard v) Finset.univ).max' ⋯⊢ (Finset.image G.distEven Finset.univ).Nonempty All goals completed! 🐙) (maxL : ℝ) + ⌈(minDistEven : ℝ) / 3⌉ ≤ b G := ⊢ ¬∀ {α : Type u_1} [inst : Fintype α] [DecidableEq α] [inst_2 : Nontrivial α] (G : SimpleGraph α), G.Connected → let maxL := (Finset.image (fun v ↦ G.indepNeighborsCard v) Finset.univ).max' ⋯; let minDistEven := (Finset.image G.distEven Finset.univ).min' ⋯; ↑maxL + ↑⌈↑minDistEven / 3⌉ ≤ G.b All goals completed! 🐙-- Sanity checks

distEven G v is always positive, since v itself is at distance 0 (even) from itself.

@[category test, AMS 5] example (G : SimpleGraph (Fin 3)) (v : Fin 3) : 0 < distEven G v := G:SimpleGraph (Fin 3)v:Fin 3⊢ 0 < G.distEven v G:SimpleGraph (Fin 3)v:Fin 3⊢ 0 < {w | Even (G.dist v w)}.card G:SimpleGraph (Fin 3)v:Fin 3⊢ {w | Even (G.dist v w)}.Nonempty exact ⟨v, Finset.mem_filter.mpr ⟨Finset.mem_univ _, ⟨0, G:SimpleGraph (Fin 3)v:Fin 3⊢ G.dist v v = 0 + 0 All goals completed! 🐙⟩⟩⟩

The invariant b G is nonneg.

@[category test, AMS 5] example (G : SimpleGraph (Fin 3)) : 0 ≤ b G := Nat.cast_nonneg _end WrittenOnTheWallII.GraphConjecture24