{
  "id": "8696",
  "ident": "NS.08696",
  "slug": "wotw-graphconjecture217",
  "title": "Written on the Wall II - Conjecture 217",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "WOWII [Conjecture 217](http://cms.uhd.edu/faculty/delavinae/research/wowII/all.html#conj217):\n\nIf $G$ is a finite simple connected graph on $n > 1$ vertices and\n$L_s(G) \\le 4 \\cdot \\chi_{\\mathrm{residue}=2}(G) + 2$,\nthen $G$ has a Hamiltonian path. Here $L_s(G)$ is the maximum number of\nleaves over all spanning trees and $\\chi_{\\mathrm{residue}=2}(G)$ is the indicator\nof $\\mathrm{residue}(G) = 2$.",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [
    "conjecture",
    "formal_proof"
  ],
  "collection": "wotw",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "WrittenOnTheWallII.GraphConjecture217.conjecture217",
  "statement_lean": "theorem conjecture217 (G : SimpleGraph α) [DecidableRel G.Adj] (h : G.Connected)\n    (hL : Ls G ≤ 4 * (residueEqTwoIndicator G : ℝ) + 2) :\n    ∃ a b : α, ∃ p : G.Walk a b, p.IsHamiltonian",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Written on the Wall II - Conjecture 217\n\nPer the WOWII definitions popup linked from this conjecture:\n\n- $L(G)$ is the **maximum number of leaves of a spanning tree** of $G$\n  — i.e. `Ls G` in our invariant library.\n- $\\chi_{\\mathrm{residue}=2}(G)$ is the **characteristic function** for the\n  predicate $\\mathrm{residue}\\, G = 2$, i.e. $1$ when $\\mathrm{residue}\\, G = 2$\n  and $0$ otherwise. It is not a connected-component count of any 2-core.\n\n*Reference:*\n[E. DeLaVina, Written on the Wall II, Conjectures of Graffiti.pc](http://cms.dt.uh.edu/faculty/delavinae/research/wowII/)\n-/\n\n@[expose] public section\n\nnamespace WrittenOnTheWallII.GraphConjecture217\n\nopen SimpleGraph\n\nvariable {α : Type*} [Fintype α] [DecidableEq α] [Nontrivial α]\n\n/-- The **characteristic function** for the predicate $\\mathrm{residue}\\, G = 2$:\nreturns $1$ when $G.\\mathrm{residue} = 2$ and $0$ otherwise. This is the WOWII\n$\\chi_{\\mathrm{residue}=2}(G)$ indicator appearing in Conjecture 217. -/\nnoncomputable def residueEqTwoIndicator (G : SimpleGraph α) [DecidableRel G.Adj] : ℕ :=\n  if residue G = 2 then 1 else 0\n\nset_option linter.style.formal_proof_palomar false in\n/--\nWOWII [Conjecture 217](http://cms.uhd.edu/faculty/delavinae/research/wowII/all.html#conj217):\n\nIf $G$ is a finite simple connected graph on $n > 1$ vertices and\n$L_s(G) \\le 4 \\cdot \\chi_{\\mathrm{residue}=2}(G) + 2$,\nthen $G$ has a Hamiltonian path. Here $L_s(G)$ is the maximum number of\nleaves over all spanning trees and $\\chi_{\\mathrm{residue}=2}(G)$ is the indicator\nof $\\mathrm{residue}(G) = 2$.\n-/\n@[category research solved, AMS 5,\n  formal_proof using lean4 at\n    \"https://github.com/KitaKen1/wowii-graph-conjecture-217-lean/blob/6a2fb82fcd17aa15ec734736740794bb8bd194c0/lean/GraphConjecture217Audit.lean\"]\ntheorem conjecture217 (G : SimpleGraph α) [DecidableRel G.Adj] (h : G.Connected)\n    (hL : Ls G ≤ 4 * (residueEqTwoIndicator G : ℝ) + 2) :\n    ∃ a b : α, ∃ p : G.Walk a b, p.IsHamiltonian := by\n  sorry\n\n-- Sanity checks\n\n/-- `residueEqTwoIndicator` is always $0$ or $1$. -/\n@[category test, AMS 5]\nexample (G : SimpleGraph (Fin 4)) [DecidableRel G.Adj] :\n    residueEqTwoIndicator G ≤ 1 := by\n  unfold residueEqTwoIndicator; split <;> simp\n\n/-- `residueEqTwoIndicator` is nonneg. -/\n@[category test, AMS 5]\nexample (G : SimpleGraph (Fin 4)) [DecidableRel G.Adj] :\n    0 ≤ residueEqTwoIndicator G := Nat.zero_le _\n\n-- The `Ls G` invariant is nonneg by construction (sSup of nonneg leaf counts);\n-- proving it requires the sSup-nonempty / above-bound machinery. We omit a\n-- sanity check here to avoid pulling in that infrastructure for a single test.\n\nend WrittenOnTheWallII.GraphConjecture217\n",
  "statement_hash": "872c0b6bee6c37a3e98fae03973e60e0d002c47ea955fdb7062e24965edbb9d7",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}