/- 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 FormalConjecturesUtil

Written on the Wall II - Conjecture 65

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

Counterexample

The conjecture is false. Start with the path $v_0-v_1-\cdots-v_{12}$ and attach one triangle at $v_1$ and another at $v_{11}$. The resulting graph has $17$ vertices. Its Graph_6 string is PhCGGC@?G?_@?@O?G?G?G?@C. Its only minimum-degree vertices are $v_0$ and $v_{12}$, at distance $12$, while its only maximum-degree vertices are $v_1$ and $v_{11}$, at distance $10$. Thus the conjectured lower bound is $12 + \lceil 10/3 \rceil = 16$.

Every induced forest must omit at least one vertex from each of the two vertex-disjoint triangles, so it has at most $15$ vertices. Conversely, deleting one non-path vertex from each triangle leaves a tree on $15$ vertices.

namespace WrittenOnTheWallII.GraphConjecture65open SimpleGraph Finset/- Synthesizing `∀ v, Fintype ↥(graph.neighborSet v)` on our 18-edges graph uses more than the default `synthInstance.maxSize` of 128 instances. That option bounds how many instances a solution may use, not how long the search may take. Raising it is free -- synthesis costs ~13ms either way about 1% of this file's elaboration time; the rest is `decide` and kernel type-checking. -/ set_option synthInstance.maxSize 400namespace Counterexample

The counterexample: a path on vertices $0,\ldots,12$, with triangles attached at vertices $1$ and $11$.

abbrev graph : SimpleGraph (Fin 17) := SimpleGraph.fromEdgeSet { s(0, 1), s(1, 2), s(2, 3), s(3, 4), s(4, 5), s(5, 6), s(6, 7), s(7, 8), s(8, 9), s(9, 10), s(10, 11), s(11, 12), s(1, 13), s(1, 14), s(13, 14), s(11, 15), s(11, 16), s(15, 16) }

The counterexample is connected.

@[category API, AMS 5] lemma connected : graph.Connected := graph.Connected All goals completed! 🐙

The minimum-degree vertices of the counterexample are the two path endpoints.

@[category API, AMS 5] lemma min_degree_vertices : {v | graph.degree v = graph.minDegree} = ({0, 12} : Set (Fin 17)) := {v | graph.degree v = graph.minDegree} = {0, 12} v:Fin 17v {v | graph.degree v = graph.minDegree} v {0, 12} (fun i i) 0, {v | graph.degree v = graph.minDegree} (fun i i) 0, {0, 12}(fun i i) 1, {v | graph.degree v = graph.minDegree} (fun i i) 1, {0, 12}(fun i i) 2, {v | graph.degree v = graph.minDegree} (fun i i) 2, {0, 12}(fun i i) 3, {v | graph.degree v = graph.minDegree} (fun i i) 3, {0, 12}(fun i i) 4, {v | graph.degree v = graph.minDegree} (fun i i) 4, {0, 12}(fun i i) 5, {v | graph.degree v = graph.minDegree} (fun i i) 5, {0, 12}(fun i i) 6, {v | graph.degree v = graph.minDegree} (fun i i) 6, {0, 12}(fun i i) 7, {v | graph.degree v = graph.minDegree} (fun i i) 7, {0, 12}(fun i i) 8, {v | graph.degree v = graph.minDegree} (fun i i) 8, {0, 12}(fun i i) 9, {v | graph.degree v = graph.minDegree} (fun i i) 9, {0, 12}(fun i i) 10, {v | graph.degree v = graph.minDegree} (fun i i) 10, {0, 12}(fun i i) 11, {v | graph.degree v = graph.minDegree} (fun i i) 11, {0, 12}(fun i i) 12, {v | graph.degree v = graph.minDegree} (fun i i) 12, {0, 12}(fun i i) 13, {v | graph.degree v = graph.minDegree} (fun i i) 13, {0, 12}(fun i i) 14, {v | graph.degree v = graph.minDegree} (fun i i) 14, {0, 12}(fun i i) 15, {v | graph.degree v = graph.minDegree} (fun i i) 15, {0, 12}(fun i i) 16, {v | graph.degree v = graph.minDegree} (fun i i) 16, {0, 12} (fun i i) 0, {v | graph.degree v = graph.minDegree} (fun i i) 0, {0, 12}(fun i i) 1, {v | graph.degree v = graph.minDegree} (fun i i) 1, {0, 12}(fun i i) 2, {v | graph.degree v = graph.minDegree} (fun i i) 2, {0, 12}(fun i i) 3, {v | graph.degree v = graph.minDegree} (fun i i) 3, {0, 12}(fun i i) 4, {v | graph.degree v = graph.minDegree} (fun i i) 4, {0, 12}(fun i i) 5, {v | graph.degree v = graph.minDegree} (fun i i) 5, {0, 12}(fun i i) 6, {v | graph.degree v = graph.minDegree} (fun i i) 6, {0, 12}(fun i i) 7, {v | graph.degree v = graph.minDegree} (fun i i) 7, {0, 12}(fun i i) 8, {v | graph.degree v = graph.minDegree} (fun i i) 8, {0, 12}(fun i i) 9, {v | graph.degree v = graph.minDegree} (fun i i) 9, {0, 12}(fun i i) 10, {v | graph.degree v = graph.minDegree} (fun i i) 10, {0, 12}(fun i i) 11, {v | graph.degree v = graph.minDegree} (fun i i) 11, {0, 12}(fun i i) 12, {v | graph.degree v = graph.minDegree} (fun i i) 12, {0, 12}(fun i i) 13, {v | graph.degree v = graph.minDegree} (fun i i) 13, {0, 12}(fun i i) 14, {v | graph.degree v = graph.minDegree} (fun i i) 14, {0, 12}(fun i i) 15, {v | graph.degree v = graph.minDegree} (fun i i) 15, {0, 12}(fun i i) 16, {v | graph.degree v = graph.minDegree} (fun i i) 16, {0, 12} All goals completed! 🐙

The maximum-degree vertices of the counterexample are the two triangle attachment points.

@[category API, AMS 5] lemma max_degree_vertices : {v | graph.degree v = graph.maxDegree} = ({1, 11} : Set (Fin 17)) := {v | graph.degree v = graph.maxDegree} = {1, 11} v:Fin 17v {v | graph.degree v = graph.maxDegree} v {1, 11} (fun i i) 0, {v | graph.degree v = graph.maxDegree} (fun i i) 0, {1, 11}(fun i i) 1, {v | graph.degree v = graph.maxDegree} (fun i i) 1, {1, 11}(fun i i) 2, {v | graph.degree v = graph.maxDegree} (fun i i) 2, {1, 11}(fun i i) 3, {v | graph.degree v = graph.maxDegree} (fun i i) 3, {1, 11}(fun i i) 4, {v | graph.degree v = graph.maxDegree} (fun i i) 4, {1, 11}(fun i i) 5, {v | graph.degree v = graph.maxDegree} (fun i i) 5, {1, 11}(fun i i) 6, {v | graph.degree v = graph.maxDegree} (fun i i) 6, {1, 11}(fun i i) 7, {v | graph.degree v = graph.maxDegree} (fun i i) 7, {1, 11}(fun i i) 8, {v | graph.degree v = graph.maxDegree} (fun i i) 8, {1, 11}(fun i i) 9, {v | graph.degree v = graph.maxDegree} (fun i i) 9, {1, 11}(fun i i) 10, {v | graph.degree v = graph.maxDegree} (fun i i) 10, {1, 11}(fun i i) 11, {v | graph.degree v = graph.maxDegree} (fun i i) 11, {1, 11}(fun i i) 12, {v | graph.degree v = graph.maxDegree} (fun i i) 12, {1, 11}(fun i i) 13, {v | graph.degree v = graph.maxDegree} (fun i i) 13, {1, 11}(fun i i) 14, {v | graph.degree v = graph.maxDegree} (fun i i) 14, {1, 11}(fun i i) 15, {v | graph.degree v = graph.maxDegree} (fun i i) 15, {1, 11}(fun i i) 16, {v | graph.degree v = graph.maxDegree} (fun i i) 16, {1, 11} (fun i i) 0, {v | graph.degree v = graph.maxDegree} (fun i i) 0, {1, 11}(fun i i) 1, {v | graph.degree v = graph.maxDegree} (fun i i) 1, {1, 11}(fun i i) 2, {v | graph.degree v = graph.maxDegree} (fun i i) 2, {1, 11}(fun i i) 3, {v | graph.degree v = graph.maxDegree} (fun i i) 3, {1, 11}(fun i i) 4, {v | graph.degree v = graph.maxDegree} (fun i i) 4, {1, 11}(fun i i) 5, {v | graph.degree v = graph.maxDegree} (fun i i) 5, {1, 11}(fun i i) 6, {v | graph.degree v = graph.maxDegree} (fun i i) 6, {1, 11}(fun i i) 7, {v | graph.degree v = graph.maxDegree} (fun i i) 7, {1, 11}(fun i i) 8, {v | graph.degree v = graph.maxDegree} (fun i i) 8, {1, 11}(fun i i) 9, {v | graph.degree v = graph.maxDegree} (fun i i) 9, {1, 11}(fun i i) 10, {v | graph.degree v = graph.maxDegree} (fun i i) 10, {1, 11}(fun i i) 11, {v | graph.degree v = graph.maxDegree} (fun i i) 11, {1, 11}(fun i i) 12, {v | graph.degree v = graph.maxDegree} (fun i i) 12, {1, 11}(fun i i) 13, {v | graph.degree v = graph.maxDegree} (fun i i) 13, {1, 11}(fun i i) 14, {v | graph.degree v = graph.maxDegree} (fun i i) 14, {1, 11}(fun i i) 15, {v | graph.degree v = graph.maxDegree} (fun i i) 15, {1, 11}(fun i i) 16, {v | graph.degree v = graph.maxDegree} (fun i i) 16, {1, 11} All goals completed! 🐙

The minimum distance between minimum-degree vertices is $12$.

graph.computableDistMin {0, 12} = 12 All goals completed! 🐙

The minimum distance between maximum-degree vertices is $10$.

graph.computableDistMin {1, 11} = 10 All goals completed! 🐙

An acyclic induced subgraph cannot contain all three vertices of a triangle.

S:Finset (Fin 17)hS:(induce (↑S) graph).IsAcyclica:Fin 17b:Fin 17c:Fin 17hab:graph.Adj a bhbc:graph.Adj b chca:graph.Adj c ahsub:{a, b, c} Sha:a Shb:b Shc:c Sva:S := a, havb:S := b, hbvc:S := c, hchab':(induce (↑S) graph).Adj va vbhbc':(induce (↑S) graph).Adj vb vchca':(induce (↑S) graph).Adj vc vacycle:(induce (↑S) graph).Walk va va := Walk.cons hab' (Walk.cons hbc' (Walk.cons hca' Walk.nil))cycle.edges.Nodup All goals completed! 🐙 S:Finset (Fin 17)hS:(induce (↑S) graph).IsAcyclica:Fin 17b:Fin 17c:Fin 17hab:graph.Adj a bhbc:graph.Adj b chca:graph.Adj c ahsub:{a, b, c} Sha:a Shb:b Shc:c Sva:S := a, havb:S := b, hbvc:S := c, hchab':(induce (↑S) graph).Adj va vbhbc':(induce (↑S) graph).Adj vb vchca':(induce (↑S) graph).Adj vc vacycle:(induce (↑S) graph).Walk va va := Walk.cons hab' (Walk.cons hbc' (Walk.cons hca' Walk.nil))cycle.support.tail.Nodup All goals completed! 🐙)

Every induced forest in the counterexample has at most $15$ vertices.

S:Finset (Fin 17)hS:(induce (↑S) graph).IsAcyclichfirst:¬{1, 13, 14} Shsecond:¬{11, 15, 16} Sx:Fin 17hxT:x {1, 13, 14}hxS:x Sy:Fin 17hyT:y {11, 15, 16}hyS:y Shxy:x yhsubset:{x, y} univ \ Shcard:2 #(univ \ S)hpartition:#(univ \ S) + #S = 17#S 15 All goals completed! 🐙

The largest induced forest in the counterexample has at most $15$ vertices.

this:Subsingleton (induce (↑) graph).IsAcyclic All goals completed! 🐙 b {n | s, (induce (↑s) graph).IsAcyclic #s = n}, b 15 S:Finset (Fin 17)hS:(induce (↑S) graph).IsAcyclic#S 15 All goals completed! 🐙end Counterexample

WOWII Conjecture 65:

Does every simple connected graph $G$ satisfy $f(G) \ge \operatorname{dist_min}(A) + \lceil \operatorname{dist_min}(M) / 3 \rceil$, where $A$ is the set of minimum-degree vertices, $M$ is the set of maximum-degree vertices, and $\operatorname{dist_min}(S)$ is the minimum distance between two distinct vertices of $S$ (see distMin).

The answer is no. Counterexample.graph has a conjectured lower bound of $16$, but every induced forest in it has at most $15$ vertices.

h: (α : Type) [inst : Fintype α] [inst_1 : DecidableEq α] [Nontrivial α] (G : SimpleGraph α) [inst_3 : DecidableRel G.Adj], G.Connected let A := {v | G.degree v = G.minDegree}; let M := {v | G.degree v = G.maxDegree}; (G.distMin A) + (G.distMin M) / 3 G.largestInducedForestSizehc:12 + 10 / 3 Counterexample.graph.largestInducedForestSizeFalse h: (α : Type) [inst : Fintype α] [inst_1 : DecidableEq α] [Nontrivial α] (G : SimpleGraph α) [inst_3 : DecidableRel G.Adj], G.Connected let A := {v | G.degree v = G.minDegree}; let M := {v | G.degree v = G.maxDegree}; (G.distMin A) + (G.distMin M) / 3 G.largestInducedForestSizehc:12 + 10 / 3 Counterexample.graph.largestInducedForestSizehf:Counterexample.graph.largestInducedForestSize 15False h: (α : Type) [inst : Fintype α] [inst_1 : DecidableEq α] [Nontrivial α] (G : SimpleGraph α) [inst_3 : DecidableRel G.Adj], G.Connected let A := {v | G.degree v = G.minDegree}; let M := {v | G.degree v = G.maxDegree}; (G.distMin A) + (G.distMin M) / 3 G.largestInducedForestSizehf:Counterexample.graph.largestInducedForestSize 15hc:16 Counterexample.graph.largestInducedForestSizeFalse exact (h: (α : Type) [inst : Fintype α] [inst_1 : DecidableEq α] [Nontrivial α] (G : SimpleGraph α) [inst_3 : DecidableRel G.Adj], G.Connected let A := {v | G.degree v = G.minDegree}; let M := {v | G.degree v = G.maxDegree}; (G.distMin A) + (G.distMin M) / 3 G.largestInducedForestSizehf:Counterexample.graph.largestInducedForestSize 15hc:16 Counterexample.graph.largestInducedForestSize¬16 Counterexample.graph.largestInducedForestSize All goals completed! 🐙 : ¬(16 : ) Counterexample.graph.largestInducedForestSize) (h: (α : Type) [inst : Fintype α] [inst_1 : DecidableEq α] [Nontrivial α] (G : SimpleGraph α) [inst_3 : DecidableRel G.Adj], G.Connected let A := {v | G.degree v = G.minDegree}; let M := {v | G.degree v = G.maxDegree}; (G.distMin A) + (G.distMin M) / 3 G.largestInducedForestSizehf:Counterexample.graph.largestInducedForestSize 15hc:16 Counterexample.graph.largestInducedForestSize16 Counterexample.graph.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 _

In the complete graph K₃, min degree equals max degree (regular graph).

@[category test, AMS 5] example : ( : SimpleGraph (Fin 3)).minDegree = ( : SimpleGraph (Fin 3)).maxDegree := .minDegree = .maxDegree All goals completed! 🐙

distMin G S is always nonneg.

@[category test, AMS 5] example (G : SimpleGraph (Fin 3)) (S : Set (Fin 3)) : 0 distMin G S := Nat.zero_le _h:{p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}.Nonempty1 image (fun p .dist p.1 p.2) ({p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}) b image (fun p .dist p.1 p.2) ({p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}), 1 b h:{p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}.Nonempty1 image (fun p .dist p.1 p.2) ({p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2})h:{p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}.Nonempty b image (fun p .dist p.1 p.2) ({p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}), 1 b h:{p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}.Nonempty1 image (fun p .dist p.1 p.2) ({p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}) h:{p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}.Nonempty(0, 1) {p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}h:{p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}.Nonempty.dist (0, 1).1 (0, 1).2 = 1 h:{p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}.Nonempty(0, 1) {p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2} All goals completed! 🐙 h:{p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}.Nonempty.dist (0, 1).1 (0, 1).2 = 1 All goals completed! 🐙 h:{p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}.Nonempty b image (fun p .dist p.1 p.2) ({p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}), 1 b h:{p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}.Nonemptyd:hd:d image (fun p .dist p.1 p.2) ({p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2})1 d h:{p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}.Nonemptyp:Fin 2 × Fin 2hp:p {p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}hd:.dist p.1 p.2 image (fun p .dist p.1 p.2) ({p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2})1 .dist p.1 p.2 h:{p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}.Nonemptyp:Fin 2 × Fin 2hp:p {p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}hd:.dist p.1 p.2 image (fun p .dist p.1 p.2) ({p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2})hne:p.1 p.21 .dist p.1 p.2 All goals completed! 🐙 h:¬{p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}.NonemptyFalse h:¬{p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}.NonemptyFalse h:¬{p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}.Nonempty{p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}.Nonempty exact (0, 1), h:¬{p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2}.Nonempty(0, 1) {p {0, 1}.toFinset ×ˢ {0, 1}.toFinset | p.1 p.2} All goals completed! 🐙

A singleton contains no distinct pair, so distMin uses its degenerate-case fallback.

@[category test, AMS 5] example : distMin ( : SimpleGraph (Fin 3)) ({0} : Set (Fin 3)) = 0 := .distMin {0} = 0 All goals completed! 🐙end WrittenOnTheWallII.GraphConjecture65