{
  "id": "8659",
  "ident": "NS.08659",
  "slug": "wotw-160",
  "title": "Written on the Wall II - Conjecture 160",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "WOWII [Conjecture 160](http://cms.dt.uh.edu/faculty/delavinae/research/wowII/)\n\nFor a simple connected graph $G$,\n$L_s(G) \\ge \\max_v l(v) + \\max_v T(v) \\cdot \\chi_{C_4}(G)$\nwhere:\n\n- $L_s(G) = \\mathrm{SimpleGraph.Ls}\\, G$ is the maximum number of leaves over all\n  spanning trees of $G$,\n- $\\max_v l(v)$ is the maximum local independence number over vertices,\n- $\\max_v T(v)$ is the maximum number of triangles incident to any vertex,\n- $\\chi_{C_4}(G)$ is `1` if $G$ has no cycle of length four and `0` otherwise.\n\nA formal proof uses the $C_4$-free neighborhood identity $d(v) = \\lambda(v) + T(v)$\nwith a star/geodesic case analysis, routed through the connected-seed\nspanning-tree bound developed for Conjecture 2. An independent second proof,\nvia a closest maximizer pair joined by a shortest path, is linked from the\npull request that recorded the solution.",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [
    "formal_proof"
  ],
  "collection": "wotw",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "WrittenOnTheWallII.GraphConjecture160.conjecture160",
  "statement_lean": "theorem conjecture160 (G : SimpleGraph α) [DecidableRel G.Adj] (h : G.Connected) :\n    let maxL := (Finset.univ.image (indepNeighborsCard G)).max' (by simp)\n    let maxT := maxTrianglesAtVertex G\n    let cC4 : ℕ := if ∃ v : α, ∃ c : G.Walk v v, c.IsCycle ∧ c.length = 4 then 0 else 1\n    (maxL : ℝ) + (maxT : ℝ) * (cC4 : ℝ) ≤ Ls G",
  "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 160\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## Definitions\n\nFor a vertex $v$ in $G$, **$T(v)$** is the number of triangles incident to $v$:\n$$T(v) = |\\{\\{u, w\\} \\subseteq N(v) \\mid u \\sim w\\}|$$\ni.e., the number of pairs of neighbors of $v$ that are themselves adjacent.\n\nThe invariant `maxTrianglesAtVertex G` is the maximum of $T(v)$ over all vertices.\n\nConjecture 160 uses both $\\max_v T(v)$ and $\\chi_{C_4}(G)$, the $C_4$-free\ncharacteristic function: it is `1` when $G$ contains no cycle of length four\nand `0` otherwise. The cycle need not be induced. These invariants lower-bound\nthe WOWII invariant $L_s(G)$, the maximum number of leaves over all spanning\ntrees of $G$ (exposed as `SimpleGraph.Ls G : ℝ`).\n\nThe earlier formalization used the number of induced four-cycles. The historical\nconjecture instead uses this binary $C_4$-free indicator.\n\n**Provenance.** Statement corrected by Dominic Dabish.\n\n-/\n\n@[expose] public section\n\nnamespace WrittenOnTheWallII.GraphConjecture160\n\n\nopen SimpleGraph\n\nvariable {α : Type*} [Fintype α] [DecidableEq α] [Nontrivial α]\n\n/-- The maximum number of triangles incident to any vertex in $G$. -/\nnoncomputable def maxTrianglesAtVertex (G : SimpleGraph α) [DecidableRel G.Adj] : ℕ :=\n  (Finset.univ.image (numTrianglesAtVertex G)).max' (Finset.image_nonempty.mpr Finset.univ_nonempty)\n\n\nopen scoped Classical in\nset_option linter.style.formal_proof_palomar false in\n/--\nWOWII [Conjecture 160](http://cms.dt.uh.edu/faculty/delavinae/research/wowII/)\n\nFor a simple connected graph $G$,\n$L_s(G) \\ge \\max_v l(v) + \\max_v T(v) \\cdot \\chi_{C_4}(G)$\nwhere:\n\n- $L_s(G) = \\mathrm{SimpleGraph.Ls}\\, G$ is the maximum number of leaves over all\n  spanning trees of $G$,\n- $\\max_v l(v)$ is the maximum local independence number over vertices,\n- $\\max_v T(v)$ is the maximum number of triangles incident to any vertex,\n- $\\chi_{C_4}(G)$ is `1` if $G$ has no cycle of length four and `0` otherwise.\n\nA formal proof uses the $C_4$-free neighborhood identity $d(v) = \\lambda(v) + T(v)$\nwith a star/geodesic case analysis, routed through the connected-seed\nspanning-tree bound developed for Conjecture 2. An independent second proof,\nvia a closest maximizer pair joined by a shortest path, is linked from the\npull request that recorded the solution.\n-/\n@[category research solved, AMS 5,\n  formal_proof using formal_conjectures at\n    \"https://github.com/anagnorisis2peripeteia/formal-conjectures/blob/f0d70dfa13f92a4b631289e44487690833be8798/WOWII160AltProof.lean#L714\"]\ntheorem conjecture160 (G : SimpleGraph α) [DecidableRel G.Adj] (h : G.Connected) :\n    let maxL := (Finset.univ.image (indepNeighborsCard G)).max' (by simp)\n    let maxT := maxTrianglesAtVertex G\n    let cC4 : ℕ := if ∃ v : α, ∃ c : G.Walk v v, c.IsCycle ∧ c.length = 4 then 0 else 1\n    (maxL : ℝ) + (maxT : ℝ) * (cC4 : ℝ) ≤ Ls G := by\n  sorry\n\n-- Sanity checks\n\n/-- In $K_3$, every vertex has $1$ triangle incident to it. -/\n@[category test, AMS 5]\nexample : numTrianglesAtVertex (⊤ : SimpleGraph (Fin 3)) (0 : Fin 3) = 1 := by\n  unfold numTrianglesAtVertex\n  decide\n\n/-- In $K_3$, `maxTrianglesAtVertex = 1`. -/\n@[category test, AMS 5]\nexample : maxTrianglesAtVertex (⊤ : SimpleGraph (Fin 3)) = 1 := by\n  unfold maxTrianglesAtVertex numTrianglesAtVertex\n  decide\n\n/-- In the path $P_3$, vertex $1$ is adjacent to $0$ and $2$, but $0$ and $2$ are not adjacent.\nSo $T(1) = 0$. -/\n@[category test, AMS 5]\nexample : numTrianglesAtVertex\n    (SimpleGraph.fromEdgeSet {s(0,1), s(1,2)} : SimpleGraph (Fin 3)) (1 : Fin 3) = 0 := by\n  unfold numTrianglesAtVertex\n  decide\n\nend WrittenOnTheWallII.GraphConjecture160\n",
  "statement_hash": "420baf500d47e43088fb6d3506ddb6fffa93e8a4a421f0e6313fca4ab47bdcd8",
  "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."
}