Add lean source and binary files (part 55)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK5.lean +1162 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK6.lean +0 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK7.lean +0 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK8.lean +0 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK9.lean +0 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertifiedRamseyReduction.lean +58 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ChainCounts.lean +149 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CliqueThree.lean +35 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CliqueTraversal.lean +87 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ClosedIndexed.lean +67 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ClosureCertificates.lean +90 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ClosureSteps.lean +110 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ColouredPath.lean +49 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ColouredPathFull.lean +160 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ColouredPathStart.lean +74 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ComponentVertices.lean +99 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ConditionalMain.lean +41 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ConnectedLongPath.lean +104 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK10.lean +0 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK11.lean +0 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK12.lean +0 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK13.lean +0 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK14.lean +0 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK15.lean +0 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK16.lean +0 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK17.lean +0 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK5.lean +226 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK6.lean +438 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK7.lean +815 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK8.lean +1290 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK9.lean +2318 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CycleTwoPaths.lean +109 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Definitions.lean +62 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DeletedComponent.lean +70 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DeletionOrder.lean +83 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DenseLayers.lean +101 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DenseSubgraph.lean +139 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DistanceLayers.lean +125 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointAllowedAttachment.lean +75 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointAttachment.lean +178 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointDegreeCover.lean +67 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointFullAttachment.lean +96 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointStructure.lean +116 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointTail.lean +178 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ExteriorCounts.lean +70 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FastCertificateMatrix.lean +114 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FastLayoutGraph.lean +35 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FastMatrixRows.lean +52 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteAttachments.lean +111 -0
- lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteBad.lean +47 -0
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK5.lean
ADDED
|
@@ -0,0 +1,1162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.LayoutCertificate
|
| 2 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateMatrixChunks
|
| 3 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.FastCertificateMatrix
|
| 4 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.FastLayoutGraph
|
| 5 |
+
|
| 6 |
+
namespace OAI
|
| 7 |
+
|
| 8 |
+
namespace CycleClique.Construction.Certificates
|
| 9 |
+
|
| 10 |
+
def k5t3p0 : LayoutCertificate 3 where
|
| 11 |
+
chains := [[0], [1], [2]]
|
| 12 |
+
clique := {0, 1, 2}
|
| 13 |
+
templates := [⟨0, 1, [], [], [], 1, 4⟩,
|
| 14 |
+
⟨0, 2, [], [], [], 1, 4⟩,
|
| 15 |
+
⟨1, 2, [], [], [], 1, 4⟩]
|
| 16 |
+
required := []
|
| 17 |
+
closure := []
|
| 18 |
+
bad := ⟨none, {(0, 2), (1, 2)}⟩
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
private def k5t3p0_state_0 : ForbiddenMatrix 3 :=
|
| 22 |
+
fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 1 4],
|
| 23 |
+
#[Finset.Icc 1 4, ∅, Finset.Icc 1 4],
|
| 24 |
+
#[Finset.Icc 1 4, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 25 |
+
|
| 26 |
+
private theorem k5t3p0_initial_eq_row_0 : ∀ j : Fin 3, (k5t3p0.initialMatrix 5) 0 j = k5t3p0_state_0 0 j := by decide
|
| 27 |
+
|
| 28 |
+
private theorem k5t3p0_initial_eq_row_1 : ∀ j : Fin 3, (k5t3p0.initialMatrix 5) 1 j = k5t3p0_state_0 1 j := by decide
|
| 29 |
+
|
| 30 |
+
private theorem k5t3p0_initial_eq_row_2 : ∀ j : Fin 3, (k5t3p0.initialMatrix 5) 2 j = k5t3p0_state_0 2 j := by decide
|
| 31 |
+
|
| 32 |
+
private theorem k5t3p0_initial_eq : (k5t3p0.initialMatrix 5) = k5t3p0_state_0 := by
|
| 33 |
+
funext i j
|
| 34 |
+
fin_cases i
|
| 35 |
+
|
| 36 |
+
· exact k5t3p0_initial_eq_row_0 j
|
| 37 |
+
|
| 38 |
+
· exact k5t3p0_initial_eq_row_1 j
|
| 39 |
+
|
| 40 |
+
· exact k5t3p0_initial_eq_row_2 j
|
| 41 |
+
|
| 42 |
+
private theorem k5t3p0_closure_0 : ClosureCheck k5t3p0.graph k5t3p0_state_0 5 3 [] := by trivial
|
| 43 |
+
|
| 44 |
+
private theorem k5t3p0_matrix_eq : k5t3p0.matrix 5 = k5t3p0_state_0 := by
|
| 45 |
+
change closureMatrix (k5t3p0.initialMatrix 5) _ = _
|
| 46 |
+
rw [k5t3p0_initial_eq]
|
| 47 |
+
change closureMatrix k5t3p0_state_0 [] = _
|
| 48 |
+
rfl
|
| 49 |
+
|
| 50 |
+
private theorem k5t3p0_part_0 : k5t3p0.chains.flatten = List.finRange _ := by decide
|
| 51 |
+
|
| 52 |
+
private theorem k5t3p0_part_1 : k5t3p0.chains.map List.length = ([[], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide
|
| 53 |
+
|
| 54 |
+
private theorem k5t3p0_part_2 : k5t3p0.chains.map (fun l => l.map (fun i => decide (i ∈ k5t3p0.clique))) = ([[], [], []] : List (List ℕ)).map profileMask := by decide
|
| 55 |
+
|
| 56 |
+
private theorem k5t3p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 4⟩ : TemplateData (Fin 3)).Check k5t3p0.graph k5t3p0.clique 5 (patternAmount ([[], [], []] : List (List ℕ))) (([[], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 57 |
+
|
| 58 |
+
private theorem k5t3p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 4⟩ : TemplateData (Fin 3)).Check k5t3p0.graph k5t3p0.clique 5 (patternAmount ([[], [], []] : List (List ℕ))) (([[], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 59 |
+
|
| 60 |
+
private theorem k5t3p0_templates_item_2 : (⟨1, 2, [], [], [], 1, 4⟩ : TemplateData (Fin 3)).Check k5t3p0.graph k5t3p0.clique 5 (patternAmount ([[], [], []] : List (List ℕ))) (([[], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 61 |
+
|
| 62 |
+
private theorem k5t3p0_part_3 : ∀ T ∈ k5t3p0.templates, T.Check k5t3p0.graph k5t3p0.clique 5 (patternAmount ([[], [], []] : List (List ℕ))) (([[], [], []] : List (List ℕ)).map List.length).sum := by
|
| 63 |
+
simp only [k5t3p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true]
|
| 64 |
+
exact ⟨k5t3p0_templates_item_0, k5t3p0_templates_item_1, k5t3p0_templates_item_2⟩
|
| 65 |
+
|
| 66 |
+
private theorem k5t3p0_part_4 : ∀ p ∈ k5t3p0.required, p.Check k5t3p0.graph 5 := by decide
|
| 67 |
+
|
| 68 |
+
private theorem k5t3p0_part_5 : ClosureCheck k5t3p0.graph (k5t3p0.initialMatrix 5) 5 3 k5t3p0.closure := by
|
| 69 |
+
rw [k5t3p0_initial_eq]
|
| 70 |
+
exact k5t3p0_closure_0
|
| 71 |
+
|
| 72 |
+
private theorem k5t3p0_part_6 : k5t3p0.bad.Check k5t3p0.graph (k5t3p0.matrix 5) 5 3 := by
|
| 73 |
+
rw [k5t3p0_matrix_eq]
|
| 74 |
+
decide
|
| 75 |
+
|
| 76 |
+
theorem k5t3p0_check : k5t3p0.Check 5 3 [[], [], []] :=
|
| 77 |
+
⟨k5t3p0_part_0, k5t3p0_part_1, k5t3p0_part_2, k5t3p0_part_3, k5t3p0_part_4, k5t3p0_part_5, k5t3p0_part_6⟩
|
| 78 |
+
private def k5t3p1_step_0_data : EdgeAttachmentData 4 := ⟨2, 0, [⟨0, 2, []⟩], ⟨none, {(0, 2), (2, 2), (1, 2)}⟩⟩
|
| 79 |
+
|
| 80 |
+
private def k5t3p1_step_0 : ClosureStep 4 := .edge k5t3p1_step_0_data
|
| 81 |
+
|
| 82 |
+
def k5t3p1 : LayoutCertificate 4 where
|
| 83 |
+
chains := [[0], [1, 2, 3]]
|
| 84 |
+
clique := {0, 1, 3}
|
| 85 |
+
templates := [⟨0, 1, [], [], [], 2, 4⟩,
|
| 86 |
+
⟨0, 1, [], [], [2, 3], 1, 2⟩,
|
| 87 |
+
⟨0, 2, [], [], [1], 1, 3⟩,
|
| 88 |
+
⟨0, 3, [], [], [2, 1], 1, 2⟩,
|
| 89 |
+
⟨1, 2, [], [], [3], 1, 3⟩,
|
| 90 |
+
⟨2, 3, [], [1], [], 1, 3⟩]
|
| 91 |
+
required := [⟨1, 2, []⟩]
|
| 92 |
+
closure := [k5t3p1_step_0]
|
| 93 |
+
bad := ⟨none, {(0, 1), (2, 1), (1, 2)}⟩
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
private def k5t3p1_state_0 : ForbiddenMatrix 4 :=
|
| 97 |
+
fun i j => ((#[#[∅, Finset.Icc 1 4, {1, 2, 3}, {1, 2}],
|
| 98 |
+
#[Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅],
|
| 99 |
+
#[{1, 2, 3}, Finset.Icc 1 4, ∅, {1, 2, 3}],
|
| 100 |
+
#[{1, 2}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 101 |
+
|
| 102 |
+
private theorem k5t3p1_initial_eq_row_0 : ∀ j : Fin 4, (k5t3p1.initialMatrix 5) 0 j = k5t3p1_state_0 0 j := by decide
|
| 103 |
+
|
| 104 |
+
private theorem k5t3p1_initial_eq_row_1 : ∀ j : Fin 4, (k5t3p1.initialMatrix 5) 1 j = k5t3p1_state_0 1 j := by decide
|
| 105 |
+
|
| 106 |
+
private theorem k5t3p1_initial_eq_row_2 : ∀ j : Fin 4, (k5t3p1.initialMatrix 5) 2 j = k5t3p1_state_0 2 j := by decide
|
| 107 |
+
|
| 108 |
+
private theorem k5t3p1_initial_eq_row_3 : ∀ j : Fin 4, (k5t3p1.initialMatrix 5) 3 j = k5t3p1_state_0 3 j := by decide
|
| 109 |
+
|
| 110 |
+
private theorem k5t3p1_initial_eq : (k5t3p1.initialMatrix 5) = k5t3p1_state_0 := by
|
| 111 |
+
funext i j
|
| 112 |
+
fin_cases i
|
| 113 |
+
|
| 114 |
+
· exact k5t3p1_initial_eq_row_0 j
|
| 115 |
+
|
| 116 |
+
· exact k5t3p1_initial_eq_row_1 j
|
| 117 |
+
|
| 118 |
+
· exact k5t3p1_initial_eq_row_2 j
|
| 119 |
+
|
| 120 |
+
· exact k5t3p1_initial_eq_row_3 j
|
| 121 |
+
|
| 122 |
+
private def k5t3p1_state_1 : ForbiddenMatrix 4 :=
|
| 123 |
+
fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 3, {1, 2}],
|
| 124 |
+
#[Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅],
|
| 125 |
+
#[Finset.Icc 0 3, Finset.Icc 1 4, ∅, {1, 2, 3}],
|
| 126 |
+
#[{1, 2}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 127 |
+
|
| 128 |
+
private def k5t3p1_local_0 : ForbiddenMatrix 4 :=
|
| 129 |
+
fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2}],
|
| 130 |
+
#[Finset.Icc 1 4, ∅, Finset.Icc 1 4, ∅],
|
| 131 |
+
#[Finset.Icc 1 4, Finset.Icc 1 4, ∅, {1, 2, 3}],
|
| 132 |
+
#[{1, 2}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 133 |
+
|
| 134 |
+
private theorem k5t3p1_local_0_eq_row_0 : ∀ j : Fin 4, (fun a b => k5t3p1_state_0 a b ∪ requiredMatrix 5 k5t3p1_step_0_data.required a b) 0 j = k5t3p1_local_0 0 j := by decide
|
| 135 |
+
|
| 136 |
+
private theorem k5t3p1_local_0_eq_row_1 : ∀ j : Fin 4, (fun a b => k5t3p1_state_0 a b ∪ requiredMatrix 5 k5t3p1_step_0_data.required a b) 1 j = k5t3p1_local_0 1 j := by decide
|
| 137 |
+
|
| 138 |
+
private theorem k5t3p1_local_0_eq_row_2 : ∀ j : Fin 4, (fun a b => k5t3p1_state_0 a b ∪ requiredMatrix 5 k5t3p1_step_0_data.required a b) 2 j = k5t3p1_local_0 2 j := by decide
|
| 139 |
+
|
| 140 |
+
private theorem k5t3p1_local_0_eq_row_3 : ∀ j : Fin 4, (fun a b => k5t3p1_state_0 a b ∪ requiredMatrix 5 k5t3p1_step_0_data.required a b) 3 j = k5t3p1_local_0 3 j := by decide
|
| 141 |
+
|
| 142 |
+
private theorem k5t3p1_local_0_eq : (fun a b => k5t3p1_state_0 a b ∪ requiredMatrix 5 k5t3p1_step_0_data.required a b) = k5t3p1_local_0 := by
|
| 143 |
+
funext i j
|
| 144 |
+
fin_cases i
|
| 145 |
+
|
| 146 |
+
· exact k5t3p1_local_0_eq_row_0 j
|
| 147 |
+
|
| 148 |
+
· exact k5t3p1_local_0_eq_row_1 j
|
| 149 |
+
|
| 150 |
+
· exact k5t3p1_local_0_eq_row_2 j
|
| 151 |
+
|
| 152 |
+
· exact k5t3p1_local_0_eq_row_3 j
|
| 153 |
+
|
| 154 |
+
private theorem k5t3p1_local_0_paths : ∀ p ∈ k5t3p1_step_0_data.required, p.Check (addedEdgeGraph k5t3p1.graph k5t3p1_step_0_data.i k5t3p1_step_0_data.j) 5 := by decide
|
| 155 |
+
|
| 156 |
+
private theorem k5t3p1_local_0_bad : k5t3p1_step_0_data.bad.Check (addedEdgeGraph k5t3p1.graph k5t3p1_step_0_data.i k5t3p1_step_0_data.j) k5t3p1_local_0 5 3 := by decide
|
| 157 |
+
|
| 158 |
+
private theorem k5t3p1_step_0_check : k5t3p1_step_0.Check k5t3p1.graph k5t3p1_state_0 5 3 := by
|
| 159 |
+
change k5t3p1_step_0_data.Check k5t3p1.graph k5t3p1_state_0 5 3
|
| 160 |
+
refine ⟨k5t3p1_local_0_paths, ?_⟩
|
| 161 |
+
rw [k5t3p1_local_0_eq]
|
| 162 |
+
exact k5t3p1_local_0_bad
|
| 163 |
+
|
| 164 |
+
private theorem k5t3p1_update_0 : k5t3p1_step_0.apply k5t3p1_state_0 = k5t3p1_state_1 := by
|
| 165 |
+
have h : ∀ i j : Fin 4, k5t3p1_step_0.apply k5t3p1_state_0 i j = k5t3p1_state_1 i j := by decide
|
| 166 |
+
exact funext (fun i => funext (h i))
|
| 167 |
+
|
| 168 |
+
private theorem k5t3p1_closure_1 : ClosureCheck k5t3p1.graph k5t3p1_state_1 5 3 [] := by trivial
|
| 169 |
+
|
| 170 |
+
private theorem k5t3p1_closure_0 : ClosureCheck k5t3p1.graph k5t3p1_state_0 5 3 [k5t3p1_step_0] := by
|
| 171 |
+
constructor
|
| 172 |
+
· exact k5t3p1_step_0_check
|
| 173 |
+
· rw [k5t3p1_update_0]
|
| 174 |
+
exact k5t3p1_closure_1
|
| 175 |
+
|
| 176 |
+
private theorem k5t3p1_matrix_eq : k5t3p1.matrix 5 = k5t3p1_state_1 := by
|
| 177 |
+
change closureMatrix (k5t3p1.initialMatrix 5) _ = _
|
| 178 |
+
rw [k5t3p1_initial_eq]
|
| 179 |
+
change closureMatrix k5t3p1_state_0 [k5t3p1_step_0] = _
|
| 180 |
+
simp only [closureMatrix]
|
| 181 |
+
rw [k5t3p1_update_0]
|
| 182 |
+
|
| 183 |
+
private theorem k5t3p1_part_0 : k5t3p1.chains.flatten = List.finRange _ := by decide
|
| 184 |
+
|
| 185 |
+
private theorem k5t3p1_part_1 : k5t3p1.chains.map List.length = ([[], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide
|
| 186 |
+
|
| 187 |
+
private theorem k5t3p1_part_2 : k5t3p1.chains.map (fun l => l.map (fun i => decide (i ∈ k5t3p1.clique))) = ([[], [1]] : List (List ℕ)).map profileMask := by decide
|
| 188 |
+
|
| 189 |
+
private theorem k5t3p1_templates_item_0 : (⟨0, 1, [], [], [], 2, 4⟩ : TemplateData (Fin 4)).Check k5t3p1.graph k5t3p1.clique 5 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by decide
|
| 190 |
+
|
| 191 |
+
private theorem k5t3p1_templates_item_1 : (⟨0, 1, [], [], [2, 3], 1, 2⟩ : TemplateData (Fin 4)).Check k5t3p1.graph k5t3p1.clique 5 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by decide
|
| 192 |
+
|
| 193 |
+
private theorem k5t3p1_templates_item_2 : (⟨0, 2, [], [], [1], 1, 3⟩ : TemplateData (Fin 4)).Check k5t3p1.graph k5t3p1.clique 5 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by decide
|
| 194 |
+
|
| 195 |
+
private theorem k5t3p1_templates_item_3 : (⟨0, 3, [], [], [2, 1], 1, 2⟩ : TemplateData (Fin 4)).Check k5t3p1.graph k5t3p1.clique 5 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by decide
|
| 196 |
+
|
| 197 |
+
private theorem k5t3p1_templates_item_4 : (⟨1, 2, [], [], [3], 1, 3⟩ : TemplateData (Fin 4)).Check k5t3p1.graph k5t3p1.clique 5 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by decide
|
| 198 |
+
|
| 199 |
+
private theorem k5t3p1_templates_item_5 : (⟨2, 3, [], [1], [], 1, 3⟩ : TemplateData (Fin 4)).Check k5t3p1.graph k5t3p1.clique 5 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by decide
|
| 200 |
+
|
| 201 |
+
private theorem k5t3p1_part_3 : ∀ T ∈ k5t3p1.templates, T.Check k5t3p1.graph k5t3p1.clique 5 (patternAmount ([[], [1]] : List (List ℕ))) (([[], [1]] : List (List ℕ)).map List.length).sum := by
|
| 202 |
+
simp only [k5t3p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true]
|
| 203 |
+
exact ⟨k5t3p1_templates_item_0, k5t3p1_templates_item_1, k5t3p1_templates_item_2, k5t3p1_templates_item_3, k5t3p1_templates_item_4, k5t3p1_templates_item_5⟩
|
| 204 |
+
|
| 205 |
+
private theorem k5t3p1_required_item_0 : (⟨1, 2, []⟩ : RequiredPathData (Fin 4)).Check k5t3p1.graph 5 := by decide
|
| 206 |
+
|
| 207 |
+
private theorem k5t3p1_part_4 : ∀ p ∈ k5t3p1.required, p.Check k5t3p1.graph 5 := by
|
| 208 |
+
simp only [k5t3p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true]
|
| 209 |
+
exact k5t3p1_required_item_0
|
| 210 |
+
|
| 211 |
+
private theorem k5t3p1_part_5 : ClosureCheck k5t3p1.graph (k5t3p1.initialMatrix 5) 5 3 k5t3p1.closure := by
|
| 212 |
+
rw [k5t3p1_initial_eq]
|
| 213 |
+
exact k5t3p1_closure_0
|
| 214 |
+
|
| 215 |
+
private theorem k5t3p1_part_6 : k5t3p1.bad.Check k5t3p1.graph (k5t3p1.matrix 5) 5 3 := by
|
| 216 |
+
rw [k5t3p1_matrix_eq]
|
| 217 |
+
decide
|
| 218 |
+
|
| 219 |
+
theorem k5t3p1_check : k5t3p1.Check 5 3 [[], [1]] :=
|
| 220 |
+
⟨k5t3p1_part_0, k5t3p1_part_1, k5t3p1_part_2, k5t3p1_part_3, k5t3p1_part_4, k5t3p1_part_5, k5t3p1_part_6⟩
|
| 221 |
+
private def k5t3p2_step_0_data : EdgeAttachmentData 5 := ⟨3, 1, [⟨2, 3, [1]⟩, ⟨2, 4, [3, 1, 0]⟩, ⟨3, 4, [1]⟩], ⟨none, {(0, 0), (2, 2), (3, 2), (4, 1)}⟩⟩
|
| 222 |
+
|
| 223 |
+
private def k5t3p2_step_0 : ClosureStep 5 := .edge k5t3p2_step_0_data
|
| 224 |
+
|
| 225 |
+
private def k5t3p2_step_1_data : EdgeAttachmentData 5 := ⟨4, 2, [⟨0, 1, [4, 2]⟩, ⟨1, 3, [0, 4, 2]⟩, ⟨1, 2, [4]⟩, ⟨2, 3, [4]⟩], ⟨none, {(0, 0), (1, 2), (2, 2), (3, 1)}⟩⟩
|
| 226 |
+
|
| 227 |
+
private def k5t3p2_step_1 : ClosureStep 5 := .edge k5t3p2_step_1_data
|
| 228 |
+
|
| 229 |
+
private def k5t3p2_step_2_data : FreshAttachmentData 5 := ⟨3, 1, [⟨3, 0, [2, 1, 5, 4]⟩, ⟨3, 0, [2, 5, 4]⟩, ⟨3, 5, [2, 0, 4]⟩, ⟨3, 1, [2, 0, 4, 5]⟩, ⟨5, 0, [1, 2, 3, 4]⟩, ⟨0, 4, [2, 1, 5]⟩, ⟨0, 5, [2, 3, 4]⟩, ⟨0, 1, [2, 3, 4, 5]⟩], ⟨none, {(3, 1), (0, 0), (1, 0), (5, 1), (4, 1)}⟩⟩
|
| 230 |
+
|
| 231 |
+
private def k5t3p2_step_2 : ClosureStep 5 := .fresh k5t3p2_step_2_data
|
| 232 |
+
|
| 233 |
+
private def k5t3p2_step_3_data : FreshAttachmentData 5 := ⟨4, 1, [⟨1, 0, [2, 3, 4, 5]⟩, ⟨1, 3, [2, 0, 5, 4]⟩, ⟨1, 4, [5, 0, 2, 3]⟩, ⟨3, 0, [4, 5, 1, 2]⟩, ⟨3, 1, [4, 5, 0, 2]⟩, ⟨4, 0, [3, 2, 1, 5]⟩, ⟨4, 1, [3, 2, 0, 5]⟩], ⟨none, {(1, 1), (3, 1), (4, 1)}⟩⟩
|
| 234 |
+
|
| 235 |
+
private def k5t3p2_step_3 : ClosureStep 5 := .fresh k5t3p2_step_3_data
|
| 236 |
+
|
| 237 |
+
private def k5t3p2_step_4_data : FreshAttachmentData 5 := ⟨4, 2, [⟨2, 0, [1, 5, 4, 3]⟩, ⟨4, 0, [3, 2, 1, 5]⟩, ⟨4, 0, [3, 2, 5]⟩, ⟨4, 2, [3, 0, 5]⟩, ⟨4, 1, [3, 0, 5, 2]⟩, ⟨0, 2, [3, 4, 5]⟩, ⟨0, 1, [3, 4, 5, 2]⟩, ⟨0, 3, [5, 1, 2]⟩], ⟨none, {(4, 1), (0, 0), (1, 0), (2, 1), (3, 1)}⟩⟩
|
| 238 |
+
|
| 239 |
+
private def k5t3p2_step_4 : ClosureStep 5 := .fresh k5t3p2_step_4_data
|
| 240 |
+
|
| 241 |
+
private def k5t3p2_step_5_data : EdgeAttachmentData 5 := ⟨2, 0, [⟨0, 4, [2, 1]⟩, ⟨2, 0, []⟩], ⟨none, {(2, 2), (0, 2), (4, 1), (3, 0)}⟩⟩
|
| 242 |
+
|
| 243 |
+
private def k5t3p2_step_5 : ClosureStep 5 := .edge k5t3p2_step_5_data
|
| 244 |
+
|
| 245 |
+
private def k5t3p2_step_6_data : EdgeAttachmentData 5 := ⟨3, 0, [⟨1, 0, [2, 3]⟩], ⟨none, {(1, 2), (0, 2), (3, 1), (2, 0)}⟩⟩
|
| 246 |
+
|
| 247 |
+
private def k5t3p2_step_6 : ClosureStep 5 := .edge k5t3p2_step_6_data
|
| 248 |
+
|
| 249 |
+
def k5t3p2 : LayoutCertificate 5 where
|
| 250 |
+
chains := [[0], [1, 2, 3, 4]]
|
| 251 |
+
clique := {0, 1, 4}
|
| 252 |
+
templates := [⟨0, 1, [], [], [], 3, 4⟩,
|
| 253 |
+
⟨0, 1, [], [], [2, 3, 4], 1, 1⟩,
|
| 254 |
+
⟨0, 2, [], [], [1], 2, 3⟩,
|
| 255 |
+
⟨0, 2, [], [], [3, 4], 1, 2⟩,
|
| 256 |
+
⟨0, 3, [], [], [2, 1], 1, 2⟩,
|
| 257 |
+
⟨0, 3, [], [], [4], 2, 3⟩,
|
| 258 |
+
⟨0, 4, [], [], [], 3, 4⟩,
|
| 259 |
+
⟨0, 4, [], [], [3, 2, 1], 1, 1⟩,
|
| 260 |
+
⟨1, 2, [], [], [3, 4], 1, 2⟩,
|
| 261 |
+
⟨1, 3, [], [], [4], 2, 3⟩,
|
| 262 |
+
⟨2, 3, [], [1], [4], 1, 2⟩,
|
| 263 |
+
⟨2, 4, [], [1], [], 2, 3⟩,
|
| 264 |
+
⟨3, 4, [], [1, 2], [], 1, 2⟩]
|
| 265 |
+
required := [⟨1, 2, []⟩,
|
| 266 |
+
⟨2, 3, []⟩]
|
| 267 |
+
closure := [k5t3p2_step_0, k5t3p2_step_1, k5t3p2_step_2, k5t3p2_step_3, k5t3p2_step_4, k5t3p2_step_5, k5t3p2_step_6]
|
| 268 |
+
bad := ⟨none, {(2, 1), (3, 1), (0, 1)}⟩
|
| 269 |
+
|
| 270 |
+
|
| 271 |
+
private def k5t3p2_state_0 : ForbiddenMatrix 5 :=
|
| 272 |
+
fun i j => ((#[#[∅, {1, 3, 4}, {1, 2, 3}, {1, 2, 3}, {1, 3, 4}],
|
| 273 |
+
#[{1, 3, 4}, ∅, {1, 2, 4}, {2, 3}, ∅],
|
| 274 |
+
#[{1, 2, 3}, {1, 2, 4}, ∅, {1, 2, 4}, {2, 3}],
|
| 275 |
+
#[{1, 2, 3}, {2, 3}, {1, 2, 4}, ∅, {1, 2}],
|
| 276 |
+
#[{1, 3, 4}, ∅, {2, 3}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 277 |
+
|
| 278 |
+
private theorem k5t3p2_initial_eq_row_0 : ∀ j : Fin 5, (k5t3p2.initialMatrix 5) 0 j = k5t3p2_state_0 0 j := by decide
|
| 279 |
+
|
| 280 |
+
private theorem k5t3p2_initial_eq_row_1 : ∀ j : Fin 5, (k5t3p2.initialMatrix 5) 1 j = k5t3p2_state_0 1 j := by decide
|
| 281 |
+
|
| 282 |
+
private theorem k5t3p2_initial_eq_row_2 : ∀ j : Fin 5, (k5t3p2.initialMatrix 5) 2 j = k5t3p2_state_0 2 j := by decide
|
| 283 |
+
|
| 284 |
+
private theorem k5t3p2_initial_eq_row_3 : ∀ j : Fin 5, (k5t3p2.initialMatrix 5) 3 j = k5t3p2_state_0 3 j := by decide
|
| 285 |
+
|
| 286 |
+
private theorem k5t3p2_initial_eq_row_4 : ∀ j : Fin 5, (k5t3p2.initialMatrix 5) 4 j = k5t3p2_state_0 4 j := by decide
|
| 287 |
+
|
| 288 |
+
private theorem k5t3p2_initial_eq : (k5t3p2.initialMatrix 5) = k5t3p2_state_0 := by
|
| 289 |
+
funext i j
|
| 290 |
+
fin_cases i
|
| 291 |
+
|
| 292 |
+
· exact k5t3p2_initial_eq_row_0 j
|
| 293 |
+
|
| 294 |
+
· exact k5t3p2_initial_eq_row_1 j
|
| 295 |
+
|
| 296 |
+
· exact k5t3p2_initial_eq_row_2 j
|
| 297 |
+
|
| 298 |
+
· exact k5t3p2_initial_eq_row_3 j
|
| 299 |
+
|
| 300 |
+
· exact k5t3p2_initial_eq_row_4 j
|
| 301 |
+
|
| 302 |
+
private def k5t3p2_state_1 : ForbiddenMatrix 5 :=
|
| 303 |
+
fun i j => ((#[#[∅, {1, 3, 4}, {1, 2, 3}, {1, 2, 3}, {1, 3, 4}],
|
| 304 |
+
#[{1, 3, 4}, ∅, {1, 2, 4}, {0, 2, 3}, ∅],
|
| 305 |
+
#[{1, 2, 3}, {1, 2, 4}, ∅, {1, 2, 4}, {2, 3}],
|
| 306 |
+
#[{1, 2, 3}, {0, 2, 3}, {1, 2, 4}, ∅, {1, 2}],
|
| 307 |
+
#[{1, 3, 4}, ∅, {2, 3}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 308 |
+
|
| 309 |
+
private def k5t3p2_local_0 : ForbiddenMatrix 5 :=
|
| 310 |
+
fun i j => ((#[#[∅, {1, 3, 4}, {1, 2, 3}, {1, 2, 3}, {1, 3, 4}],
|
| 311 |
+
#[{1, 3, 4}, ∅, {1, 2, 4}, {2, 3}, ∅],
|
| 312 |
+
#[{1, 2, 3}, {1, 2, 4}, ∅, Finset.Icc 1 4, {1, 2, 3}],
|
| 313 |
+
#[{1, 2, 3}, {2, 3}, Finset.Icc 1 4, ∅, {1, 2, 3}],
|
| 314 |
+
#[{1, 3, 4}, ∅, {1, 2, 3}, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 315 |
+
|
| 316 |
+
private theorem k5t3p2_local_0_eq_row_0 : ∀ j : Fin 5, (fun a b => k5t3p2_state_0 a b ∪ requiredMatrix 5 k5t3p2_step_0_data.required a b) 0 j = k5t3p2_local_0 0 j := by decide
|
| 317 |
+
|
| 318 |
+
private theorem k5t3p2_local_0_eq_row_1 : ∀ j : Fin 5, (fun a b => k5t3p2_state_0 a b ∪ requiredMatrix 5 k5t3p2_step_0_data.required a b) 1 j = k5t3p2_local_0 1 j := by decide
|
| 319 |
+
|
| 320 |
+
private theorem k5t3p2_local_0_eq_row_2 : ∀ j : Fin 5, (fun a b => k5t3p2_state_0 a b ∪ requiredMatrix 5 k5t3p2_step_0_data.required a b) 2 j = k5t3p2_local_0 2 j := by decide
|
| 321 |
+
|
| 322 |
+
private theorem k5t3p2_local_0_eq_row_3 : ∀ j : Fin 5, (fun a b => k5t3p2_state_0 a b ∪ requiredMatrix 5 k5t3p2_step_0_data.required a b) 3 j = k5t3p2_local_0 3 j := by decide
|
| 323 |
+
|
| 324 |
+
private theorem k5t3p2_local_0_eq_row_4 : ∀ j : Fin 5, (fun a b => k5t3p2_state_0 a b ∪ requiredMatrix 5 k5t3p2_step_0_data.required a b) 4 j = k5t3p2_local_0 4 j := by decide
|
| 325 |
+
|
| 326 |
+
private theorem k5t3p2_local_0_eq : (fun a b => k5t3p2_state_0 a b ∪ requiredMatrix 5 k5t3p2_step_0_data.required a b) = k5t3p2_local_0 := by
|
| 327 |
+
funext i j
|
| 328 |
+
fin_cases i
|
| 329 |
+
|
| 330 |
+
· exact k5t3p2_local_0_eq_row_0 j
|
| 331 |
+
|
| 332 |
+
· exact k5t3p2_local_0_eq_row_1 j
|
| 333 |
+
|
| 334 |
+
· exact k5t3p2_local_0_eq_row_2 j
|
| 335 |
+
|
| 336 |
+
· exact k5t3p2_local_0_eq_row_3 j
|
| 337 |
+
|
| 338 |
+
· exact k5t3p2_local_0_eq_row_4 j
|
| 339 |
+
|
| 340 |
+
private theorem k5t3p2_local_0_paths : ∀ p ∈ k5t3p2_step_0_data.required, p.Check (addedEdgeGraph k5t3p2.graph k5t3p2_step_0_data.i k5t3p2_step_0_data.j) 5 := by decide
|
| 341 |
+
|
| 342 |
+
private theorem k5t3p2_local_0_bad : k5t3p2_step_0_data.bad.Check (addedEdgeGraph k5t3p2.graph k5t3p2_step_0_data.i k5t3p2_step_0_data.j) k5t3p2_local_0 5 3 := by decide
|
| 343 |
+
|
| 344 |
+
private theorem k5t3p2_step_0_check : k5t3p2_step_0.Check k5t3p2.graph k5t3p2_state_0 5 3 := by
|
| 345 |
+
change k5t3p2_step_0_data.Check k5t3p2.graph k5t3p2_state_0 5 3
|
| 346 |
+
refine ⟨k5t3p2_local_0_paths, ?_⟩
|
| 347 |
+
rw [k5t3p2_local_0_eq]
|
| 348 |
+
exact k5t3p2_local_0_bad
|
| 349 |
+
|
| 350 |
+
private theorem k5t3p2_update_0 : k5t3p2_step_0.apply k5t3p2_state_0 = k5t3p2_state_1 := by
|
| 351 |
+
have h : ∀ i j : Fin 5, k5t3p2_step_0.apply k5t3p2_state_0 i j = k5t3p2_state_1 i j := by decide
|
| 352 |
+
exact funext (fun i => funext (h i))
|
| 353 |
+
|
| 354 |
+
private def k5t3p2_state_2 : ForbiddenMatrix 5 :=
|
| 355 |
+
fun i j => ((#[#[∅, {1, 3, 4}, {1, 2, 3}, {1, 2, 3}, {1, 3, 4}],
|
| 356 |
+
#[{1, 3, 4}, ∅, {1, 2, 4}, {0, 2, 3}, ∅],
|
| 357 |
+
#[{1, 2, 3}, {1, 2, 4}, ∅, {1, 2, 4}, {0, 2, 3}],
|
| 358 |
+
#[{1, 2, 3}, {0, 2, 3}, {1, 2, 4}, ∅, {1, 2}],
|
| 359 |
+
#[{1, 3, 4}, ∅, {0, 2, 3}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 360 |
+
|
| 361 |
+
private def k5t3p2_local_1 : ForbiddenMatrix 5 :=
|
| 362 |
+
fun i j => ((#[#[∅, Finset.Icc 1 4, {1, 2, 3}, {1, 2, 3}, {1, 3, 4}],
|
| 363 |
+
#[Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 0 3, ∅],
|
| 364 |
+
#[{1, 2, 3}, Finset.Icc 1 4, ∅, Finset.Icc 1 4, {2, 3}],
|
| 365 |
+
#[{1, 2, 3}, Finset.Icc 0 3, Finset.Icc 1 4, ∅, {1, 2}],
|
| 366 |
+
#[{1, 3, 4}, ∅, {2, 3}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 367 |
+
|
| 368 |
+
private theorem k5t3p2_local_1_eq_row_0 : ∀ j : Fin 5, (fun a b => k5t3p2_state_1 a b ∪ requiredMatrix 5 k5t3p2_step_1_data.required a b) 0 j = k5t3p2_local_1 0 j := by decide
|
| 369 |
+
|
| 370 |
+
private theorem k5t3p2_local_1_eq_row_1 : ∀ j : Fin 5, (fun a b => k5t3p2_state_1 a b ∪ requiredMatrix 5 k5t3p2_step_1_data.required a b) 1 j = k5t3p2_local_1 1 j := by decide
|
| 371 |
+
|
| 372 |
+
private theorem k5t3p2_local_1_eq_row_2 : ∀ j : Fin 5, (fun a b => k5t3p2_state_1 a b ∪ requiredMatrix 5 k5t3p2_step_1_data.required a b) 2 j = k5t3p2_local_1 2 j := by decide
|
| 373 |
+
|
| 374 |
+
private theorem k5t3p2_local_1_eq_row_3 : ∀ j : Fin 5, (fun a b => k5t3p2_state_1 a b ∪ requiredMatrix 5 k5t3p2_step_1_data.required a b) 3 j = k5t3p2_local_1 3 j := by decide
|
| 375 |
+
|
| 376 |
+
private theorem k5t3p2_local_1_eq_row_4 : ∀ j : Fin 5, (fun a b => k5t3p2_state_1 a b ∪ requiredMatrix 5 k5t3p2_step_1_data.required a b) 4 j = k5t3p2_local_1 4 j := by decide
|
| 377 |
+
|
| 378 |
+
private theorem k5t3p2_local_1_eq : (fun a b => k5t3p2_state_1 a b ∪ requiredMatrix 5 k5t3p2_step_1_data.required a b) = k5t3p2_local_1 := by
|
| 379 |
+
funext i j
|
| 380 |
+
fin_cases i
|
| 381 |
+
|
| 382 |
+
· exact k5t3p2_local_1_eq_row_0 j
|
| 383 |
+
|
| 384 |
+
· exact k5t3p2_local_1_eq_row_1 j
|
| 385 |
+
|
| 386 |
+
· exact k5t3p2_local_1_eq_row_2 j
|
| 387 |
+
|
| 388 |
+
· exact k5t3p2_local_1_eq_row_3 j
|
| 389 |
+
|
| 390 |
+
· exact k5t3p2_local_1_eq_row_4 j
|
| 391 |
+
|
| 392 |
+
private theorem k5t3p2_local_1_paths : ∀ p ∈ k5t3p2_step_1_data.required, p.Check (addedEdgeGraph k5t3p2.graph k5t3p2_step_1_data.i k5t3p2_step_1_data.j) 5 := by decide
|
| 393 |
+
|
| 394 |
+
private theorem k5t3p2_local_1_bad : k5t3p2_step_1_data.bad.Check (addedEdgeGraph k5t3p2.graph k5t3p2_step_1_data.i k5t3p2_step_1_data.j) k5t3p2_local_1 5 3 := by decide
|
| 395 |
+
|
| 396 |
+
private theorem k5t3p2_step_1_check : k5t3p2_step_1.Check k5t3p2.graph k5t3p2_state_1 5 3 := by
|
| 397 |
+
change k5t3p2_step_1_data.Check k5t3p2.graph k5t3p2_state_1 5 3
|
| 398 |
+
refine ⟨k5t3p2_local_1_paths, ?_⟩
|
| 399 |
+
rw [k5t3p2_local_1_eq]
|
| 400 |
+
exact k5t3p2_local_1_bad
|
| 401 |
+
|
| 402 |
+
private theorem k5t3p2_update_1 : k5t3p2_step_1.apply k5t3p2_state_1 = k5t3p2_state_2 := by
|
| 403 |
+
have h : ∀ i j : Fin 5, k5t3p2_step_1.apply k5t3p2_state_1 i j = k5t3p2_state_2 i j := by decide
|
| 404 |
+
exact funext (fun i => funext (h i))
|
| 405 |
+
|
| 406 |
+
private def k5t3p2_state_3 : ForbiddenMatrix 5 :=
|
| 407 |
+
fun i j => ((#[#[∅, {1, 3, 4}, {1, 2, 3}, {1, 2, 3}, {1, 3, 4}],
|
| 408 |
+
#[{1, 3, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3, ∅],
|
| 409 |
+
#[{1, 2, 3}, {1, 2, 4}, ∅, {1, 2, 4}, {0, 2, 3}],
|
| 410 |
+
#[{1, 2, 3}, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2}],
|
| 411 |
+
#[{1, 3, 4}, ∅, {0, 2, 3}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 412 |
+
|
| 413 |
+
private def k5t3p2_local_2 : ForbiddenMatrix 6 :=
|
| 414 |
+
fun i j => ((#[#[∅, {0}, ∅, {0, 1}, {1}, {0, 1}],
|
| 415 |
+
#[{0}, ∅, {1, 3, 4}, Finset.Icc 0 3, {1, 2, 3}, {1, 3, 4}],
|
| 416 |
+
#[∅, {1, 3, 4}, ∅, {1, 2, 4}, {0, 2, 3}, ∅],
|
| 417 |
+
#[{0, 1}, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3],
|
| 418 |
+
#[{1}, {1, 2, 3}, {0, 2, 3}, {1, 2, 4}, ∅, {1, 2}],
|
| 419 |
+
#[{0, 1}, {1, 3, 4}, ∅, Finset.Icc 0 3, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 420 |
+
|
| 421 |
+
private theorem k5t3p2_local_2_eq_row_0 : ∀ j : Fin 6, (fun a b => freshMatrix k5t3p2_state_2 a b ∪ requiredMatrix 5 k5t3p2_step_2_data.required a b) 0 j = k5t3p2_local_2 0 j := by decide
|
| 422 |
+
|
| 423 |
+
private theorem k5t3p2_local_2_eq_row_1 : ∀ j : Fin 6, (fun a b => freshMatrix k5t3p2_state_2 a b ∪ requiredMatrix 5 k5t3p2_step_2_data.required a b) 1 j = k5t3p2_local_2 1 j := by decide
|
| 424 |
+
|
| 425 |
+
private theorem k5t3p2_local_2_eq_row_2 : ∀ j : Fin 6, (fun a b => freshMatrix k5t3p2_state_2 a b ∪ requiredMatrix 5 k5t3p2_step_2_data.required a b) 2 j = k5t3p2_local_2 2 j := by decide
|
| 426 |
+
|
| 427 |
+
private theorem k5t3p2_local_2_eq_row_3 : ∀ j : Fin 6, (fun a b => freshMatrix k5t3p2_state_2 a b ∪ requiredMatrix 5 k5t3p2_step_2_data.required a b) 3 j = k5t3p2_local_2 3 j := by decide
|
| 428 |
+
|
| 429 |
+
private theorem k5t3p2_local_2_eq_row_4 : ∀ j : Fin 6, (fun a b => freshMatrix k5t3p2_state_2 a b ∪ requiredMatrix 5 k5t3p2_step_2_data.required a b) 4 j = k5t3p2_local_2 4 j := by decide
|
| 430 |
+
|
| 431 |
+
private theorem k5t3p2_local_2_eq_row_5 : ∀ j : Fin 6, (fun a b => freshMatrix k5t3p2_state_2 a b ∪ requiredMatrix 5 k5t3p2_step_2_data.required a b) 5 j = k5t3p2_local_2 5 j := by decide
|
| 432 |
+
|
| 433 |
+
private theorem k5t3p2_local_2_eq : (fun a b => freshMatrix k5t3p2_state_2 a b ∪ requiredMatrix 5 k5t3p2_step_2_data.required a b) = k5t3p2_local_2 := by
|
| 434 |
+
funext i j
|
| 435 |
+
fin_cases i
|
| 436 |
+
|
| 437 |
+
· exact k5t3p2_local_2_eq_row_0 j
|
| 438 |
+
|
| 439 |
+
· exact k5t3p2_local_2_eq_row_1 j
|
| 440 |
+
|
| 441 |
+
· exact k5t3p2_local_2_eq_row_2 j
|
| 442 |
+
|
| 443 |
+
· exact k5t3p2_local_2_eq_row_3 j
|
| 444 |
+
|
| 445 |
+
· exact k5t3p2_local_2_eq_row_4 j
|
| 446 |
+
|
| 447 |
+
· exact k5t3p2_local_2_eq_row_5 j
|
| 448 |
+
|
| 449 |
+
private theorem k5t3p2_local_2_paths : ∀ p ∈ k5t3p2_step_2_data.required, p.Check (freshGraph k5t3p2.graph k5t3p2_step_2_data.i k5t3p2_step_2_data.j) 5 := by decide
|
| 450 |
+
|
| 451 |
+
private theorem k5t3p2_local_2_bad : k5t3p2_step_2_data.bad.Check (freshGraph k5t3p2.graph k5t3p2_step_2_data.i k5t3p2_step_2_data.j) k5t3p2_local_2 5 3 := by decide
|
| 452 |
+
|
| 453 |
+
private theorem k5t3p2_step_2_check : k5t3p2_step_2.Check k5t3p2.graph k5t3p2_state_2 5 3 := by
|
| 454 |
+
change k5t3p2_step_2_data.Check k5t3p2.graph k5t3p2_state_2 5 3
|
| 455 |
+
refine ⟨by decide, k5t3p2_local_2_paths, ?_⟩
|
| 456 |
+
rw [k5t3p2_local_2_eq]
|
| 457 |
+
exact k5t3p2_local_2_bad
|
| 458 |
+
|
| 459 |
+
private theorem k5t3p2_update_2 : k5t3p2_step_2.apply k5t3p2_state_2 = k5t3p2_state_3 := by
|
| 460 |
+
have h : ∀ i j : Fin 5, k5t3p2_step_2.apply k5t3p2_state_2 i j = k5t3p2_state_3 i j := by decide
|
| 461 |
+
exact funext (fun i => funext (h i))
|
| 462 |
+
|
| 463 |
+
private def k5t3p2_state_4 : ForbiddenMatrix 5 :=
|
| 464 |
+
fun i j => ((#[#[∅, {1, 3, 4}, {1, 2, 3}, {1, 2, 3}, {1, 3, 4}],
|
| 465 |
+
#[{1, 3, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3, {1}],
|
| 466 |
+
#[{1, 2, 3}, {1, 2, 4}, ∅, {1, 2, 4}, {0, 2, 3}],
|
| 467 |
+
#[{1, 2, 3}, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2}],
|
| 468 |
+
#[{1, 3, 4}, {1}, {0, 2, 3}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 469 |
+
|
| 470 |
+
private def k5t3p2_local_3 : ForbiddenMatrix 6 :=
|
| 471 |
+
fun i j => ((#[#[∅, {0}, ∅, {0}, {0}, ∅],
|
| 472 |
+
#[{0}, ∅, {1, 3, 4}, Finset.Icc 0 3, Finset.Icc 0 3, {1, 3, 4}],
|
| 473 |
+
#[∅, {1, 3, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3, ∅],
|
| 474 |
+
#[{0}, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2, 4}, {0, 2, 3}],
|
| 475 |
+
#[{0}, Finset.Icc 0 3, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2}],
|
| 476 |
+
#[∅, {1, 3, 4}, ∅, {0, 2, 3}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 477 |
+
|
| 478 |
+
private theorem k5t3p2_local_3_eq_row_0 : ∀ j : Fin 6, (fun a b => freshMatrix k5t3p2_state_3 a b ∪ requiredMatrix 5 k5t3p2_step_3_data.required a b) 0 j = k5t3p2_local_3 0 j := by decide
|
| 479 |
+
|
| 480 |
+
private theorem k5t3p2_local_3_eq_row_1 : ∀ j : Fin 6, (fun a b => freshMatrix k5t3p2_state_3 a b ∪ requiredMatrix 5 k5t3p2_step_3_data.required a b) 1 j = k5t3p2_local_3 1 j := by decide
|
| 481 |
+
|
| 482 |
+
private theorem k5t3p2_local_3_eq_row_2 : ∀ j : Fin 6, (fun a b => freshMatrix k5t3p2_state_3 a b ∪ requiredMatrix 5 k5t3p2_step_3_data.required a b) 2 j = k5t3p2_local_3 2 j := by decide
|
| 483 |
+
|
| 484 |
+
private theorem k5t3p2_local_3_eq_row_3 : ∀ j : Fin 6, (fun a b => freshMatrix k5t3p2_state_3 a b ∪ requiredMatrix 5 k5t3p2_step_3_data.required a b) 3 j = k5t3p2_local_3 3 j := by decide
|
| 485 |
+
|
| 486 |
+
private theorem k5t3p2_local_3_eq_row_4 : ∀ j : Fin 6, (fun a b => freshMatrix k5t3p2_state_3 a b ∪ requiredMatrix 5 k5t3p2_step_3_data.required a b) 4 j = k5t3p2_local_3 4 j := by decide
|
| 487 |
+
|
| 488 |
+
private theorem k5t3p2_local_3_eq_row_5 : ∀ j : Fin 6, (fun a b => freshMatrix k5t3p2_state_3 a b ∪ requiredMatrix 5 k5t3p2_step_3_data.required a b) 5 j = k5t3p2_local_3 5 j := by decide
|
| 489 |
+
|
| 490 |
+
private theorem k5t3p2_local_3_eq : (fun a b => freshMatrix k5t3p2_state_3 a b ∪ requiredMatrix 5 k5t3p2_step_3_data.required a b) = k5t3p2_local_3 := by
|
| 491 |
+
funext i j
|
| 492 |
+
fin_cases i
|
| 493 |
+
|
| 494 |
+
· exact k5t3p2_local_3_eq_row_0 j
|
| 495 |
+
|
| 496 |
+
· exact k5t3p2_local_3_eq_row_1 j
|
| 497 |
+
|
| 498 |
+
· exact k5t3p2_local_3_eq_row_2 j
|
| 499 |
+
|
| 500 |
+
· exact k5t3p2_local_3_eq_row_3 j
|
| 501 |
+
|
| 502 |
+
· exact k5t3p2_local_3_eq_row_4 j
|
| 503 |
+
|
| 504 |
+
· exact k5t3p2_local_3_eq_row_5 j
|
| 505 |
+
|
| 506 |
+
private theorem k5t3p2_local_3_paths : ∀ p ∈ k5t3p2_step_3_data.required, p.Check (freshGraph k5t3p2.graph k5t3p2_step_3_data.i k5t3p2_step_3_data.j) 5 := by decide
|
| 507 |
+
|
| 508 |
+
private theorem k5t3p2_local_3_bad : k5t3p2_step_3_data.bad.Check (freshGraph k5t3p2.graph k5t3p2_step_3_data.i k5t3p2_step_3_data.j) k5t3p2_local_3 5 3 := by decide
|
| 509 |
+
|
| 510 |
+
private theorem k5t3p2_step_3_check : k5t3p2_step_3.Check k5t3p2.graph k5t3p2_state_3 5 3 := by
|
| 511 |
+
change k5t3p2_step_3_data.Check k5t3p2.graph k5t3p2_state_3 5 3
|
| 512 |
+
refine ⟨by decide, k5t3p2_local_3_paths, ?_⟩
|
| 513 |
+
rw [k5t3p2_local_3_eq]
|
| 514 |
+
exact k5t3p2_local_3_bad
|
| 515 |
+
|
| 516 |
+
private theorem k5t3p2_update_3 : k5t3p2_step_3.apply k5t3p2_state_3 = k5t3p2_state_4 := by
|
| 517 |
+
have h : ∀ i j : Fin 5, k5t3p2_step_3.apply k5t3p2_state_3 i j = k5t3p2_state_4 i j := by decide
|
| 518 |
+
exact funext (fun i => funext (h i))
|
| 519 |
+
|
| 520 |
+
private def k5t3p2_state_5 : ForbiddenMatrix 5 :=
|
| 521 |
+
fun i j => ((#[#[∅, {1, 3, 4}, {1, 2, 3}, {1, 2, 3}, {1, 3, 4}],
|
| 522 |
+
#[{1, 3, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3, {1}],
|
| 523 |
+
#[{1, 2, 3}, {1, 2, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3],
|
| 524 |
+
#[{1, 2, 3}, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2}],
|
| 525 |
+
#[{1, 3, 4}, {1}, Finset.Icc 0 3, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 526 |
+
|
| 527 |
+
private def k5t3p2_local_4 : ForbiddenMatrix 6 :=
|
| 528 |
+
fun i j => ((#[#[∅, {0}, {0, 1}, {1}, {0, 1}, ∅],
|
| 529 |
+
#[{0}, ∅, {1, 3, 4}, {1, 2, 3}, Finset.Icc 0 3, {1, 3, 4}],
|
| 530 |
+
#[{0, 1}, {1, 3, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3, {1}],
|
| 531 |
+
#[{1}, {1, 2, 3}, {1, 2, 4}, ∅, {1, 2, 4}, {0, 2, 3}],
|
| 532 |
+
#[{0, 1}, Finset.Icc 0 3, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2}],
|
| 533 |
+
#[∅, {1, 3, 4}, {1}, {0, 2, 3}, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 534 |
+
|
| 535 |
+
private theorem k5t3p2_local_4_eq_row_0 : ∀ j : Fin 6, (fun a b => freshMatrix k5t3p2_state_4 a b ∪ requiredMatrix 5 k5t3p2_step_4_data.required a b) 0 j = k5t3p2_local_4 0 j := by decide
|
| 536 |
+
|
| 537 |
+
private theorem k5t3p2_local_4_eq_row_1 : ∀ j : Fin 6, (fun a b => freshMatrix k5t3p2_state_4 a b ∪ requiredMatrix 5 k5t3p2_step_4_data.required a b) 1 j = k5t3p2_local_4 1 j := by decide
|
| 538 |
+
|
| 539 |
+
private theorem k5t3p2_local_4_eq_row_2 : ∀ j : Fin 6, (fun a b => freshMatrix k5t3p2_state_4 a b ∪ requiredMatrix 5 k5t3p2_step_4_data.required a b) 2 j = k5t3p2_local_4 2 j := by decide
|
| 540 |
+
|
| 541 |
+
private theorem k5t3p2_local_4_eq_row_3 : ∀ j : Fin 6, (fun a b => freshMatrix k5t3p2_state_4 a b ∪ requiredMatrix 5 k5t3p2_step_4_data.required a b) 3 j = k5t3p2_local_4 3 j := by decide
|
| 542 |
+
|
| 543 |
+
private theorem k5t3p2_local_4_eq_row_4 : ∀ j : Fin 6, (fun a b => freshMatrix k5t3p2_state_4 a b ∪ requiredMatrix 5 k5t3p2_step_4_data.required a b) 4 j = k5t3p2_local_4 4 j := by decide
|
| 544 |
+
|
| 545 |
+
private theorem k5t3p2_local_4_eq_row_5 : ∀ j : Fin 6, (fun a b => freshMatrix k5t3p2_state_4 a b ∪ requiredMatrix 5 k5t3p2_step_4_data.required a b) 5 j = k5t3p2_local_4 5 j := by decide
|
| 546 |
+
|
| 547 |
+
private theorem k5t3p2_local_4_eq : (fun a b => freshMatrix k5t3p2_state_4 a b ∪ requiredMatrix 5 k5t3p2_step_4_data.required a b) = k5t3p2_local_4 := by
|
| 548 |
+
funext i j
|
| 549 |
+
fin_cases i
|
| 550 |
+
|
| 551 |
+
· exact k5t3p2_local_4_eq_row_0 j
|
| 552 |
+
|
| 553 |
+
· exact k5t3p2_local_4_eq_row_1 j
|
| 554 |
+
|
| 555 |
+
· exact k5t3p2_local_4_eq_row_2 j
|
| 556 |
+
|
| 557 |
+
· exact k5t3p2_local_4_eq_row_3 j
|
| 558 |
+
|
| 559 |
+
· exact k5t3p2_local_4_eq_row_4 j
|
| 560 |
+
|
| 561 |
+
· exact k5t3p2_local_4_eq_row_5 j
|
| 562 |
+
|
| 563 |
+
private theorem k5t3p2_local_4_paths : ∀ p ∈ k5t3p2_step_4_data.required, p.Check (freshGraph k5t3p2.graph k5t3p2_step_4_data.i k5t3p2_step_4_data.j) 5 := by decide
|
| 564 |
+
|
| 565 |
+
private theorem k5t3p2_local_4_bad : k5t3p2_step_4_data.bad.Check (freshGraph k5t3p2.graph k5t3p2_step_4_data.i k5t3p2_step_4_data.j) k5t3p2_local_4 5 3 := by decide
|
| 566 |
+
|
| 567 |
+
private theorem k5t3p2_step_4_check : k5t3p2_step_4.Check k5t3p2.graph k5t3p2_state_4 5 3 := by
|
| 568 |
+
change k5t3p2_step_4_data.Check k5t3p2.graph k5t3p2_state_4 5 3
|
| 569 |
+
refine ⟨by decide, k5t3p2_local_4_paths, ?_⟩
|
| 570 |
+
rw [k5t3p2_local_4_eq]
|
| 571 |
+
exact k5t3p2_local_4_bad
|
| 572 |
+
|
| 573 |
+
private theorem k5t3p2_update_4 : k5t3p2_step_4.apply k5t3p2_state_4 = k5t3p2_state_5 := by
|
| 574 |
+
have h : ∀ i j : Fin 5, k5t3p2_step_4.apply k5t3p2_state_4 i j = k5t3p2_state_5 i j := by decide
|
| 575 |
+
exact funext (fun i => funext (h i))
|
| 576 |
+
|
| 577 |
+
private def k5t3p2_state_6 : ForbiddenMatrix 5 :=
|
| 578 |
+
fun i j => ((#[#[∅, {1, 3, 4}, Finset.Icc 0 3, {1, 2, 3}, {1, 3, 4}],
|
| 579 |
+
#[{1, 3, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3, {1}],
|
| 580 |
+
#[Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3],
|
| 581 |
+
#[{1, 2, 3}, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2}],
|
| 582 |
+
#[{1, 3, 4}, {1}, Finset.Icc 0 3, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 583 |
+
|
| 584 |
+
private def k5t3p2_local_5 : ForbiddenMatrix 5 :=
|
| 585 |
+
fun i j => ((#[#[∅, {1, 3, 4}, Finset.Icc 1 4, {1, 2, 3}, Finset.Icc 1 4],
|
| 586 |
+
#[{1, 3, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3, {1}],
|
| 587 |
+
#[Finset.Icc 1 4, {1, 2, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3],
|
| 588 |
+
#[{1, 2, 3}, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2}],
|
| 589 |
+
#[Finset.Icc 1 4, {1}, Finset.Icc 0 3, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 590 |
+
|
| 591 |
+
private theorem k5t3p2_local_5_eq_row_0 : ∀ j : Fin 5, (fun a b => k5t3p2_state_5 a b ∪ requiredMatrix 5 k5t3p2_step_5_data.required a b) 0 j = k5t3p2_local_5 0 j := by decide
|
| 592 |
+
|
| 593 |
+
private theorem k5t3p2_local_5_eq_row_1 : ∀ j : Fin 5, (fun a b => k5t3p2_state_5 a b ∪ requiredMatrix 5 k5t3p2_step_5_data.required a b) 1 j = k5t3p2_local_5 1 j := by decide
|
| 594 |
+
|
| 595 |
+
private theorem k5t3p2_local_5_eq_row_2 : ∀ j : Fin 5, (fun a b => k5t3p2_state_5 a b ∪ requiredMatrix 5 k5t3p2_step_5_data.required a b) 2 j = k5t3p2_local_5 2 j := by decide
|
| 596 |
+
|
| 597 |
+
private theorem k5t3p2_local_5_eq_row_3 : ∀ j : Fin 5, (fun a b => k5t3p2_state_5 a b ∪ requiredMatrix 5 k5t3p2_step_5_data.required a b) 3 j = k5t3p2_local_5 3 j := by decide
|
| 598 |
+
|
| 599 |
+
private theorem k5t3p2_local_5_eq_row_4 : ∀ j : Fin 5, (fun a b => k5t3p2_state_5 a b ∪ requiredMatrix 5 k5t3p2_step_5_data.required a b) 4 j = k5t3p2_local_5 4 j := by decide
|
| 600 |
+
|
| 601 |
+
private theorem k5t3p2_local_5_eq : (fun a b => k5t3p2_state_5 a b ∪ requiredMatrix 5 k5t3p2_step_5_data.required a b) = k5t3p2_local_5 := by
|
| 602 |
+
funext i j
|
| 603 |
+
fin_cases i
|
| 604 |
+
|
| 605 |
+
· exact k5t3p2_local_5_eq_row_0 j
|
| 606 |
+
|
| 607 |
+
· exact k5t3p2_local_5_eq_row_1 j
|
| 608 |
+
|
| 609 |
+
· exact k5t3p2_local_5_eq_row_2 j
|
| 610 |
+
|
| 611 |
+
· exact k5t3p2_local_5_eq_row_3 j
|
| 612 |
+
|
| 613 |
+
· exact k5t3p2_local_5_eq_row_4 j
|
| 614 |
+
|
| 615 |
+
private theorem k5t3p2_local_5_paths : ∀ p ∈ k5t3p2_step_5_data.required, p.Check (addedEdgeGraph k5t3p2.graph k5t3p2_step_5_data.i k5t3p2_step_5_data.j) 5 := by decide
|
| 616 |
+
|
| 617 |
+
private theorem k5t3p2_local_5_bad : k5t3p2_step_5_data.bad.Check (addedEdgeGraph k5t3p2.graph k5t3p2_step_5_data.i k5t3p2_step_5_data.j) k5t3p2_local_5 5 3 := by decide
|
| 618 |
+
|
| 619 |
+
private theorem k5t3p2_step_5_check : k5t3p2_step_5.Check k5t3p2.graph k5t3p2_state_5 5 3 := by
|
| 620 |
+
change k5t3p2_step_5_data.Check k5t3p2.graph k5t3p2_state_5 5 3
|
| 621 |
+
refine ⟨k5t3p2_local_5_paths, ?_⟩
|
| 622 |
+
rw [k5t3p2_local_5_eq]
|
| 623 |
+
exact k5t3p2_local_5_bad
|
| 624 |
+
|
| 625 |
+
private theorem k5t3p2_update_5 : k5t3p2_step_5.apply k5t3p2_state_5 = k5t3p2_state_6 := by
|
| 626 |
+
have h : ∀ i j : Fin 5, k5t3p2_step_5.apply k5t3p2_state_5 i j = k5t3p2_state_6 i j := by decide
|
| 627 |
+
exact funext (fun i => funext (h i))
|
| 628 |
+
|
| 629 |
+
private def k5t3p2_state_7 : ForbiddenMatrix 5 :=
|
| 630 |
+
fun i j => ((#[#[∅, {1, 3, 4}, Finset.Icc 0 3, Finset.Icc 0 3, {1, 3, 4}],
|
| 631 |
+
#[{1, 3, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3, {1}],
|
| 632 |
+
#[Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3],
|
| 633 |
+
#[Finset.Icc 0 3, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2}],
|
| 634 |
+
#[{1, 3, 4}, {1}, Finset.Icc 0 3, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 635 |
+
|
| 636 |
+
private def k5t3p2_local_6 : ForbiddenMatrix 5 :=
|
| 637 |
+
fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 0 3, {1, 2, 3}, {1, 3, 4}],
|
| 638 |
+
#[Finset.Icc 1 4, ∅, {1, 2, 4}, Finset.Icc 0 3, {1}],
|
| 639 |
+
#[Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2, 4}, Finset.Icc 0 3],
|
| 640 |
+
#[{1, 2, 3}, Finset.Icc 0 3, {1, 2, 4}, ∅, {1, 2}],
|
| 641 |
+
#[{1, 3, 4}, {1}, Finset.Icc 0 3, {1, 2}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 642 |
+
|
| 643 |
+
private theorem k5t3p2_local_6_eq_row_0 : ∀ j : Fin 5, (fun a b => k5t3p2_state_6 a b ∪ requiredMatrix 5 k5t3p2_step_6_data.required a b) 0 j = k5t3p2_local_6 0 j := by decide
|
| 644 |
+
|
| 645 |
+
private theorem k5t3p2_local_6_eq_row_1 : ∀ j : Fin 5, (fun a b => k5t3p2_state_6 a b ∪ requiredMatrix 5 k5t3p2_step_6_data.required a b) 1 j = k5t3p2_local_6 1 j := by decide
|
| 646 |
+
|
| 647 |
+
private theorem k5t3p2_local_6_eq_row_2 : ∀ j : Fin 5, (fun a b => k5t3p2_state_6 a b ∪ requiredMatrix 5 k5t3p2_step_6_data.required a b) 2 j = k5t3p2_local_6 2 j := by decide
|
| 648 |
+
|
| 649 |
+
private theorem k5t3p2_local_6_eq_row_3 : ∀ j : Fin 5, (fun a b => k5t3p2_state_6 a b ∪ requiredMatrix 5 k5t3p2_step_6_data.required a b) 3 j = k5t3p2_local_6 3 j := by decide
|
| 650 |
+
|
| 651 |
+
private theorem k5t3p2_local_6_eq_row_4 : ∀ j : Fin 5, (fun a b => k5t3p2_state_6 a b ∪ requiredMatrix 5 k5t3p2_step_6_data.required a b) 4 j = k5t3p2_local_6 4 j := by decide
|
| 652 |
+
|
| 653 |
+
private theorem k5t3p2_local_6_eq : (fun a b => k5t3p2_state_6 a b ∪ requiredMatrix 5 k5t3p2_step_6_data.required a b) = k5t3p2_local_6 := by
|
| 654 |
+
funext i j
|
| 655 |
+
fin_cases i
|
| 656 |
+
|
| 657 |
+
· exact k5t3p2_local_6_eq_row_0 j
|
| 658 |
+
|
| 659 |
+
· exact k5t3p2_local_6_eq_row_1 j
|
| 660 |
+
|
| 661 |
+
· exact k5t3p2_local_6_eq_row_2 j
|
| 662 |
+
|
| 663 |
+
· exact k5t3p2_local_6_eq_row_3 j
|
| 664 |
+
|
| 665 |
+
· exact k5t3p2_local_6_eq_row_4 j
|
| 666 |
+
|
| 667 |
+
private theorem k5t3p2_local_6_paths : ∀ p ∈ k5t3p2_step_6_data.required, p.Check (addedEdgeGraph k5t3p2.graph k5t3p2_step_6_data.i k5t3p2_step_6_data.j) 5 := by decide
|
| 668 |
+
|
| 669 |
+
private theorem k5t3p2_local_6_bad : k5t3p2_step_6_data.bad.Check (addedEdgeGraph k5t3p2.graph k5t3p2_step_6_data.i k5t3p2_step_6_data.j) k5t3p2_local_6 5 3 := by decide
|
| 670 |
+
|
| 671 |
+
private theorem k5t3p2_step_6_check : k5t3p2_step_6.Check k5t3p2.graph k5t3p2_state_6 5 3 := by
|
| 672 |
+
change k5t3p2_step_6_data.Check k5t3p2.graph k5t3p2_state_6 5 3
|
| 673 |
+
refine ⟨k5t3p2_local_6_paths, ?_⟩
|
| 674 |
+
rw [k5t3p2_local_6_eq]
|
| 675 |
+
exact k5t3p2_local_6_bad
|
| 676 |
+
|
| 677 |
+
private theorem k5t3p2_update_6 : k5t3p2_step_6.apply k5t3p2_state_6 = k5t3p2_state_7 := by
|
| 678 |
+
have h : ∀ i j : Fin 5, k5t3p2_step_6.apply k5t3p2_state_6 i j = k5t3p2_state_7 i j := by decide
|
| 679 |
+
exact funext (fun i => funext (h i))
|
| 680 |
+
|
| 681 |
+
private theorem k5t3p2_closure_7 : ClosureCheck k5t3p2.graph k5t3p2_state_7 5 3 [] := by trivial
|
| 682 |
+
|
| 683 |
+
private theorem k5t3p2_closure_6 : ClosureCheck k5t3p2.graph k5t3p2_state_6 5 3 [k5t3p2_step_6] := by
|
| 684 |
+
constructor
|
| 685 |
+
· exact k5t3p2_step_6_check
|
| 686 |
+
· rw [k5t3p2_update_6]
|
| 687 |
+
exact k5t3p2_closure_7
|
| 688 |
+
|
| 689 |
+
private theorem k5t3p2_closure_5 : ClosureCheck k5t3p2.graph k5t3p2_state_5 5 3 [k5t3p2_step_5, k5t3p2_step_6] := by
|
| 690 |
+
constructor
|
| 691 |
+
· exact k5t3p2_step_5_check
|
| 692 |
+
· rw [k5t3p2_update_5]
|
| 693 |
+
exact k5t3p2_closure_6
|
| 694 |
+
|
| 695 |
+
private theorem k5t3p2_closure_4 : ClosureCheck k5t3p2.graph k5t3p2_state_4 5 3 [k5t3p2_step_4, k5t3p2_step_5, k5t3p2_step_6] := by
|
| 696 |
+
constructor
|
| 697 |
+
· exact k5t3p2_step_4_check
|
| 698 |
+
· rw [k5t3p2_update_4]
|
| 699 |
+
exact k5t3p2_closure_5
|
| 700 |
+
|
| 701 |
+
private theorem k5t3p2_closure_3 : ClosureCheck k5t3p2.graph k5t3p2_state_3 5 3 [k5t3p2_step_3, k5t3p2_step_4, k5t3p2_step_5, k5t3p2_step_6] := by
|
| 702 |
+
constructor
|
| 703 |
+
· exact k5t3p2_step_3_check
|
| 704 |
+
· rw [k5t3p2_update_3]
|
| 705 |
+
exact k5t3p2_closure_4
|
| 706 |
+
|
| 707 |
+
private theorem k5t3p2_closure_2 : ClosureCheck k5t3p2.graph k5t3p2_state_2 5 3 [k5t3p2_step_2, k5t3p2_step_3, k5t3p2_step_4, k5t3p2_step_5, k5t3p2_step_6] := by
|
| 708 |
+
constructor
|
| 709 |
+
· exact k5t3p2_step_2_check
|
| 710 |
+
· rw [k5t3p2_update_2]
|
| 711 |
+
exact k5t3p2_closure_3
|
| 712 |
+
|
| 713 |
+
private theorem k5t3p2_closure_1 : ClosureCheck k5t3p2.graph k5t3p2_state_1 5 3 [k5t3p2_step_1, k5t3p2_step_2, k5t3p2_step_3, k5t3p2_step_4, k5t3p2_step_5, k5t3p2_step_6] := by
|
| 714 |
+
constructor
|
| 715 |
+
· exact k5t3p2_step_1_check
|
| 716 |
+
· rw [k5t3p2_update_1]
|
| 717 |
+
exact k5t3p2_closure_2
|
| 718 |
+
|
| 719 |
+
private theorem k5t3p2_closure_0 : ClosureCheck k5t3p2.graph k5t3p2_state_0 5 3 [k5t3p2_step_0, k5t3p2_step_1, k5t3p2_step_2, k5t3p2_step_3, k5t3p2_step_4, k5t3p2_step_5, k5t3p2_step_6] := by
|
| 720 |
+
constructor
|
| 721 |
+
· exact k5t3p2_step_0_check
|
| 722 |
+
· rw [k5t3p2_update_0]
|
| 723 |
+
exact k5t3p2_closure_1
|
| 724 |
+
|
| 725 |
+
private theorem k5t3p2_matrix_eq : k5t3p2.matrix 5 = k5t3p2_state_7 := by
|
| 726 |
+
change closureMatrix (k5t3p2.initialMatrix 5) _ = _
|
| 727 |
+
rw [k5t3p2_initial_eq]
|
| 728 |
+
change closureMatrix k5t3p2_state_0 [k5t3p2_step_0, k5t3p2_step_1, k5t3p2_step_2, k5t3p2_step_3, k5t3p2_step_4, k5t3p2_step_5, k5t3p2_step_6] = _
|
| 729 |
+
simp only [closureMatrix]
|
| 730 |
+
rw [k5t3p2_update_0, k5t3p2_update_1, k5t3p2_update_2, k5t3p2_update_3, k5t3p2_update_4, k5t3p2_update_5, k5t3p2_update_6]
|
| 731 |
+
|
| 732 |
+
private theorem k5t3p2_part_0 : k5t3p2.chains.flatten = List.finRange _ := by decide
|
| 733 |
+
|
| 734 |
+
private theorem k5t3p2_part_1 : k5t3p2.chains.map List.length = ([[], [2]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide
|
| 735 |
+
|
| 736 |
+
private theorem k5t3p2_part_2 : k5t3p2.chains.map (fun l => l.map (fun i => decide (i ∈ k5t3p2.clique))) = ([[], [2]] : List (List ℕ)).map profileMask := by decide
|
| 737 |
+
|
| 738 |
+
private theorem k5t3p2_templates_item_0 : (⟨0, 1, [], [], [], 3, 4⟩ : TemplateData (Fin 5)).Check k5t3p2.graph k5t3p2.clique 5 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide
|
| 739 |
+
|
| 740 |
+
private theorem k5t3p2_templates_item_1 : (⟨0, 1, [], [], [2, 3, 4], 1, 1⟩ : TemplateData (Fin 5)).Check k5t3p2.graph k5t3p2.clique 5 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide
|
| 741 |
+
|
| 742 |
+
private theorem k5t3p2_templates_item_2 : (⟨0, 2, [], [], [1], 2, 3⟩ : TemplateData (Fin 5)).Check k5t3p2.graph k5t3p2.clique 5 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide
|
| 743 |
+
|
| 744 |
+
private theorem k5t3p2_templates_item_3 : (⟨0, 2, [], [], [3, 4], 1, 2⟩ : TemplateData (Fin 5)).Check k5t3p2.graph k5t3p2.clique 5 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide
|
| 745 |
+
|
| 746 |
+
private theorem k5t3p2_templates_item_4 : (⟨0, 3, [], [], [2, 1], 1, 2⟩ : TemplateData (Fin 5)).Check k5t3p2.graph k5t3p2.clique 5 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide
|
| 747 |
+
|
| 748 |
+
private theorem k5t3p2_templates_item_5 : (⟨0, 3, [], [], [4], 2, 3⟩ : TemplateData (Fin 5)).Check k5t3p2.graph k5t3p2.clique 5 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide
|
| 749 |
+
|
| 750 |
+
private theorem k5t3p2_templates_item_6 : (⟨0, 4, [], [], [], 3, 4⟩ : TemplateData (Fin 5)).Check k5t3p2.graph k5t3p2.clique 5 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide
|
| 751 |
+
|
| 752 |
+
private theorem k5t3p2_templates_item_7 : (⟨0, 4, [], [], [3, 2, 1], 1, 1⟩ : TemplateData (Fin 5)).Check k5t3p2.graph k5t3p2.clique 5 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide
|
| 753 |
+
|
| 754 |
+
private theorem k5t3p2_templates_item_8 : (⟨1, 2, [], [], [3, 4], 1, 2⟩ : TemplateData (Fin 5)).Check k5t3p2.graph k5t3p2.clique 5 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide
|
| 755 |
+
|
| 756 |
+
private theorem k5t3p2_templates_item_9 : (⟨1, 3, [], [], [4], 2, 3⟩ : TemplateData (Fin 5)).Check k5t3p2.graph k5t3p2.clique 5 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide
|
| 757 |
+
|
| 758 |
+
private theorem k5t3p2_templates_item_10 : (⟨2, 3, [], [1], [4], 1, 2⟩ : TemplateData (Fin 5)).Check k5t3p2.graph k5t3p2.clique 5 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide
|
| 759 |
+
|
| 760 |
+
private theorem k5t3p2_templates_item_11 : (⟨2, 4, [], [1], [], 2, 3⟩ : TemplateData (Fin 5)).Check k5t3p2.graph k5t3p2.clique 5 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide
|
| 761 |
+
|
| 762 |
+
private theorem k5t3p2_templates_item_12 : (⟨3, 4, [], [1, 2], [], 1, 2⟩ : TemplateData (Fin 5)).Check k5t3p2.graph k5t3p2.clique 5 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by decide
|
| 763 |
+
|
| 764 |
+
private theorem k5t3p2_part_3 : ∀ T ∈ k5t3p2.templates, T.Check k5t3p2.graph k5t3p2.clique 5 (patternAmount ([[], [2]] : List (List ℕ))) (([[], [2]] : List (List ℕ)).map List.length).sum := by
|
| 765 |
+
simp only [k5t3p2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true]
|
| 766 |
+
exact ⟨k5t3p2_templates_item_0, k5t3p2_templates_item_1, k5t3p2_templates_item_2, k5t3p2_templates_item_3, k5t3p2_templates_item_4, k5t3p2_templates_item_5, k5t3p2_templates_item_6, k5t3p2_templates_item_7, k5t3p2_templates_item_8, k5t3p2_templates_item_9, k5t3p2_templates_item_10, k5t3p2_templates_item_11, k5t3p2_templates_item_12⟩
|
| 767 |
+
|
| 768 |
+
private theorem k5t3p2_required_item_0 : (⟨1, 2, []⟩ : RequiredPathData (Fin 5)).Check k5t3p2.graph 5 := by decide
|
| 769 |
+
|
| 770 |
+
private theorem k5t3p2_required_item_1 : (⟨2, 3, []⟩ : RequiredPathData (Fin 5)).Check k5t3p2.graph 5 := by decide
|
| 771 |
+
|
| 772 |
+
private theorem k5t3p2_part_4 : ∀ p ∈ k5t3p2.required, p.Check k5t3p2.graph 5 := by
|
| 773 |
+
simp only [k5t3p2, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true]
|
| 774 |
+
exact ⟨k5t3p2_required_item_0, k5t3p2_required_item_1⟩
|
| 775 |
+
|
| 776 |
+
private theorem k5t3p2_part_5 : ClosureCheck k5t3p2.graph (k5t3p2.initialMatrix 5) 5 3 k5t3p2.closure := by
|
| 777 |
+
rw [k5t3p2_initial_eq]
|
| 778 |
+
exact k5t3p2_closure_0
|
| 779 |
+
|
| 780 |
+
private theorem k5t3p2_part_6 : k5t3p2.bad.Check k5t3p2.graph (k5t3p2.matrix 5) 5 3 := by
|
| 781 |
+
rw [k5t3p2_matrix_eq]
|
| 782 |
+
decide
|
| 783 |
+
|
| 784 |
+
theorem k5t3p2_check : k5t3p2.Check 5 3 [[], [2]] :=
|
| 785 |
+
⟨k5t3p2_part_0, k5t3p2_part_1, k5t3p2_part_2, k5t3p2_part_3, k5t3p2_part_4, k5t3p2_part_5, k5t3p2_part_6⟩
|
| 786 |
+
def k5t3p3 : LayoutCertificate 5 where
|
| 787 |
+
chains := [[0, 1, 2, 3, 4]]
|
| 788 |
+
clique := {0, 2, 4}
|
| 789 |
+
templates := [⟨0, 1, [], [], [2], 1, 3⟩,
|
| 790 |
+
⟨0, 3, [], [], [2], 1, 3⟩,
|
| 791 |
+
⟨0, 4, [], [], [], 2, 4⟩,
|
| 792 |
+
⟨1, 3, [], [0], [2], 1, 2⟩,
|
| 793 |
+
⟨1, 4, [], [0], [], 1, 3⟩,
|
| 794 |
+
⟨3, 4, [], [2], [], 1, 3⟩]
|
| 795 |
+
required := [⟨0, 4, [1, 2, 3]⟩]
|
| 796 |
+
closure := []
|
| 797 |
+
bad := ⟨none, {(1, 0), (0, 2), (4, 2), (3, 1)}⟩
|
| 798 |
+
|
| 799 |
+
|
| 800 |
+
private def k5t3p3_state_0 : ForbiddenMatrix 5 :=
|
| 801 |
+
fun i j => ((#[#[∅, {1, 2, 3}, ∅, {1, 2, 3}, Finset.Icc 1 4],
|
| 802 |
+
#[{1, 2, 3}, ∅, ∅, {1, 2}, {1, 2, 3}],
|
| 803 |
+
#[∅, ∅, ∅, ∅, ∅],
|
| 804 |
+
#[{1, 2, 3}, {1, 2}, ∅, ∅, {1, 2, 3}],
|
| 805 |
+
#[Finset.Icc 1 4, {1, 2, 3}, ∅, {1, 2, 3}, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 806 |
+
|
| 807 |
+
private theorem k5t3p3_initial_eq_row_0 : ∀ j : Fin 5, (k5t3p3.initialMatrix 5) 0 j = k5t3p3_state_0 0 j := by decide
|
| 808 |
+
|
| 809 |
+
private theorem k5t3p3_initial_eq_row_1 : ∀ j : Fin 5, (k5t3p3.initialMatrix 5) 1 j = k5t3p3_state_0 1 j := by decide
|
| 810 |
+
|
| 811 |
+
private theorem k5t3p3_initial_eq_row_2 : ∀ j : Fin 5, (k5t3p3.initialMatrix 5) 2 j = k5t3p3_state_0 2 j := by decide
|
| 812 |
+
|
| 813 |
+
private theorem k5t3p3_initial_eq_row_3 : ∀ j : Fin 5, (k5t3p3.initialMatrix 5) 3 j = k5t3p3_state_0 3 j := by decide
|
| 814 |
+
|
| 815 |
+
private theorem k5t3p3_initial_eq_row_4 : ∀ j : Fin 5, (k5t3p3.initialMatrix 5) 4 j = k5t3p3_state_0 4 j := by decide
|
| 816 |
+
|
| 817 |
+
private theorem k5t3p3_initial_eq : (k5t3p3.initialMatrix 5) = k5t3p3_state_0 := by
|
| 818 |
+
funext i j
|
| 819 |
+
fin_cases i
|
| 820 |
+
|
| 821 |
+
· exact k5t3p3_initial_eq_row_0 j
|
| 822 |
+
|
| 823 |
+
· exact k5t3p3_initial_eq_row_1 j
|
| 824 |
+
|
| 825 |
+
· exact k5t3p3_initial_eq_row_2 j
|
| 826 |
+
|
| 827 |
+
· exact k5t3p3_initial_eq_row_3 j
|
| 828 |
+
|
| 829 |
+
· exact k5t3p3_initial_eq_row_4 j
|
| 830 |
+
|
| 831 |
+
private theorem k5t3p3_closure_0 : ClosureCheck k5t3p3.graph k5t3p3_state_0 5 3 [] := by trivial
|
| 832 |
+
|
| 833 |
+
private theorem k5t3p3_matrix_eq : k5t3p3.matrix 5 = k5t3p3_state_0 := by
|
| 834 |
+
change closureMatrix (k5t3p3.initialMatrix 5) _ = _
|
| 835 |
+
rw [k5t3p3_initial_eq]
|
| 836 |
+
change closureMatrix k5t3p3_state_0 [] = _
|
| 837 |
+
rfl
|
| 838 |
+
|
| 839 |
+
private theorem k5t3p3_part_0 : k5t3p3.chains.flatten = List.finRange _ := by decide
|
| 840 |
+
|
| 841 |
+
private theorem k5t3p3_part_1 : k5t3p3.chains.map List.length = ([[1, 1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide
|
| 842 |
+
|
| 843 |
+
private theorem k5t3p3_part_2 : k5t3p3.chains.map (fun l => l.map (fun i => decide (i ∈ k5t3p3.clique))) = ([[1, 1]] : List (List ℕ)).map profileMask := by decide
|
| 844 |
+
|
| 845 |
+
private theorem k5t3p3_templates_item_0 : (⟨0, 1, [], [], [2], 1, 3⟩ : TemplateData (Fin 5)).Check k5t3p3.graph k5t3p3.clique 5 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide
|
| 846 |
+
|
| 847 |
+
private theorem k5t3p3_templates_item_1 : (⟨0, 3, [], [], [2], 1, 3⟩ : TemplateData (Fin 5)).Check k5t3p3.graph k5t3p3.clique 5 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide
|
| 848 |
+
|
| 849 |
+
private theorem k5t3p3_templates_item_2 : (⟨0, 4, [], [], [], 2, 4⟩ : TemplateData (Fin 5)).Check k5t3p3.graph k5t3p3.clique 5 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide
|
| 850 |
+
|
| 851 |
+
private theorem k5t3p3_templates_item_3 : (⟨1, 3, [], [0], [2], 1, 2⟩ : TemplateData (Fin 5)).Check k5t3p3.graph k5t3p3.clique 5 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide
|
| 852 |
+
|
| 853 |
+
private theorem k5t3p3_templates_item_4 : (⟨1, 4, [], [0], [], 1, 3⟩ : TemplateData (Fin 5)).Check k5t3p3.graph k5t3p3.clique 5 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide
|
| 854 |
+
|
| 855 |
+
private theorem k5t3p3_templates_item_5 : (⟨3, 4, [], [2], [], 1, 3⟩ : TemplateData (Fin 5)).Check k5t3p3.graph k5t3p3.clique 5 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by decide
|
| 856 |
+
|
| 857 |
+
private theorem k5t3p3_part_3 : ∀ T ∈ k5t3p3.templates, T.Check k5t3p3.graph k5t3p3.clique 5 (patternAmount ([[1, 1]] : List (List ℕ))) (([[1, 1]] : List (List ℕ)).map List.length).sum := by
|
| 858 |
+
simp only [k5t3p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true]
|
| 859 |
+
exact ⟨k5t3p3_templates_item_0, k5t3p3_templates_item_1, k5t3p3_templates_item_2, k5t3p3_templates_item_3, k5t3p3_templates_item_4, k5t3p3_templates_item_5⟩
|
| 860 |
+
|
| 861 |
+
private theorem k5t3p3_required_item_0 : (⟨0, 4, [1, 2, 3]⟩ : RequiredPathData (Fin 5)).Check k5t3p3.graph 5 := by decide
|
| 862 |
+
|
| 863 |
+
private theorem k5t3p3_part_4 : ∀ p ∈ k5t3p3.required, p.Check k5t3p3.graph 5 := by
|
| 864 |
+
simp only [k5t3p3, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true]
|
| 865 |
+
exact k5t3p3_required_item_0
|
| 866 |
+
|
| 867 |
+
private theorem k5t3p3_part_5 : ClosureCheck k5t3p3.graph (k5t3p3.initialMatrix 5) 5 3 k5t3p3.closure := by
|
| 868 |
+
rw [k5t3p3_initial_eq]
|
| 869 |
+
exact k5t3p3_closure_0
|
| 870 |
+
|
| 871 |
+
private theorem k5t3p3_part_6 : k5t3p3.bad.Check k5t3p3.graph (k5t3p3.matrix 5) 5 3 := by
|
| 872 |
+
rw [k5t3p3_matrix_eq]
|
| 873 |
+
decide
|
| 874 |
+
|
| 875 |
+
theorem k5t3p3_check : k5t3p3.Check 5 3 [[1, 1]] :=
|
| 876 |
+
⟨k5t3p3_part_0, k5t3p3_part_1, k5t3p3_part_2, k5t3p3_part_3, k5t3p3_part_4, k5t3p3_part_5, k5t3p3_part_6⟩
|
| 877 |
+
def k5t4p0 : LayoutCertificate 4 where
|
| 878 |
+
chains := [[0], [1], [2], [3]]
|
| 879 |
+
clique := {0, 1, 2, 3}
|
| 880 |
+
templates := [⟨0, 1, [], [], [], 1, 4⟩,
|
| 881 |
+
⟨0, 2, [], [], [], 1, 4⟩,
|
| 882 |
+
⟨0, 3, [], [], [], 1, 4⟩,
|
| 883 |
+
⟨1, 2, [], [], [], 1, 4⟩,
|
| 884 |
+
⟨1, 3, [], [], [], 1, 4⟩,
|
| 885 |
+
⟨2, 3, [], [], [], 1, 4⟩]
|
| 886 |
+
required := []
|
| 887 |
+
closure := []
|
| 888 |
+
bad := ⟨none, {(0, 2), (1, 2), (2, 2)}⟩
|
| 889 |
+
|
| 890 |
+
|
| 891 |
+
private def k5t4p0_state_0 : ForbiddenMatrix 4 :=
|
| 892 |
+
fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4],
|
| 893 |
+
#[Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 4],
|
| 894 |
+
#[Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4],
|
| 895 |
+
#[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 896 |
+
|
| 897 |
+
private theorem k5t4p0_initial_eq_row_0 : ∀ j : Fin 4, (k5t4p0.initialMatrix 5) 0 j = k5t4p0_state_0 0 j := by decide
|
| 898 |
+
|
| 899 |
+
private theorem k5t4p0_initial_eq_row_1 : ∀ j : Fin 4, (k5t4p0.initialMatrix 5) 1 j = k5t4p0_state_0 1 j := by decide
|
| 900 |
+
|
| 901 |
+
private theorem k5t4p0_initial_eq_row_2 : ∀ j : Fin 4, (k5t4p0.initialMatrix 5) 2 j = k5t4p0_state_0 2 j := by decide
|
| 902 |
+
|
| 903 |
+
private theorem k5t4p0_initial_eq_row_3 : ∀ j : Fin 4, (k5t4p0.initialMatrix 5) 3 j = k5t4p0_state_0 3 j := by decide
|
| 904 |
+
|
| 905 |
+
private theorem k5t4p0_initial_eq : (k5t4p0.initialMatrix 5) = k5t4p0_state_0 := by
|
| 906 |
+
funext i j
|
| 907 |
+
fin_cases i
|
| 908 |
+
|
| 909 |
+
· exact k5t4p0_initial_eq_row_0 j
|
| 910 |
+
|
| 911 |
+
· exact k5t4p0_initial_eq_row_1 j
|
| 912 |
+
|
| 913 |
+
· exact k5t4p0_initial_eq_row_2 j
|
| 914 |
+
|
| 915 |
+
· exact k5t4p0_initial_eq_row_3 j
|
| 916 |
+
|
| 917 |
+
private theorem k5t4p0_closure_0 : ClosureCheck k5t4p0.graph k5t4p0_state_0 5 4 [] := by trivial
|
| 918 |
+
|
| 919 |
+
private theorem k5t4p0_matrix_eq : k5t4p0.matrix 5 = k5t4p0_state_0 := by
|
| 920 |
+
change closureMatrix (k5t4p0.initialMatrix 5) _ = _
|
| 921 |
+
rw [k5t4p0_initial_eq]
|
| 922 |
+
change closureMatrix k5t4p0_state_0 [] = _
|
| 923 |
+
rfl
|
| 924 |
+
|
| 925 |
+
private theorem k5t4p0_part_0 : k5t4p0.chains.flatten = List.finRange _ := by decide
|
| 926 |
+
|
| 927 |
+
private theorem k5t4p0_part_1 : k5t4p0.chains.map List.length = ([[], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide
|
| 928 |
+
|
| 929 |
+
private theorem k5t4p0_part_2 : k5t4p0.chains.map (fun l => l.map (fun i => decide (i ∈ k5t4p0.clique))) = ([[], [], [], []] : List (List ℕ)).map profileMask := by decide
|
| 930 |
+
|
| 931 |
+
private theorem k5t4p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 4⟩ : TemplateData (Fin 4)).Check k5t4p0.graph k5t4p0.clique 5 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 932 |
+
|
| 933 |
+
private theorem k5t4p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 4⟩ : TemplateData (Fin 4)).Check k5t4p0.graph k5t4p0.clique 5 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 934 |
+
|
| 935 |
+
private theorem k5t4p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 4⟩ : TemplateData (Fin 4)).Check k5t4p0.graph k5t4p0.clique 5 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 936 |
+
|
| 937 |
+
private theorem k5t4p0_templates_item_3 : (⟨1, 2, [], [], [], 1, 4⟩ : TemplateData (Fin 4)).Check k5t4p0.graph k5t4p0.clique 5 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 938 |
+
|
| 939 |
+
private theorem k5t4p0_templates_item_4 : (⟨1, 3, [], [], [], 1, 4⟩ : TemplateData (Fin 4)).Check k5t4p0.graph k5t4p0.clique 5 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 940 |
+
|
| 941 |
+
private theorem k5t4p0_templates_item_5 : (⟨2, 3, [], [], [], 1, 4⟩ : TemplateData (Fin 4)).Check k5t4p0.graph k5t4p0.clique 5 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 942 |
+
|
| 943 |
+
private theorem k5t4p0_part_3 : ∀ T ∈ k5t4p0.templates, T.Check k5t4p0.graph k5t4p0.clique 5 (patternAmount ([[], [], [], []] : List (List ℕ))) (([[], [], [], []] : List (List ℕ)).map List.length).sum := by
|
| 944 |
+
simp only [k5t4p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true]
|
| 945 |
+
exact ⟨k5t4p0_templates_item_0, k5t4p0_templates_item_1, k5t4p0_templates_item_2, k5t4p0_templates_item_3, k5t4p0_templates_item_4, k5t4p0_templates_item_5⟩
|
| 946 |
+
|
| 947 |
+
private theorem k5t4p0_part_4 : ∀ p ∈ k5t4p0.required, p.Check k5t4p0.graph 5 := by decide
|
| 948 |
+
|
| 949 |
+
private theorem k5t4p0_part_5 : ClosureCheck k5t4p0.graph (k5t4p0.initialMatrix 5) 5 4 k5t4p0.closure := by
|
| 950 |
+
rw [k5t4p0_initial_eq]
|
| 951 |
+
exact k5t4p0_closure_0
|
| 952 |
+
|
| 953 |
+
private theorem k5t4p0_part_6 : k5t4p0.bad.Check k5t4p0.graph (k5t4p0.matrix 5) 5 4 := by
|
| 954 |
+
rw [k5t4p0_matrix_eq]
|
| 955 |
+
decide
|
| 956 |
+
|
| 957 |
+
theorem k5t4p0_check : k5t4p0.Check 5 4 [[], [], [], []] :=
|
| 958 |
+
⟨k5t4p0_part_0, k5t4p0_part_1, k5t4p0_part_2, k5t4p0_part_3, k5t4p0_part_4, k5t4p0_part_5, k5t4p0_part_6⟩
|
| 959 |
+
def k5t4p1 : LayoutCertificate 5 where
|
| 960 |
+
chains := [[0], [1], [2, 3, 4]]
|
| 961 |
+
clique := {0, 1, 2, 4}
|
| 962 |
+
templates := [⟨0, 1, [], [], [], 2, 4⟩,
|
| 963 |
+
⟨0, 1, [[2, 3, 4]], [], [], 1, 1⟩,
|
| 964 |
+
⟨0, 2, [], [], [], 2, 4⟩,
|
| 965 |
+
⟨0, 2, [], [], [3, 4], 1, 2⟩,
|
| 966 |
+
⟨0, 3, [], [], [2], 1, 3⟩,
|
| 967 |
+
⟨0, 4, [], [], [], 2, 4⟩,
|
| 968 |
+
⟨0, 4, [], [], [3, 2], 1, 2⟩,
|
| 969 |
+
⟨1, 2, [], [], [], 2, 4⟩,
|
| 970 |
+
⟨1, 2, [], [], [3, 4], 1, 2⟩,
|
| 971 |
+
⟨1, 3, [], [], [2], 1, 3⟩,
|
| 972 |
+
⟨2, 3, [], [], [4], 1, 3⟩]
|
| 973 |
+
required := []
|
| 974 |
+
closure := []
|
| 975 |
+
bad := ⟨none, {(0, 3), (1, 1), (2, 1), (3, 0)}⟩
|
| 976 |
+
|
| 977 |
+
|
| 978 |
+
private def k5t4p1_state_0 : ForbiddenMatrix 5 :=
|
| 979 |
+
fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 1 4, {1, 2, 3}, Finset.Icc 1 4],
|
| 980 |
+
#[Finset.Icc 1 4, ∅, Finset.Icc 1 4, {1, 2, 3}, ∅],
|
| 981 |
+
#[Finset.Icc 1 4, Finset.Icc 1 4, ∅, {1, 2, 3}, ∅],
|
| 982 |
+
#[{1, 2, 3}, {1, 2, 3}, {1, 2, 3}, ∅, ∅],
|
| 983 |
+
#[Finset.Icc 1 4, ∅, ∅, ∅, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 984 |
+
|
| 985 |
+
private theorem k5t4p1_initial_eq_row_0 : ∀ j : Fin 5, (k5t4p1.initialMatrix 5) 0 j = k5t4p1_state_0 0 j := by decide
|
| 986 |
+
|
| 987 |
+
private theorem k5t4p1_initial_eq_row_1 : ∀ j : Fin 5, (k5t4p1.initialMatrix 5) 1 j = k5t4p1_state_0 1 j := by decide
|
| 988 |
+
|
| 989 |
+
private theorem k5t4p1_initial_eq_row_2 : ∀ j : Fin 5, (k5t4p1.initialMatrix 5) 2 j = k5t4p1_state_0 2 j := by decide
|
| 990 |
+
|
| 991 |
+
private theorem k5t4p1_initial_eq_row_3 : ∀ j : Fin 5, (k5t4p1.initialMatrix 5) 3 j = k5t4p1_state_0 3 j := by decide
|
| 992 |
+
|
| 993 |
+
private theorem k5t4p1_initial_eq_row_4 : ∀ j : Fin 5, (k5t4p1.initialMatrix 5) 4 j = k5t4p1_state_0 4 j := by decide
|
| 994 |
+
|
| 995 |
+
private theorem k5t4p1_initial_eq : (k5t4p1.initialMatrix 5) = k5t4p1_state_0 := by
|
| 996 |
+
funext i j
|
| 997 |
+
fin_cases i
|
| 998 |
+
|
| 999 |
+
· exact k5t4p1_initial_eq_row_0 j
|
| 1000 |
+
|
| 1001 |
+
· exact k5t4p1_initial_eq_row_1 j
|
| 1002 |
+
|
| 1003 |
+
· exact k5t4p1_initial_eq_row_2 j
|
| 1004 |
+
|
| 1005 |
+
· exact k5t4p1_initial_eq_row_3 j
|
| 1006 |
+
|
| 1007 |
+
· exact k5t4p1_initial_eq_row_4 j
|
| 1008 |
+
|
| 1009 |
+
private theorem k5t4p1_closure_0 : ClosureCheck k5t4p1.graph k5t4p1_state_0 5 4 [] := by trivial
|
| 1010 |
+
|
| 1011 |
+
private theorem k5t4p1_matrix_eq : k5t4p1.matrix 5 = k5t4p1_state_0 := by
|
| 1012 |
+
change closureMatrix (k5t4p1.initialMatrix 5) _ = _
|
| 1013 |
+
rw [k5t4p1_initial_eq]
|
| 1014 |
+
change closureMatrix k5t4p1_state_0 [] = _
|
| 1015 |
+
rfl
|
| 1016 |
+
|
| 1017 |
+
private theorem k5t4p1_part_0 : k5t4p1.chains.flatten = List.finRange _ := by decide
|
| 1018 |
+
|
| 1019 |
+
private theorem k5t4p1_part_1 : k5t4p1.chains.map List.length = ([[], [], [1]] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide
|
| 1020 |
+
|
| 1021 |
+
private theorem k5t4p1_part_2 : k5t4p1.chains.map (fun l => l.map (fun i => decide (i ∈ k5t4p1.clique))) = ([[], [], [1]] : List (List ℕ)).map profileMask := by decide
|
| 1022 |
+
|
| 1023 |
+
private theorem k5t4p1_templates_item_0 : (⟨0, 1, [], [], [], 2, 4⟩ : TemplateData (Fin 5)).Check k5t4p1.graph k5t4p1.clique 5 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide
|
| 1024 |
+
|
| 1025 |
+
private theorem k5t4p1_templates_item_1 : (⟨0, 1, [[2, 3, 4]], [], [], 1, 1⟩ : TemplateData (Fin 5)).Check k5t4p1.graph k5t4p1.clique 5 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide
|
| 1026 |
+
|
| 1027 |
+
private theorem k5t4p1_templates_item_2 : (⟨0, 2, [], [], [], 2, 4⟩ : TemplateData (Fin 5)).Check k5t4p1.graph k5t4p1.clique 5 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide
|
| 1028 |
+
|
| 1029 |
+
private theorem k5t4p1_templates_item_3 : (⟨0, 2, [], [], [3, 4], 1, 2⟩ : TemplateData (Fin 5)).Check k5t4p1.graph k5t4p1.clique 5 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide
|
| 1030 |
+
|
| 1031 |
+
private theorem k5t4p1_templates_item_4 : (⟨0, 3, [], [], [2], 1, 3⟩ : TemplateData (Fin 5)).Check k5t4p1.graph k5t4p1.clique 5 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide
|
| 1032 |
+
|
| 1033 |
+
private theorem k5t4p1_templates_item_5 : (⟨0, 4, [], [], [], 2, 4⟩ : TemplateData (Fin 5)).Check k5t4p1.graph k5t4p1.clique 5 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide
|
| 1034 |
+
|
| 1035 |
+
private theorem k5t4p1_templates_item_6 : (⟨0, 4, [], [], [3, 2], 1, 2⟩ : TemplateData (Fin 5)).Check k5t4p1.graph k5t4p1.clique 5 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide
|
| 1036 |
+
|
| 1037 |
+
private theorem k5t4p1_templates_item_7 : (⟨1, 2, [], [], [], 2, 4⟩ : TemplateData (Fin 5)).Check k5t4p1.graph k5t4p1.clique 5 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide
|
| 1038 |
+
|
| 1039 |
+
private theorem k5t4p1_templates_item_8 : (⟨1, 2, [], [], [3, 4], 1, 2⟩ : TemplateData (Fin 5)).Check k5t4p1.graph k5t4p1.clique 5 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide
|
| 1040 |
+
|
| 1041 |
+
private theorem k5t4p1_templates_item_9 : (⟨1, 3, [], [], [2], 1, 3⟩ : TemplateData (Fin 5)).Check k5t4p1.graph k5t4p1.clique 5 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide
|
| 1042 |
+
|
| 1043 |
+
private theorem k5t4p1_templates_item_10 : (⟨2, 3, [], [], [4], 1, 3⟩ : TemplateData (Fin 5)).Check k5t4p1.graph k5t4p1.clique 5 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by decide
|
| 1044 |
+
|
| 1045 |
+
private theorem k5t4p1_part_3 : ∀ T ∈ k5t4p1.templates, T.Check k5t4p1.graph k5t4p1.clique 5 (patternAmount ([[], [], [1]] : List (List ℕ))) (([[], [], [1]] : List (List ℕ)).map List.length).sum := by
|
| 1046 |
+
simp only [k5t4p1, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true]
|
| 1047 |
+
exact ⟨k5t4p1_templates_item_0, k5t4p1_templates_item_1, k5t4p1_templates_item_2, k5t4p1_templates_item_3, k5t4p1_templates_item_4, k5t4p1_templates_item_5, k5t4p1_templates_item_6, k5t4p1_templates_item_7, k5t4p1_templates_item_8, k5t4p1_templates_item_9, k5t4p1_templates_item_10⟩
|
| 1048 |
+
|
| 1049 |
+
private theorem k5t4p1_part_4 : ∀ p ∈ k5t4p1.required, p.Check k5t4p1.graph 5 := by decide
|
| 1050 |
+
|
| 1051 |
+
private theorem k5t4p1_part_5 : ClosureCheck k5t4p1.graph (k5t4p1.initialMatrix 5) 5 4 k5t4p1.closure := by
|
| 1052 |
+
rw [k5t4p1_initial_eq]
|
| 1053 |
+
exact k5t4p1_closure_0
|
| 1054 |
+
|
| 1055 |
+
private theorem k5t4p1_part_6 : k5t4p1.bad.Check k5t4p1.graph (k5t4p1.matrix 5) 5 4 := by
|
| 1056 |
+
rw [k5t4p1_matrix_eq]
|
| 1057 |
+
decide
|
| 1058 |
+
|
| 1059 |
+
theorem k5t4p1_check : k5t4p1.Check 5 4 [[], [], [1]] :=
|
| 1060 |
+
⟨k5t4p1_part_0, k5t4p1_part_1, k5t4p1_part_2, k5t4p1_part_3, k5t4p1_part_4, k5t4p1_part_5, k5t4p1_part_6⟩
|
| 1061 |
+
def k5t5p0 : LayoutCertificate 5 where
|
| 1062 |
+
chains := [[0], [1], [2], [3], [4]]
|
| 1063 |
+
clique := {0, 1, 2, 3, 4}
|
| 1064 |
+
templates := [⟨0, 1, [], [], [], 1, 4⟩,
|
| 1065 |
+
⟨0, 2, [], [], [], 1, 4⟩,
|
| 1066 |
+
⟨0, 3, [], [], [], 1, 4⟩,
|
| 1067 |
+
⟨0, 4, [], [], [], 1, 4⟩,
|
| 1068 |
+
⟨1, 2, [], [], [], 1, 4⟩,
|
| 1069 |
+
⟨1, 3, [], [], [], 1, 4⟩,
|
| 1070 |
+
⟨1, 4, [], [], [], 1, 4⟩,
|
| 1071 |
+
⟨2, 3, [], [], [], 1, 4⟩,
|
| 1072 |
+
⟨2, 4, [], [], [], 1, 4⟩,
|
| 1073 |
+
⟨3, 4, [], [], [], 1, 4⟩]
|
| 1074 |
+
required := []
|
| 1075 |
+
closure := []
|
| 1076 |
+
bad := ⟨none, {(0, 1), (1, 1), (2, 1), (3, 1), (4, 3)}⟩
|
| 1077 |
+
|
| 1078 |
+
|
| 1079 |
+
private def k5t5p0_state_0 : ForbiddenMatrix 5 :=
|
| 1080 |
+
fun i j => ((#[#[∅, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4],
|
| 1081 |
+
#[Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4],
|
| 1082 |
+
#[Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4, Finset.Icc 1 4],
|
| 1083 |
+
#[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅, Finset.Icc 1 4],
|
| 1084 |
+
#[Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, Finset.Icc 1 4, ∅]] : Array (Array (Finset ℕ))).getD i.val #[]).getD j.val ∅
|
| 1085 |
+
|
| 1086 |
+
private theorem k5t5p0_initial_eq_row_0 : ∀ j : Fin 5, (k5t5p0.initialMatrix 5) 0 j = k5t5p0_state_0 0 j := by decide
|
| 1087 |
+
|
| 1088 |
+
private theorem k5t5p0_initial_eq_row_1 : ∀ j : Fin 5, (k5t5p0.initialMatrix 5) 1 j = k5t5p0_state_0 1 j := by decide
|
| 1089 |
+
|
| 1090 |
+
private theorem k5t5p0_initial_eq_row_2 : ∀ j : Fin 5, (k5t5p0.initialMatrix 5) 2 j = k5t5p0_state_0 2 j := by decide
|
| 1091 |
+
|
| 1092 |
+
private theorem k5t5p0_initial_eq_row_3 : ∀ j : Fin 5, (k5t5p0.initialMatrix 5) 3 j = k5t5p0_state_0 3 j := by decide
|
| 1093 |
+
|
| 1094 |
+
private theorem k5t5p0_initial_eq_row_4 : ∀ j : Fin 5, (k5t5p0.initialMatrix 5) 4 j = k5t5p0_state_0 4 j := by decide
|
| 1095 |
+
|
| 1096 |
+
private theorem k5t5p0_initial_eq : (k5t5p0.initialMatrix 5) = k5t5p0_state_0 := by
|
| 1097 |
+
funext i j
|
| 1098 |
+
fin_cases i
|
| 1099 |
+
|
| 1100 |
+
· exact k5t5p0_initial_eq_row_0 j
|
| 1101 |
+
|
| 1102 |
+
· exact k5t5p0_initial_eq_row_1 j
|
| 1103 |
+
|
| 1104 |
+
· exact k5t5p0_initial_eq_row_2 j
|
| 1105 |
+
|
| 1106 |
+
· exact k5t5p0_initial_eq_row_3 j
|
| 1107 |
+
|
| 1108 |
+
· exact k5t5p0_initial_eq_row_4 j
|
| 1109 |
+
|
| 1110 |
+
private theorem k5t5p0_closure_0 : ClosureCheck k5t5p0.graph k5t5p0_state_0 5 5 [] := by trivial
|
| 1111 |
+
|
| 1112 |
+
private theorem k5t5p0_matrix_eq : k5t5p0.matrix 5 = k5t5p0_state_0 := by
|
| 1113 |
+
change closureMatrix (k5t5p0.initialMatrix 5) _ = _
|
| 1114 |
+
rw [k5t5p0_initial_eq]
|
| 1115 |
+
change closureMatrix k5t5p0_state_0 [] = _
|
| 1116 |
+
rfl
|
| 1117 |
+
|
| 1118 |
+
private theorem k5t5p0_part_0 : k5t5p0.chains.flatten = List.finRange _ := by decide
|
| 1119 |
+
|
| 1120 |
+
private theorem k5t5p0_part_1 : k5t5p0.chains.map List.length = ([[], [], [], [], []] : List (List ℕ)).map (fun w => w.sum + w.length + 1) := by decide
|
| 1121 |
+
|
| 1122 |
+
private theorem k5t5p0_part_2 : k5t5p0.chains.map (fun l => l.map (fun i => decide (i ∈ k5t5p0.clique))) = ([[], [], [], [], []] : List (List ℕ)).map profileMask := by decide
|
| 1123 |
+
|
| 1124 |
+
private theorem k5t5p0_templates_item_0 : (⟨0, 1, [], [], [], 1, 4⟩ : TemplateData (Fin 5)).Check k5t5p0.graph k5t5p0.clique 5 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 1125 |
+
|
| 1126 |
+
private theorem k5t5p0_templates_item_1 : (⟨0, 2, [], [], [], 1, 4⟩ : TemplateData (Fin 5)).Check k5t5p0.graph k5t5p0.clique 5 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 1127 |
+
|
| 1128 |
+
private theorem k5t5p0_templates_item_2 : (⟨0, 3, [], [], [], 1, 4⟩ : TemplateData (Fin 5)).Check k5t5p0.graph k5t5p0.clique 5 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 1129 |
+
|
| 1130 |
+
private theorem k5t5p0_templates_item_3 : (⟨0, 4, [], [], [], 1, 4⟩ : TemplateData (Fin 5)).Check k5t5p0.graph k5t5p0.clique 5 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 1131 |
+
|
| 1132 |
+
private theorem k5t5p0_templates_item_4 : (⟨1, 2, [], [], [], 1, 4⟩ : TemplateData (Fin 5)).Check k5t5p0.graph k5t5p0.clique 5 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 1133 |
+
|
| 1134 |
+
private theorem k5t5p0_templates_item_5 : (⟨1, 3, [], [], [], 1, 4⟩ : TemplateData (Fin 5)).Check k5t5p0.graph k5t5p0.clique 5 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 1135 |
+
|
| 1136 |
+
private theorem k5t5p0_templates_item_6 : (⟨1, 4, [], [], [], 1, 4⟩ : TemplateData (Fin 5)).Check k5t5p0.graph k5t5p0.clique 5 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 1137 |
+
|
| 1138 |
+
private theorem k5t5p0_templates_item_7 : (⟨2, 3, [], [], [], 1, 4⟩ : TemplateData (Fin 5)).Check k5t5p0.graph k5t5p0.clique 5 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 1139 |
+
|
| 1140 |
+
private theorem k5t5p0_templates_item_8 : (⟨2, 4, [], [], [], 1, 4⟩ : TemplateData (Fin 5)).Check k5t5p0.graph k5t5p0.clique 5 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 1141 |
+
|
| 1142 |
+
private theorem k5t5p0_templates_item_9 : (⟨3, 4, [], [], [], 1, 4⟩ : TemplateData (Fin 5)).Check k5t5p0.graph k5t5p0.clique 5 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by decide
|
| 1143 |
+
|
| 1144 |
+
private theorem k5t5p0_part_3 : ∀ T ∈ k5t5p0.templates, T.Check k5t5p0.graph k5t5p0.clique 5 (patternAmount ([[], [], [], [], []] : List (List ℕ))) (([[], [], [], [], []] : List (List ℕ)).map List.length).sum := by
|
| 1145 |
+
simp only [k5t5p0, List.forall_mem_cons, List.not_mem_nil, IsEmpty.forall_iff, implies_true, and_true]
|
| 1146 |
+
exact ⟨k5t5p0_templates_item_0, k5t5p0_templates_item_1, k5t5p0_templates_item_2, k5t5p0_templates_item_3, k5t5p0_templates_item_4, k5t5p0_templates_item_5, k5t5p0_templates_item_6, k5t5p0_templates_item_7, k5t5p0_templates_item_8, k5t5p0_templates_item_9⟩
|
| 1147 |
+
|
| 1148 |
+
private theorem k5t5p0_part_4 : ∀ p ∈ k5t5p0.required, p.Check k5t5p0.graph 5 := by decide
|
| 1149 |
+
|
| 1150 |
+
private theorem k5t5p0_part_5 : ClosureCheck k5t5p0.graph (k5t5p0.initialMatrix 5) 5 5 k5t5p0.closure := by
|
| 1151 |
+
rw [k5t5p0_initial_eq]
|
| 1152 |
+
exact k5t5p0_closure_0
|
| 1153 |
+
|
| 1154 |
+
private theorem k5t5p0_part_6 : k5t5p0.bad.Check k5t5p0.graph (k5t5p0.matrix 5) 5 5 := by
|
| 1155 |
+
rw [k5t5p0_matrix_eq]
|
| 1156 |
+
decide
|
| 1157 |
+
|
| 1158 |
+
theorem k5t5p0_check : k5t5p0.Check 5 5 [[], [], [], [], []] :=
|
| 1159 |
+
⟨k5t5p0_part_0, k5t5p0_part_1, k5t5p0_part_2, k5t5p0_part_3, k5t5p0_part_4, k5t5p0_part_5, k5t5p0_part_6⟩
|
| 1160 |
+
end CycleClique.Construction.Certificates
|
| 1161 |
+
|
| 1162 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK6.lean
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK7.lean
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK8.lean
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertificatesK9.lean
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CertifiedRamseyReduction.lean
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage
|
| 2 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.CanonicalRawCoverage
|
| 3 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiniteRangeReduction
|
| 4 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.RamseyMainReduction
|
| 5 |
+
|
| 6 |
+
namespace OAI
|
| 7 |
+
|
| 8 |
+
/-! Mathematical assembly for a fixed cycle parameter, once its concrete
|
| 9 |
+
finite certificate coverage has been proved. -/
|
| 10 |
+
|
| 11 |
+
namespace CycleClique.Construction
|
| 12 |
+
open scoped Classical
|
| 13 |
+
|
| 14 |
+
def CertificateCoverageAt (k : ℕ) : Prop :=
|
| 15 |
+
∀ t, 3 ≤ t → t ≤ k → t ≤ 8 → k / 2 ≤ t →
|
| 16 |
+
∀ P ∈ pathPatterns t (k - t), HasCheckedCertificate k t P
|
| 17 |
+
|
| 18 |
+
theorem no_expanded_counterexample_of_coverage (hCE : CEAlphaTwo) {k : ℕ}
|
| 19 |
+
(hcoverage : CertificateCoverageAt k)
|
| 20 |
+
{V : Type} [Fintype V] {G : SimpleGraph V} {a : ℕ}
|
| 21 |
+
(hk : 5 ≤ k) (ha : 2 ≤ a) (hak : a ≤ k)
|
| 22 |
+
(hcard : Fintype.card V = k * a + 1) (hI : IndependenceBound G a)
|
| 23 |
+
(hcycle : ¬ HasCycle G (k + 1))
|
| 24 |
+
(hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty →
|
| 25 |
+
k * I.card + 1 ≤ (closedNeighborhood G I).card) : False := by
|
| 26 |
+
classical
|
| 27 |
+
obtain ⟨_, hω3, hωhi, hhalf⟩ :=
|
| 28 |
+
finite_range_clique_bounds hCE hk ha hak hcard hI hcycle hexpand
|
| 29 |
+
obtain ⟨Q, hQ⟩ := G.exists_isNClique_cliqueNum
|
| 30 |
+
have hQcard := hQ.card_eq
|
| 31 |
+
have hQk : Q.card ≤ k := by omega
|
| 32 |
+
obtain ⟨S, hopt⟩ := ExpandedPathSystem.exists_optimal G Q k
|
| 33 |
+
obtain ⟨P, U, hP, hUv, hUa, hUe, hp, hne⟩ := hopt.exists_canonical_raw
|
| 34 |
+
obtain ⟨n, c, hc⟩ := hcoverage Q.card (by omega) hQk (by omega) (by omega) P hP
|
| 35 |
+
exact c.false_of_check hCE hk (by omega) hQk hQ.isClique hcycle (by omega)
|
| 36 |
+
(fun I hi => (hI I hi).trans hak) hexpand hopt U hUv hUa hUe hp hne hc
|
| 37 |
+
|
| 38 |
+
theorem cycle_clique_upper_of_coverage (hCE : CEAlphaTwo) {k a : ℕ}
|
| 39 |
+
(hk : 5 ≤ k) (ha : 2 ≤ a) (hak : a ≤ k) (hcoverage : CertificateCoverageAt k) :
|
| 40 |
+
RamseyProperty (k + 1) (a + 1) (k * a + 1) := by
|
| 41 |
+
apply ramseyProperty_of_expanded_exclusion (by omega) ha hak
|
| 42 |
+
intro b hb hbk G hcycle hI hexpand
|
| 43 |
+
exact no_expanded_counterexample_of_coverage hCE hcoverage hk hb hbk (by simp) hI hcycle hexpand
|
| 44 |
+
|
| 45 |
+
theorem isRamseyNumber_of_certificate_coverage (hCE : CEAlphaTwo) {m n : ℕ}
|
| 46 |
+
(hm : 6 ≤ m) (hn : 3 ≤ n) (hnm : n ≤ m)
|
| 47 |
+
(hcoverage : CertificateCoverageAt (m - 1)) :
|
| 48 |
+
IsRamseyNumber m n ((m - 1) * (n - 1) + 1) := by
|
| 49 |
+
have hm' : m - 1 + 1 = m := by omega
|
| 50 |
+
have hn' : n - 1 + 1 = n := by omega
|
| 51 |
+
apply isRamseyNumber_of_upper_lower
|
| 52 |
+
· simpa only [hm', hn'] using cycle_clique_upper_of_coverage hCE
|
| 53 |
+
(k := m - 1) (a := n - 1) (by omega) (by omega) (by omega) hcoverage
|
| 54 |
+
· exact blockGraph_not_ramsey (by omega) (by omega)
|
| 55 |
+
|
| 56 |
+
end CycleClique.Construction
|
| 57 |
+
|
| 58 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ChainCounts.lean
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.NormalizeChains
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-! Count assigned paths before and after deleting singleton chain pieces. -/
|
| 6 |
+
|
| 7 |
+
namespace CycleClique.Construction
|
| 8 |
+
variable {V : Type*} {G : SimpleGraph V} {Q : Finset V}
|
| 9 |
+
|
| 10 |
+
noncomputable def chainCliqueCount (Q : Finset V) (l : List V) : ℕ := by
|
| 11 |
+
classical
|
| 12 |
+
exact (l.filter (fun v => decide (v ∈ Q))).length
|
| 13 |
+
|
| 14 |
+
noncomputable def rawAssignedCount (Q : Finset V) (C : List (List V)) : ℕ :=
|
| 15 |
+
(C.map (fun l => chainCliqueCount Q l - 1)).sum
|
| 16 |
+
|
| 17 |
+
@[simp] theorem chainCliqueCount_append (A B : List V) :
|
| 18 |
+
chainCliqueCount Q (A ++ B) = chainCliqueCount Q A + chainCliqueCount Q B := by
|
| 19 |
+
classical
|
| 20 |
+
simp [chainCliqueCount, List.filter_append]
|
| 21 |
+
|
| 22 |
+
@[simp] theorem chainCliqueCount_reverse (A : List V) :
|
| 23 |
+
chainCliqueCount Q A.reverse = chainCliqueCount Q A := by
|
| 24 |
+
classical
|
| 25 |
+
simp [chainCliqueCount, List.filter_reverse]
|
| 26 |
+
|
| 27 |
+
theorem chainCliqueCount_eq_zero {J : List V} (hJ : ∀ z ∈ J, z ∉ Q) :
|
| 28 |
+
chainCliqueCount Q J = 0 := by
|
| 29 |
+
classical
|
| 30 |
+
simp only [chainCliqueCount, List.length_eq_zero_iff, List.filter_eq_nil_iff]
|
| 31 |
+
intro z hz
|
| 32 |
+
simpa using hJ z hz
|
| 33 |
+
|
| 34 |
+
@[simp] theorem rawAssignedCount_append (A B : List (List V)) :
|
| 35 |
+
rawAssignedCount Q (A ++ B) = rawAssignedCount Q A + rawAssignedCount Q B := by
|
| 36 |
+
simp [rawAssignedCount]
|
| 37 |
+
|
| 38 |
+
theorem chainCliqueCount_pos {l : List V} (hne : l ≠ [])
|
| 39 |
+
(hhead : ∀ v ∈ l.head?, v ∈ Q) : 1 ≤ chainCliqueCount Q l := by
|
| 40 |
+
classical
|
| 41 |
+
have hm : l.head hne ∈ l.filter (fun v => decide (v ∈ Q)) := by
|
| 42 |
+
apply List.mem_filter.mpr
|
| 43 |
+
exact ⟨List.head_mem hne, by simpa using hhead _ (List.head?_eq_some_head hne)⟩
|
| 44 |
+
exact List.length_pos_iff.mpr (List.ne_nil_of_mem hm)
|
| 45 |
+
|
| 46 |
+
theorem chainCliqueCount_pos_last {l : List V} (hne : l ≠ [])
|
| 47 |
+
(hlast : ∀ v ∈ l.getLast?, v ∈ Q) : 1 ≤ chainCliqueCount Q l := by
|
| 48 |
+
rw [← chainCliqueCount_reverse]
|
| 49 |
+
exact chainCliqueCount_pos (by simpa using hne) (by simpa using hlast)
|
| 50 |
+
|
| 51 |
+
theorem chainCliqueCount_flatten (C : List (List V)) :
|
| 52 |
+
chainCliqueCount Q C.flatten = (C.map (chainCliqueCount Q)).sum := by
|
| 53 |
+
classical
|
| 54 |
+
simp only [chainCliqueCount, List.filter_flatten, List.length_flatten, List.map_map,
|
| 55 |
+
Function.comp_def]
|
| 56 |
+
rfl
|
| 57 |
+
|
| 58 |
+
theorem rawAssignedCount_add_length (C : List (List V))
|
| 59 |
+
(hpos : ∀ l ∈ C, 1 ≤ chainCliqueCount Q l) :
|
| 60 |
+
rawAssignedCount Q C + C.length = chainCliqueCount Q C.flatten := by
|
| 61 |
+
rw [chainCliqueCount_flatten]
|
| 62 |
+
induction C with
|
| 63 |
+
| nil => simp [rawAssignedCount]
|
| 64 |
+
| cons l C ih =>
|
| 65 |
+
have hl := hpos l (by simp)
|
| 66 |
+
have hi := ih (fun l hl => hpos l (by simp [hl]))
|
| 67 |
+
simp only [rawAssignedCount, List.map_cons, List.sum_cons, List.length_cons] at hi ⊢
|
| 68 |
+
omega
|
| 69 |
+
|
| 70 |
+
theorem ExpandedPathSystem.incident_eq_chainCliqueCount (S : ExpandedPathSystem G Q) :
|
| 71 |
+
S.incident = chainCliqueCount Q S.chains.flatten := by
|
| 72 |
+
classical
|
| 73 |
+
have heq : S.vertices ∩ Q =
|
| 74 |
+
(S.chains.flatten.filter (fun v => decide (v ∈ Q))).toFinset := by
|
| 75 |
+
ext v
|
| 76 |
+
simp [ExpandedPathSystem.vertices]
|
| 77 |
+
aesop
|
| 78 |
+
unfold incident
|
| 79 |
+
rw [heq, List.toFinset_card_of_nodup (S.flatten_nodup.filter _)]
|
| 80 |
+
rfl
|
| 81 |
+
|
| 82 |
+
theorem ExpandedPathSystem.assignedCount_eq_raw (S : ExpandedPathSystem G Q) :
|
| 83 |
+
S.assignedCount = rawAssignedCount Q S.chains := by
|
| 84 |
+
have hpos : ∀ l ∈ S.chains, 1 ≤ chainCliqueCount Q l := by
|
| 85 |
+
intro l hl
|
| 86 |
+
apply chainCliqueCount_pos
|
| 87 |
+
· intro heq
|
| 88 |
+
have hh := S.nontrivial l hl
|
| 89 |
+
simp [heq] at hh
|
| 90 |
+
· exact (S.endpoints l hl).1
|
| 91 |
+
have h := rawAssignedCount_add_length S.chains hpos
|
| 92 |
+
rw [← S.incident_eq_chainCliqueCount] at h
|
| 93 |
+
unfold assignedCount
|
| 94 |
+
omega
|
| 95 |
+
|
| 96 |
+
theorem short_chainCliqueCount {l : List V} (hne : l ≠ [])
|
| 97 |
+
(hends : (∀ v ∈ l.head?, v ∈ Q) ∧ (∀ v ∈ l.getLast?, v ∈ Q))
|
| 98 |
+
(hsteps : l.IsChain (fun x y => ¬ (x ∈ Q ∧ y ∈ Q)))
|
| 99 |
+
(hlen : l.length < 3) : chainCliqueCount Q l = 1 := by
|
| 100 |
+
classical
|
| 101 |
+
cases l with
|
| 102 |
+
| nil => exact False.elim (hne rfl)
|
| 103 |
+
| cons x l =>
|
| 104 |
+
cases l with
|
| 105 |
+
| nil =>
|
| 106 |
+
have hx := hends.1 x (by simp)
|
| 107 |
+
simp [chainCliqueCount, hx]
|
| 108 |
+
| cons y l =>
|
| 109 |
+
have hy := short_chain_in_clique hends hsteps hlen
|
| 110 |
+
have hxQ := hy x (by simp)
|
| 111 |
+
have hyQ := hy y (by simp)
|
| 112 |
+
exact False.elim ((List.isChain_cons_cons.mp hsteps).1 ⟨hxQ, hyQ⟩)
|
| 113 |
+
|
| 114 |
+
theorem short_chainCliqueCount_le {l : List V}
|
| 115 |
+
(hends : (∀ v ∈ l.head?, v ∈ Q) ∧ (∀ v ∈ l.getLast?, v ∈ Q))
|
| 116 |
+
(hsteps : l.IsChain (fun x y => ¬ (x ∈ Q ∧ y ∈ Q)))
|
| 117 |
+
(hlen : l.length < 3) : chainCliqueCount Q l ≤ 1 := by
|
| 118 |
+
by_cases he : l = []
|
| 119 |
+
· subst l
|
| 120 |
+
simp [chainCliqueCount]
|
| 121 |
+
· rw [short_chainCliqueCount he hends hsteps hlen]
|
| 122 |
+
|
| 123 |
+
theorem normalizeChains_assignedCount (C : List (List V))
|
| 124 |
+
(hpaths : ∀ l ∈ C, l.Nodup ∧ l.IsChain G.Adj)
|
| 125 |
+
(hdis : C.Pairwise List.Disjoint)
|
| 126 |
+
(hends : ∀ l ∈ C, (∀ v ∈ l.head?, v ∈ Q) ∧ (∀ v ∈ l.getLast?, v ∈ Q))
|
| 127 |
+
(hsteps : ∀ l ∈ C, l.IsChain (fun x y => ¬ (x ∈ Q ∧ y ∈ Q))) :
|
| 128 |
+
(normalizeChains C hpaths hdis hends hsteps).assignedCount = rawAssignedCount Q C := by
|
| 129 |
+
classical
|
| 130 |
+
rw [ExpandedPathSystem.assignedCount_eq_raw]
|
| 131 |
+
change rawAssignedCount Q (C.filter (fun l => decide (3 ≤ l.length))) = _
|
| 132 |
+
induction C with
|
| 133 |
+
| nil => simp [rawAssignedCount]
|
| 134 |
+
| cons l C ih =>
|
| 135 |
+
have ht := ih (fun l hl => hpaths l (by simp [hl]))
|
| 136 |
+
(List.pairwise_cons.mp hdis).2
|
| 137 |
+
(fun l hl => hends l (by simp [hl]))
|
| 138 |
+
(fun l hl => hsteps l (by simp [hl]))
|
| 139 |
+
by_cases hl : 3 ≤ l.length
|
| 140 |
+
· simpa [List.filter_cons, hl, rawAssignedCount] using
|
| 141 |
+
congrArg (fun n => chainCliqueCount Q l - 1 + n) ht
|
| 142 |
+
· have hc := short_chainCliqueCount_le
|
| 143 |
+
(hends l (by simp)) (hsteps l (by simp)) (by omega)
|
| 144 |
+
have hz : chainCliqueCount Q l - 1 = 0 := by omega
|
| 145 |
+
simpa [List.filter_cons, hl, rawAssignedCount, hz] using ht
|
| 146 |
+
|
| 147 |
+
end CycleClique.Construction
|
| 148 |
+
|
| 149 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CliqueThree.lean
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.Size
|
| 2 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.LargeClique
|
| 3 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.LowerBound
|
| 4 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.Monotonicity
|
| 5 |
+
|
| 6 |
+
namespace OAI
|
| 7 |
+
|
| 8 |
+
/-! The `n=3`, `m≥6` part of the formula, conditional on the same precise
|
| 9 |
+
published Hamiltonicity input as the size test. -/
|
| 10 |
+
|
| 11 |
+
namespace CycleClique.Construction
|
| 12 |
+
theorem cycle_clique_three_upper (hCE : CEAlphaTwo) {k : ℕ} (hk : 5 ≤ k) :
|
| 13 |
+
RamseyProperty (k + 1) 3 (2 * k + 1) := by
|
| 14 |
+
intro G
|
| 15 |
+
by_cases hc : HasCycle G (k + 1)
|
| 16 |
+
· exact Or.inl hc
|
| 17 |
+
· apply Or.inr
|
| 18 |
+
apply size_test_graph hCE hk (show 1 ≤ k by omega) hc
|
| 19 |
+
(cliqueNum_le_of_no_cycle (by omega) hc)
|
| 20 |
+
simp only [Fintype.card_fin]
|
| 21 |
+
omega
|
| 22 |
+
|
| 23 |
+
theorem cycle_clique_three_ge_six (hCE : CEAlphaTwo) {m : ℕ} (hm : 6 ≤ m) :
|
| 24 |
+
IsRamseyNumber m 3 ((m - 1) * 2 + 1) := by
|
| 25 |
+
have hk : 5 ≤ m - 1 := by omega
|
| 26 |
+
have hm' : m - 1 + 1 = m := by omega
|
| 27 |
+
apply isRamseyNumber_of_upper_lower
|
| 28 |
+
· simpa only [hm', Nat.mul_comm] using cycle_clique_three_upper hCE hk
|
| 29 |
+
· simpa only [hm', Nat.mul_comm] using
|
| 30 |
+
(blockGraph_not_ramsey (a := 2) (k := m - 1) (m := m) (n := 3)
|
| 31 |
+
(by omega) (by omega))
|
| 32 |
+
|
| 33 |
+
end CycleClique.Construction
|
| 34 |
+
|
| 35 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CliqueTraversal.lean
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.LongestPaths
|
| 2 |
+
import Mathlib.Data.List.ChainOfFn
|
| 3 |
+
import Mathlib.Data.List.FinRange
|
| 4 |
+
|
| 5 |
+
namespace OAI
|
| 6 |
+
|
| 7 |
+
/-! Simple paths through all clique vertices with prescribed distinct ends. -/
|
| 8 |
+
|
| 9 |
+
namespace CycleClique.Construction
|
| 10 |
+
theorem indexedPath_ofFn_chain {V : Type*} {G : SimpleGraph V} {r : ℕ}
|
| 11 |
+
{f : Fin (r + 1) → V} (hf : IsIndexedPath G f) :
|
| 12 |
+
(List.ofFn f).Nodup ∧ (List.ofFn f).IsChain G.Adj := by
|
| 13 |
+
refine ⟨List.nodup_ofFn.mpr hf.1, List.isChain_ofFn.mpr ?_⟩
|
| 14 |
+
intro i hi
|
| 15 |
+
exact hf.2 ⟨i, by omega⟩
|
| 16 |
+
|
| 17 |
+
theorem indexedPath_of_list {V : Type*} {G : SimpleGraph V} {r : ℕ}
|
| 18 |
+
(L : List V) (hL : L.Nodup) (hchain : L.IsChain G.Adj) (hlen : L.length = r + 1) :
|
| 19 |
+
IsIndexedPath G (fun i : Fin (r + 1) => L.get (Fin.cast hlen.symm i)) := by
|
| 20 |
+
refine ⟨hL.injective_get.comp (Fin.cast_injective _), ?_⟩
|
| 21 |
+
intro i
|
| 22 |
+
exact (List.isChain_iff_getElem.mp hchain) i.val (by have := i.isLt; omega)
|
| 23 |
+
|
| 24 |
+
private theorem chain_of_pairwise {V : Type*} {R : V → V → Prop} {L : List V}
|
| 25 |
+
(h : L.Pairwise R) : L.IsChain R := by
|
| 26 |
+
induction h with
|
| 27 |
+
| nil => exact .nil
|
| 28 |
+
| @cons a l hrel _ ih =>
|
| 29 |
+
exact ih.cons (fun b hb => hrel b (List.mem_of_mem_head? hb))
|
| 30 |
+
|
| 31 |
+
theorem chain_of_clique_nodup {V : Type*} {G : SimpleGraph V} {E : Finset V}
|
| 32 |
+
(hclique : G.IsClique (E : Set V)) {L : List V} (hL : L.Nodup)
|
| 33 |
+
(hmem : ∀ v ∈ L, v ∈ E) : L.IsChain G.Adj := by
|
| 34 |
+
apply chain_of_pairwise
|
| 35 |
+
exact hL.pairwise_of_forall_ne
|
| 36 |
+
(fun a ha b hb hab => hclique (hmem a ha) (hmem b hb) hab)
|
| 37 |
+
|
| 38 |
+
theorem exists_clique_traversal {V : Type*} [DecidableEq V]
|
| 39 |
+
{G : SimpleGraph V} {E : Finset V} (hclique : G.IsClique (E : Set V))
|
| 40 |
+
{a b : V} (ha : a ∈ E) (hb : b ∈ E) (hab : a ≠ b) :
|
| 41 |
+
∃ L : List V, L.Nodup ∧ L.IsChain G.Adj ∧ L.length = E.card ∧
|
| 42 |
+
L.head? = some a ∧ L.getLast? = some b ∧ ∀ v ∈ L, v ∈ E := by
|
| 43 |
+
classical
|
| 44 |
+
let M := ((E.erase a).erase b).toList
|
| 45 |
+
let L := a :: (M ++ [b])
|
| 46 |
+
have hM : ∀ v ∈ M, v ∈ E ∧ v ≠ a ∧ v ≠ b := by
|
| 47 |
+
intro v hv
|
| 48 |
+
have hm : v ∈ (E.erase a).erase b := by simpa [M] using hv
|
| 49 |
+
exact ⟨Finset.mem_of_mem_erase (Finset.mem_of_mem_erase hm),
|
| 50 |
+
(Finset.mem_erase.mp (Finset.mem_of_mem_erase hm)).1,
|
| 51 |
+
(Finset.mem_erase.mp hm).1⟩
|
| 52 |
+
have hL : L.Nodup := by
|
| 53 |
+
apply List.nodup_cons.mpr
|
| 54 |
+
constructor
|
| 55 |
+
· intro h
|
| 56 |
+
rcases List.mem_append.mp h with h | h
|
| 57 |
+
· exact (hM a h).2.1 rfl
|
| 58 |
+
· have heq : a = b := by simpa using h
|
| 59 |
+
exact hab heq
|
| 60 |
+
· apply List.nodup_append.mpr
|
| 61 |
+
refine ⟨Finset.nodup_toList _, by simp, ?_⟩
|
| 62 |
+
intro v hv b' hb' heq
|
| 63 |
+
have hb'eq : b' = b := by simpa using hb'
|
| 64 |
+
exact (hM v hv).2.2 (heq.trans hb'eq)
|
| 65 |
+
have hmem : ∀ v ∈ L, v ∈ E := by
|
| 66 |
+
intro v hv
|
| 67 |
+
rcases List.mem_cons.mp hv with rfl | hv
|
| 68 |
+
· exact ha
|
| 69 |
+
· rcases List.mem_append.mp hv with hv | hv
|
| 70 |
+
· exact (hM v hv).1
|
| 71 |
+
· have heq : v = b := by simpa using hv
|
| 72 |
+
exact heq ▸ hb
|
| 73 |
+
have hlen : L.length = E.card := by
|
| 74 |
+
have hea := Finset.card_erase_add_one ha
|
| 75 |
+
have hba : b ∈ E.erase a := Finset.mem_erase.mpr ⟨hab.symm, hb⟩
|
| 76 |
+
have heb := Finset.card_erase_add_one hba
|
| 77 |
+
dsimp [L, M]
|
| 78 |
+
simp only [List.length_cons, List.length_append, Finset.length_toList, List.length_nil]
|
| 79 |
+
omega
|
| 80 |
+
exact ⟨L, hL, chain_of_clique_nodup hclique hL hmem, hlen, rfl,
|
| 81 |
+
by
|
| 82 |
+
change ((a :: M) ++ [b]).getLast? = some b
|
| 83 |
+
exact List.getLast?_append_cons (a :: M) b [], hmem⟩
|
| 84 |
+
|
| 85 |
+
end CycleClique.Construction
|
| 86 |
+
|
| 87 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ClosedIndexed.lean
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.ColouredPathStart
|
| 2 |
+
import Mathlib.Algebra.Group.Fin.Basic
|
| 3 |
+
|
| 4 |
+
namespace OAI
|
| 5 |
+
|
| 6 |
+
/-! An indexed path whose endpoints are adjacent can be started at any of its vertices. -/
|
| 7 |
+
|
| 8 |
+
namespace CycleClique.Construction
|
| 9 |
+
theorem cycleNext_eq_add_one {r : ℕ} (i : Fin (r + 1)) : cycleNext i = i + 1 := by
|
| 10 |
+
cases r with
|
| 11 |
+
| zero =>
|
| 12 |
+
apply Fin.ext
|
| 13 |
+
have h₁ := (cycleNext i).isLt
|
| 14 |
+
have h₂ := (i + 1).isLt
|
| 15 |
+
omega
|
| 16 |
+
| succ r => apply Fin.ext; rfl
|
| 17 |
+
|
| 18 |
+
theorem indexedPath_closed_cycle {V : Type*} {G : SimpleGraph V} {r : ℕ}
|
| 19 |
+
{f : Fin (r + 1) → V} (hf : IsIndexedPath G f)
|
| 20 |
+
(hclose : G.Adj (f (Fin.last r)) (f 0)) :
|
| 21 |
+
∀ i, G.Adj (f i) (f (cycleNext i)) := by
|
| 22 |
+
intro i
|
| 23 |
+
by_cases hi : i.val = r
|
| 24 |
+
· have heq : i = Fin.last r := Fin.ext hi
|
| 25 |
+
have hn : cycleNext i = 0 := by
|
| 26 |
+
apply Fin.ext
|
| 27 |
+
simp only [cycleNext, hi, Nat.mod_self, Fin.val_zero]
|
| 28 |
+
rw [hn, heq]
|
| 29 |
+
exact hclose
|
| 30 |
+
· let j : Fin r := ⟨i.val, by have := i.isLt; omega⟩
|
| 31 |
+
have hleft : j.castSucc = i := Fin.ext rfl
|
| 32 |
+
have hright : j.succ = cycleNext i := by
|
| 33 |
+
apply Fin.ext
|
| 34 |
+
exact (Nat.mod_eq_of_lt (by have := i.isLt; omega)).symm
|
| 35 |
+
simpa only [hleft, hright] using hf.2 j
|
| 36 |
+
|
| 37 |
+
theorem indexedPath_closed_ending {V : Type*} {G : SimpleGraph V} {r : ℕ}
|
| 38 |
+
{f : Fin (r + 1) → V} (hf : IsIndexedPath G f)
|
| 39 |
+
(hclose : G.Adj (f (Fin.last r)) (f 0)) (j : Fin (r + 1)) :
|
| 40 |
+
∃ g : Fin (r + 1) → V, IsIndexedPath G g ∧
|
| 41 |
+
g (Fin.last r) = f j ∧ Set.range g = Set.range f := by
|
| 42 |
+
let c := j - Fin.last r
|
| 43 |
+
let g : Fin (r + 1) → V := fun i => f (i + c)
|
| 44 |
+
have hadd : ∀ i : Fin r, i.succ = i.castSucc + (1 : Fin (r + 1)) := by
|
| 45 |
+
intro i
|
| 46 |
+
apply Fin.ext
|
| 47 |
+
rw [Fin.val_add_one_of_lt (show i.castSucc < Fin.last r from i.isLt)]
|
| 48 |
+
rfl
|
| 49 |
+
have hg : IsIndexedPath G g := by
|
| 50 |
+
refine ⟨hf.1.comp (fun a b h => add_right_cancel h), ?_⟩
|
| 51 |
+
intro i
|
| 52 |
+
have h := indexedPath_closed_cycle hf hclose (i.castSucc + c)
|
| 53 |
+
simpa only [g, cycleNext_eq_add_one, hadd, add_assoc, add_comm 1 c] using h
|
| 54 |
+
refine ⟨g, hg, ?_, ?_⟩
|
| 55 |
+
· change f (Fin.last r + (j - Fin.last r)) = f j
|
| 56 |
+
congr 1
|
| 57 |
+
abel
|
| 58 |
+
· ext v
|
| 59 |
+
constructor
|
| 60 |
+
· rintro ⟨i, rfl⟩
|
| 61 |
+
exact ⟨i + c, rfl⟩
|
| 62 |
+
· rintro ⟨i, rfl⟩
|
| 63 |
+
exact ⟨i - c, by simp [g]⟩
|
| 64 |
+
|
| 65 |
+
end CycleClique.Construction
|
| 66 |
+
|
| 67 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ClosureCertificates.lean
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiniteAttachments
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-! Soundness of the checker's hypothetical zero/one attachment rules.
|
| 6 |
+
Each local contradiction is witnessed by explicit required paths and a
|
| 7 |
+
checked bad state; inherited constraints refer only to earlier states. -/
|
| 8 |
+
|
| 9 |
+
namespace CycleClique.Construction
|
| 10 |
+
structure EdgeAttachmentData (n : ℕ) where
|
| 11 |
+
i : Fin n
|
| 12 |
+
j : Fin n
|
| 13 |
+
required : List (RequiredPathData (Fin n))
|
| 14 |
+
bad : BadData n
|
| 15 |
+
deriving DecidableEq
|
| 16 |
+
|
| 17 |
+
structure FreshAttachmentData (n : ℕ) where
|
| 18 |
+
i : Fin n
|
| 19 |
+
j : Fin n
|
| 20 |
+
required : List (RequiredPathData (Fin (n + 1)))
|
| 21 |
+
bad : BadData (n + 1)
|
| 22 |
+
deriving DecidableEq
|
| 23 |
+
|
| 24 |
+
variable {n : ℕ}
|
| 25 |
+
|
| 26 |
+
def EdgeAttachmentData.Check (H : SimpleGraph (Fin n)) (M : ForbiddenMatrix n)
|
| 27 |
+
(k t : ℕ) (c : EdgeAttachmentData n) : Prop :=
|
| 28 |
+
(∀ p ∈ c.required, p.Check (addedEdgeGraph H c.i c.j) k) ∧
|
| 29 |
+
c.bad.Check (addedEdgeGraph H c.i c.j)
|
| 30 |
+
(fun a b => M a b ∪ requiredMatrix k c.required a b) k t
|
| 31 |
+
|
| 32 |
+
def FreshAttachmentData.Check (H : SimpleGraph (Fin n)) (M : ForbiddenMatrix n)
|
| 33 |
+
(k t : ℕ) (c : FreshAttachmentData n) : Prop :=
|
| 34 |
+
c.i ≠ c.j ∧ (∀ p ∈ c.required, p.Check (freshGraph H c.i c.j) k) ∧
|
| 35 |
+
c.bad.Check (freshGraph H c.i c.j)
|
| 36 |
+
(fun a b => freshMatrix M a b ∪ requiredMatrix k c.required a b) k t
|
| 37 |
+
|
| 38 |
+
instance (H : SimpleGraph (Fin n)) [DecidableRel H.Adj] (M : ForbiddenMatrix n)
|
| 39 |
+
(k t : ℕ) (c : EdgeAttachmentData n) : Decidable (c.Check H M k t) :=
|
| 40 |
+
inferInstanceAs (Decidable (_ ∧ _))
|
| 41 |
+
|
| 42 |
+
instance (H : SimpleGraph (Fin n)) [DecidableRel H.Adj] (M : ForbiddenMatrix n)
|
| 43 |
+
(k t : ℕ) (c : FreshAttachmentData n) : Decidable (c.Check H M k t) :=
|
| 44 |
+
inferInstanceAs (Decidable (_ ∧ _))
|
| 45 |
+
|
| 46 |
+
variable {V : Type} [Fintype V] {G : SimpleGraph V} {H : SimpleGraph (Fin n)}
|
| 47 |
+
|
| 48 |
+
theorem EdgeAttachmentData.forbids (hCE : CEAlphaTwo) {k t : ℕ}
|
| 49 |
+
(hk : 5 ≤ k) (ht : 1 ≤ t) (hcycle : ¬ HasCycle G (k + 1))
|
| 50 |
+
(hclique : G.cliqueNum ≤ t) (hbound : IndependenceBound G k)
|
| 51 |
+
(f : H →g G) (hf : Function.Injective f) {X : Finset V}
|
| 52 |
+
(hfX : ∀ i, f i ∈ X) (hX : X.card = n)
|
| 53 |
+
{M : ForbiddenMatrix n} (hM : M.Sound G X f)
|
| 54 |
+
(hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty →
|
| 55 |
+
k * I.card + 1 ≤ (closedNeighborhood G I).card)
|
| 56 |
+
(c : EdgeAttachmentData n) (hc : c.Check H M k t) :
|
| 57 |
+
¬ OutsidePath G (X : Set V) (f c.i) (f c.j) 0 := by
|
| 58 |
+
intro h
|
| 59 |
+
let F := addedEdgeHom f (outsidePath_zero.mp h)
|
| 60 |
+
have hR := requiredMatrix_sound (by omega) hcycle F hf hfX c.required hc.1
|
| 61 |
+
exact c.bad.false_of_check hCE hk ht hcycle hclique hbound F hf hfX hX
|
| 62 |
+
(hM.union hR) hexpand hc.2
|
| 63 |
+
|
| 64 |
+
theorem FreshAttachmentData.forbids (hCE : CEAlphaTwo) {k t : ℕ}
|
| 65 |
+
(hk : 5 ≤ k) (ht : 1 ≤ t) (hcycle : ¬ HasCycle G (k + 1))
|
| 66 |
+
(hclique : G.cliqueNum ≤ t) (hbound : IndependenceBound G k)
|
| 67 |
+
(f : H →g G) (hf : Function.Injective f) {X : Finset V}
|
| 68 |
+
(hfX : ∀ i, f i ∈ X) (hX : X.card = n)
|
| 69 |
+
{M : ForbiddenMatrix n} (hM : M.Sound G X f)
|
| 70 |
+
(hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty →
|
| 71 |
+
k * I.card + 1 ≤ (closedNeighborhood G I).card)
|
| 72 |
+
(c : FreshAttachmentData n) (hc : c.Check H M k t) :
|
| 73 |
+
¬ OutsidePath G (X : Set V) (f c.i) (f c.j) 1 := by
|
| 74 |
+
classical
|
| 75 |
+
intro h
|
| 76 |
+
obtain ⟨z, hz, hiz, hjz⟩ := (outsidePath_one_iff_common_neighbor
|
| 77 |
+
(fun he => hc.1 (hf he))).mp h
|
| 78 |
+
have hjz' := hjz.symm
|
| 79 |
+
let F := freshHom f z hiz hjz'
|
| 80 |
+
have hF := freshHom_injective f hf hfX hz hiz hjz'
|
| 81 |
+
have hFX := freshHom_mem f hfX hiz hjz'
|
| 82 |
+
have hX' : (insert z X).card = n + 1 := by rw [Finset.card_insert_of_notMem hz, hX]
|
| 83 |
+
have hM' := freshMatrix_sound f hM hiz hjz'
|
| 84 |
+
have hR := requiredMatrix_sound (by omega) hcycle F hF hFX c.required hc.2.1
|
| 85 |
+
exact c.bad.false_of_check hCE hk ht hcycle hclique hbound F hF hFX hX'
|
| 86 |
+
(hM'.union hR) hexpand hc.2.2
|
| 87 |
+
|
| 88 |
+
end CycleClique.Construction
|
| 89 |
+
|
| 90 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ClosureSteps.lean
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.ClosureCertificates
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-! A finite sequence of locally checked hypothetical attachments builds
|
| 6 |
+
only sound forbidden entries. Every step reads the preceding matrix. -/
|
| 7 |
+
|
| 8 |
+
namespace CycleClique.Construction
|
| 9 |
+
inductive ClosureStep (n : ℕ)
|
| 10 |
+
| edge : EdgeAttachmentData n → ClosureStep n
|
| 11 |
+
| fresh : FreshAttachmentData n → ClosureStep n
|
| 12 |
+
deriving DecidableEq
|
| 13 |
+
|
| 14 |
+
namespace ClosureStep
|
| 15 |
+
|
| 16 |
+
variable {n : ℕ}
|
| 17 |
+
|
| 18 |
+
def source : ClosureStep n → Fin n
|
| 19 |
+
| .edge c => c.i
|
| 20 |
+
| .fresh c => c.i
|
| 21 |
+
|
| 22 |
+
def target : ClosureStep n → Fin n
|
| 23 |
+
| .edge c => c.j
|
| 24 |
+
| .fresh c => c.j
|
| 25 |
+
|
| 26 |
+
def parameter : ClosureStep n → ℕ
|
| 27 |
+
| .edge _ => 0
|
| 28 |
+
| .fresh _ => 1
|
| 29 |
+
|
| 30 |
+
def Check (H : SimpleGraph (Fin n)) (M : ForbiddenMatrix n) (k t : ℕ) : ClosureStep n → Prop
|
| 31 |
+
| .edge c => c.Check H M k t
|
| 32 |
+
| .fresh c => c.Check H M k t
|
| 33 |
+
|
| 34 |
+
instance (H : SimpleGraph (Fin n)) [DecidableRel H.Adj] (M : ForbiddenMatrix n)
|
| 35 |
+
(k t : ℕ) (c : ClosureStep n) : Decidable (c.Check H M k t) := by
|
| 36 |
+
cases c <;> dsimp only [Check] <;> infer_instance
|
| 37 |
+
|
| 38 |
+
def entryMatrix (c : ClosureStep n) : ForbiddenMatrix n := fun i j =>
|
| 39 |
+
if (i = c.source ∧ j = c.target) ∨ (i = c.target ∧ j = c.source)
|
| 40 |
+
then {c.parameter} else ∅
|
| 41 |
+
|
| 42 |
+
def apply (c : ClosureStep n) (M : ForbiddenMatrix n) : ForbiddenMatrix n :=
|
| 43 |
+
fun i j => M i j ∪ c.entryMatrix i j
|
| 44 |
+
|
| 45 |
+
end ClosureStep
|
| 46 |
+
|
| 47 |
+
variable {n : ℕ}
|
| 48 |
+
|
| 49 |
+
def closureMatrix (M : ForbiddenMatrix n) : List (ClosureStep n) → ForbiddenMatrix n
|
| 50 |
+
| [] => M
|
| 51 |
+
| c :: C => closureMatrix (c.apply M) C
|
| 52 |
+
|
| 53 |
+
def ClosureCheck (H : SimpleGraph (Fin n)) (M : ForbiddenMatrix n) (k t : ℕ) :
|
| 54 |
+
List (ClosureStep n) → Prop
|
| 55 |
+
| [] => True
|
| 56 |
+
| c :: C => c.Check H M k t ∧ ClosureCheck H (c.apply M) k t C
|
| 57 |
+
|
| 58 |
+
instance (H : SimpleGraph (Fin n)) [DecidableRel H.Adj] (M : ForbiddenMatrix n)
|
| 59 |
+
(k t : ℕ) (C : List (ClosureStep n)) : Decidable (ClosureCheck H M k t C) := by
|
| 60 |
+
induction C generalizing M with
|
| 61 |
+
| nil => exact isTrue trivial
|
| 62 |
+
| cons c C ih =>
|
| 63 |
+
letI := ih (c.apply M)
|
| 64 |
+
exact inferInstanceAs (Decidable (_ ∧ _))
|
| 65 |
+
|
| 66 |
+
variable {V : Type} [Fintype V] {G : SimpleGraph V} {H : SimpleGraph (Fin n)}
|
| 67 |
+
|
| 68 |
+
theorem ClosureStep.apply_sound (hCE : CEAlphaTwo) {k t : ℕ}
|
| 69 |
+
(hk : 5 ≤ k) (ht : 1 ≤ t) (hcycle : ¬ HasCycle G (k + 1))
|
| 70 |
+
(hclique : G.cliqueNum ≤ t) (hbound : IndependenceBound G k)
|
| 71 |
+
(f : H →g G) (hf : Function.Injective f) {X : Finset V}
|
| 72 |
+
(hfX : ∀ i, f i ∈ X) (hX : X.card = n)
|
| 73 |
+
{M : ForbiddenMatrix n} (hM : M.Sound G X f)
|
| 74 |
+
(hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty →
|
| 75 |
+
k * I.card + 1 ≤ (closedNeighborhood G I).card)
|
| 76 |
+
(c : ClosureStep n) (hc : c.Check H M k t) : (c.apply M).Sound G X f := by
|
| 77 |
+
have hb : ¬ OutsidePath G (X : Set V) (f c.source) (f c.target) c.parameter := by
|
| 78 |
+
cases c with
|
| 79 |
+
| edge c => exact c.forbids hCE hk ht hcycle hclique hbound f hf hfX hX hM hexpand hc
|
| 80 |
+
| fresh c => exact c.forbids hCE hk ht hcycle hclique hbound f hf hfX hX hM hexpand hc
|
| 81 |
+
apply hM.union
|
| 82 |
+
intro i j d hd
|
| 83 |
+
have hpair : (i = c.source ∧ j = c.target) ∨ (i = c.target ∧ j = c.source) := by
|
| 84 |
+
by_contra hn
|
| 85 |
+
simp only [ClosureStep.entryMatrix, hn, ↓reduceIte, Finset.notMem_empty] at hd
|
| 86 |
+
have heq : d = c.parameter := by
|
| 87 |
+
simpa only [ClosureStep.entryMatrix, hpair, ↓reduceIte, Finset.mem_singleton] using hd
|
| 88 |
+
subst d
|
| 89 |
+
rcases hpair with ⟨rfl, rfl⟩ | ⟨rfl, rfl⟩
|
| 90 |
+
· exact hb
|
| 91 |
+
· exact fun h => hb h.reverse
|
| 92 |
+
|
| 93 |
+
theorem closureMatrix_sound (hCE : CEAlphaTwo) {k t : ℕ}
|
| 94 |
+
(hk : 5 ≤ k) (ht : 1 ≤ t) (hcycle : ¬ HasCycle G (k + 1))
|
| 95 |
+
(hclique : G.cliqueNum ≤ t) (hbound : IndependenceBound G k)
|
| 96 |
+
(f : H →g G) (hf : Function.Injective f) {X : Finset V}
|
| 97 |
+
(hfX : ∀ i, f i ∈ X) (hX : X.card = n)
|
| 98 |
+
{M : ForbiddenMatrix n} (hM : M.Sound G X f)
|
| 99 |
+
(hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty →
|
| 100 |
+
k * I.card + 1 ≤ (closedNeighborhood G I).card)
|
| 101 |
+
(C : List (ClosureStep n)) (hC : ClosureCheck H M k t C) :
|
| 102 |
+
(closureMatrix M C).Sound G X f := by
|
| 103 |
+
induction C generalizing M with
|
| 104 |
+
| nil => exact hM
|
| 105 |
+
| cons c C ih =>
|
| 106 |
+
exact ih (c.apply_sound hCE hk ht hcycle hclique hbound f hf hfX hX hM hexpand hC.1) hC.2
|
| 107 |
+
|
| 108 |
+
end CycleClique.Construction
|
| 109 |
+
|
| 110 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ColouredPath.lean
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.PathRotation
|
| 2 |
+
import Mathlib.Combinatorics.SimpleGraph.Bipartite
|
| 3 |
+
import Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected
|
| 4 |
+
|
| 5 |
+
namespace OAI
|
| 6 |
+
|
| 7 |
+
/-!
|
| 8 |
+
# Starting the coloured-path argument
|
| 9 |
+
|
| 10 |
+
The first step of manuscript Lemma `clq:coloured-path` is proved by
|
| 11 |
+
walk induction: preservation of colour across two steps, together with
|
| 12 |
+
one monochromatic edge, makes the colour constant on its component.
|
| 13 |
+
-/
|
| 14 |
+
|
| 15 |
+
namespace CycleClique.Construction
|
| 16 |
+
private theorem color_eq_of_walk {V : Type*} {G : SimpleGraph V} (χ : V → Fin 2)
|
| 17 |
+
(htwo : ∀ {u x v}, G.Adj u x → G.Adj x v → χ u = χ v)
|
| 18 |
+
{u v w : V} (p : G.Walk v w) (huv : G.Adj u v) (heq : χ u = χ v) : χ w = χ v := by
|
| 19 |
+
induction p generalizing u with
|
| 20 |
+
| nil => rfl
|
| 21 |
+
| @cons v z w hvz p ih =>
|
| 22 |
+
have hχ : χ v = χ z := heq.symm.trans (htwo huv hvz)
|
| 23 |
+
exact (ih hvz hχ).trans hχ.symm
|
| 24 |
+
|
| 25 |
+
/-- In a connected nonbipartite graph, any nonconstant two-colouring
|
| 26 |
+
has differently coloured vertices sharing a neighbour. -/
|
| 27 |
+
theorem differently_colored_common_neighbors {V : Type*} {G : SimpleGraph V}
|
| 28 |
+
(hconnected : G.Connected) (hnonbipartite : ¬ G.IsBipartite)
|
| 29 |
+
(χ : V → Fin 2) (hnonconstant : ∃ u v, χ u ≠ χ v) :
|
| 30 |
+
∃ x y z, G.Adj x y ∧ G.Adj x z ∧ χ y ≠ χ z := by
|
| 31 |
+
classical
|
| 32 |
+
by_contra hnone
|
| 33 |
+
have htwo : ∀ {u x v}, G.Adj u x → G.Adj x v → χ u = χ v := by
|
| 34 |
+
intro u x v hux hxv
|
| 35 |
+
by_contra hχ
|
| 36 |
+
exact hnone ⟨x, u, v, hux.symm, hxv, hχ⟩
|
| 37 |
+
have hproper : ∀ {u v}, G.Adj u v → χ u ≠ χ v := by
|
| 38 |
+
intro u v huv heq
|
| 39 |
+
have hconstant : ∀ w, χ w = χ v := by
|
| 40 |
+
intro w
|
| 41 |
+
obtain ⟨p⟩ := hconnected v w
|
| 42 |
+
exact color_eq_of_walk χ htwo p huv heq
|
| 43 |
+
obtain ⟨a, b, hab⟩ := hnonconstant
|
| 44 |
+
exact hab ((hconstant a).trans (hconstant b).symm)
|
| 45 |
+
exact hnonbipartite ⟨SimpleGraph.Coloring.mk χ hproper⟩
|
| 46 |
+
|
| 47 |
+
end CycleClique.Construction
|
| 48 |
+
|
| 49 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ColouredPathFull.lean
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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import OAI.Combinatorics.Ramsey.CycleClique.Construction.AttachmentResidual
|
| 4 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.ResidualPaths
|
| 5 |
+
|
| 6 |
+
namespace OAI
|
| 7 |
+
|
| 8 |
+
/-! The full prescribed-length coloured-path lemma of manuscript Section 3. -/
|
| 9 |
+
|
| 10 |
+
namespace CycleClique.Construction
|
| 11 |
+
private noncomputable def indexedSupport {V : Type*} {r : ℕ}
|
| 12 |
+
(f : Fin (r + 1) → V) : Finset V := by
|
| 13 |
+
classical
|
| 14 |
+
exact Finset.univ.image f
|
| 15 |
+
|
| 16 |
+
private theorem mem_indexedSupport {V : Type*} {r : ℕ} {f : Fin (r + 1) → V} {v : V} :
|
| 17 |
+
v ∈ indexedSupport f ↔ ∃ i, f i = v := by
|
| 18 |
+
classical
|
| 19 |
+
simp [indexedSupport]
|
| 20 |
+
|
| 21 |
+
private theorem indexedSupport_range {V : Type*} {r : ℕ} (f : Fin (r + 1) → V) :
|
| 22 |
+
Set.range f = (indexedSupport f : Set V) := by
|
| 23 |
+
ext v
|
| 24 |
+
exact mem_indexedSupport.symm
|
| 25 |
+
|
| 26 |
+
private theorem indexedSupport_card {V : Type*} {r : ℕ} {f : Fin (r + 1) → V}
|
| 27 |
+
(hf : Function.Injective f) : (indexedSupport f).card = r + 1 := by
|
| 28 |
+
classical
|
| 29 |
+
rw [indexedSupport, Finset.card_image_of_injective _ hf, Finset.card_univ, Fintype.card_fin]
|
| 30 |
+
|
| 31 |
+
/-- Prescribed-length paths with differently coloured endpoints. -/
|
| 32 |
+
theorem colored_path_prescribed_length {V : Type*} [Fintype V] [DecidableEq V]
|
| 33 |
+
{H : SimpleGraph V} {s : ℕ} (hs : 4 ≤ s)
|
| 34 |
+
(hconn : H.Connected) (hnonbip : ¬ H.IsBipartite) (hno : H.cliqueNum < s)
|
| 35 |
+
(hdegree : ∀ v, s ≤ (H.neighborSet v).ncard)
|
| 36 |
+
(hpair : ∀ a b, a ≠ b → ¬ H.Adj a b →
|
| 37 |
+
2 * s ≤ (closedNeighborhood H {a, b}).card)
|
| 38 |
+
(χ : V → Fin 2) (hnonconstant : ∃ a b, χ a ≠ χ b)
|
| 39 |
+
{ℓ : ℕ} (hℓ : 1 ≤ ℓ) (hℓmax : ℓ ≤ 2 * s - 2) :
|
| 40 |
+
∃ g : Fin (ℓ + 1) → V, IsIndexedPath H g ∧ χ (g 0) ≠ χ (g (Fin.last ℓ)) := by
|
| 41 |
+
classical
|
| 42 |
+
by_contra hnone
|
| 43 |
+
obtain ⟨x, y, z, hxy, hxz, hyz⟩ :=
|
| 44 |
+
differently_colored_common_neighbors hconn hnonbip χ hnonconstant
|
| 45 |
+
let D := H.induce {v | v ≠ y ∧ v ≠ z}
|
| 46 |
+
let x' : {v : V | v ≠ y ∧ v ≠ z} := ⟨x, hxy.ne, hxz.ne⟩
|
| 47 |
+
let C := D.connectedComponentMk x'
|
| 48 |
+
let U := componentVertices C
|
| 49 |
+
have hxU : x ∈ U := mem_componentVertices.mpr
|
| 50 |
+
⟨⟨x', SimpleGraph.ConnectedComponent.connectedComponentMk_mem⟩, rfl⟩
|
| 51 |
+
obtain ⟨hyU, hzU⟩ := deleted_not_componentVertices C
|
| 52 |
+
change y ∉ U at hyU
|
| 53 |
+
change z ∉ U at hzU
|
| 54 |
+
have hUavoid : ∀ a ∈ U, a ≠ y ∧ a ≠ z := fun a ha =>
|
| 55 |
+
⟨ne_of_mem_of_not_mem ha hyU, ne_of_mem_of_not_mem ha hzU⟩
|
| 56 |
+
have hcoverU : ∀ a ∈ U, ∀ b, H.Adj a b → b ∈ U ∨ b = y ∨ b = z := by
|
| 57 |
+
intro a ha b hab
|
| 58 |
+
exact componentVertices_neighbor_cover C ha hab
|
| 59 |
+
have hUconn : (H.induce (U : Set V)).Connected := componentVertices_connected C
|
| 60 |
+
obtain ⟨r, f, hf, hstart, hfU, hmax⟩ := exists_longest_path_in H U hxU
|
| 61 |
+
let W := indexedSupport f
|
| 62 |
+
have hWcard : W.card = r + 1 := indexedSupport_card hf.1
|
| 63 |
+
have hWU : W ⊆ U := by
|
| 64 |
+
intro v hv
|
| 65 |
+
obtain ⟨i, rfl⟩ := mem_indexedSupport.mp hv
|
| 66 |
+
exact hfU i
|
| 67 |
+
have hspanning : IsSpanningPath H x W f := ⟨hf.1, hf.2, hstart, indexedSupport_range f⟩
|
| 68 |
+
have havoid : ∀ i, f i ≠ y ∧ f i ≠ z := fun i => hUavoid _ (hfU i)
|
| 69 |
+
have hrshort := no_colored_path_start_bound hxy hxz χ hyz hℓ hnone hf hstart havoid
|
| 70 |
+
have hshort : W.card + 2 < 2 * s := by omega
|
| 71 |
+
let E := pathEnds H x W r
|
| 72 |
+
have hstructure := endpoint_structure hs hno hdegree hpair hyU hzU hWU hcoverU
|
| 73 |
+
hspanning hWcard hshort hmax
|
| 74 |
+
obtain ⟨hEclique, hElower, hEupper, u, huU, huE, htwo, hfull, w, hw, hwy, hwz⟩ := hstructure
|
| 75 |
+
change H.IsClique (E : Set V) at hEclique
|
| 76 |
+
change s - 2 ≤ E.card at hElower
|
| 77 |
+
change E.card ≤ s - 1 at hEupper
|
| 78 |
+
change u ∈ U at huU
|
| 79 |
+
change u ∉ E at huE
|
| 80 |
+
change w ∈ E at hw
|
| 81 |
+
have hEU : E ⊆ U := (pathEnds_subset H x W r).trans hWU
|
| 82 |
+
have hattach : ∀ e ∈ E, ∀ v ∈ U, H.Adj e v → v ∉ E → v = u := by
|
| 83 |
+
intro e he v hv hev hvE
|
| 84 |
+
rcases hfull e he v hev with hv' | hvu | rfl | rfl
|
| 85 |
+
· exact False.elim (hvE hv')
|
| 86 |
+
· exact hvu
|
| 87 |
+
· exact False.elim (hyU hv)
|
| 88 |
+
· exact False.elim (hzU hv)
|
| 89 |
+
have hUnotclique := not_clique_of_two_deleted_neighborhoods
|
| 90 |
+
⟨x, hxU⟩ hyU hno (fun v _ => hdegree v) hcoverU
|
| 91 |
+
have hUorder := two_deleted_component_order hUnotclique hcoverU hpair
|
| 92 |
+
let T := U \ E
|
| 93 |
+
have hTset : (T : Set V) = {v | v ∈ U ∧ v ∉ E} := by ext v; simp [T]
|
| 94 |
+
have hTsum : T.card + E.card = U.card := Finset.card_sdiff_add_card_eq_card hEU
|
| 95 |
+
have hTcard : 2 ≤ T.card := by omega
|
| 96 |
+
have huT : u ∈ T := Finset.mem_sdiff.mpr ⟨huU, huE⟩
|
| 97 |
+
have hTconn : (H.induce (T : Set V)).Connected := by
|
| 98 |
+
rw [hTset]
|
| 99 |
+
exact connected_induce_difference_single_attachment hUconn huU huE hattach
|
| 100 |
+
obtain ⟨q, g, hg, hgstart, hgT, hgmax⟩ := exists_longest_path_in H T huT
|
| 101 |
+
have hq : 1 ≤ q := restricted_longest_nontrivial hTconn hTcard huT hgmax
|
| 102 |
+
let R := indexedSupport g
|
| 103 |
+
let v := g (Fin.last q)
|
| 104 |
+
have hRcard : R.card = q + 1 := indexedSupport_card hg.1
|
| 105 |
+
have hRT : R ⊆ T := by
|
| 106 |
+
intro a ha
|
| 107 |
+
obtain ⟨i, rfl⟩ := mem_indexedSupport.mp ha
|
| 108 |
+
exact hgT i
|
| 109 |
+
have hvR : v ∈ R := mem_indexedSupport.mpr ⟨Fin.last q, rfl⟩
|
| 110 |
+
have huR : u ∈ R := mem_indexedSupport.mpr ⟨0, hgstart⟩
|
| 111 |
+
have hvU : v ∈ U := (Finset.mem_sdiff.mp (hRT hvR)).1
|
| 112 |
+
have hvE : v ∉ E := (Finset.mem_sdiff.mp (hRT hvR)).2
|
| 113 |
+
have hvu : v ≠ u := by
|
| 114 |
+
intro heq
|
| 115 |
+
have hidx := hg.1 (heq.trans hgstart.symm)
|
| 116 |
+
have hval := congrArg Fin.val hidx
|
| 117 |
+
simp only [Fin.val_last, Fin.val_zero] at hval
|
| 118 |
+
omega
|
| 119 |
+
have hspanningR : IsSpanningPath H u R g :=
|
| 120 |
+
⟨hg.1, hg.2, hgstart, indexedSupport_range g⟩
|
| 121 |
+
have hvEnd : v ∈ pathEnds H u R q := mem_pathEnds.mpr ⟨g, hspanningR, rfl⟩
|
| 122 |
+
have hcoverv : ∀ a, H.Adj v a → a ∈ R ∨ a = y ∨ a = z := by
|
| 123 |
+
intro a hva
|
| 124 |
+
rcases hcoverU v hvU a hva with haU | hay | haz
|
| 125 |
+
· have haE : a ∉ E := by
|
| 126 |
+
intro ha
|
| 127 |
+
exact hvu (hattach a ha v hvU hva.symm hvE)
|
| 128 |
+
have haT : a ∈ T := Finset.mem_sdiff.mpr ⟨haU, haE⟩
|
| 129 |
+
exact Or.inl (restricted_endpoint_neighbors hRT hgmax hvEnd a haT hva)
|
| 130 |
+
· exact Or.inr (Or.inl hay)
|
| 131 |
+
· exact Or.inr (Or.inr haz)
|
| 132 |
+
have hvw : v ≠ w := (ne_of_mem_of_not_mem hw hvE).symm
|
| 133 |
+
have hnonadj : ¬ H.Adj v w := fun h => hvu (hattach w hw v hvU h.symm hvE)
|
| 134 |
+
have hcombined := endpoint_residual_order huR hvR hw hcoverv (hfull w hw)
|
| 135 |
+
(hpair v w hvw hnonadj)
|
| 136 |
+
change 2 * s - 2 ≤ E.card + R.card at hcombined
|
| 137 |
+
have hRlist := indexedPath_ofFn_chain hg
|
| 138 |
+
have hRhead : (List.ofFn g).head? = some u := by rw [List.ofFn_succ]; simp [hgstart]
|
| 139 |
+
have hRmem : ∀ a ∈ List.ofFn g, a ∈ R := by
|
| 140 |
+
intro a ha
|
| 141 |
+
exact mem_indexedSupport.mpr ((List.mem_ofFn' g a).mp ha)
|
| 142 |
+
have hRoutside : ∀ a ∈ List.ofFn g, a ∉ E := by
|
| 143 |
+
intro a ha
|
| 144 |
+
exact (Finset.mem_sdiff.mp (hRT (hRmem a ha))).2
|
| 145 |
+
obtain ⟨L, hL, hLchain, hLhead, hLlen, hLmem⟩ := clique_join_remaining_path
|
| 146 |
+
hEclique hw htwo (List.ofFn g) hRlist.1 hRlist.2 hRhead hRoutside
|
| 147 |
+
have hLavoid : ∀ a ∈ L, a ≠ y ∧ a ≠ z := by
|
| 148 |
+
intro a ha
|
| 149 |
+
have haU : a ∈ U := by
|
| 150 |
+
rcases hLmem a ha with haE | haR
|
| 151 |
+
· exact hEU haE
|
| 152 |
+
· exact (Finset.mem_sdiff.mp (hRT (hRmem a haR))).1
|
| 153 |
+
exact hUavoid a haU
|
| 154 |
+
have hLshort := no_colored_path_list_bound hwy hwz χ hyz hℓ hnone hL hLchain hLhead hLavoid
|
| 155 |
+
simp only [List.length_ofFn] at hLlen
|
| 156 |
+
omega
|
| 157 |
+
|
| 158 |
+
end CycleClique.Construction
|
| 159 |
+
|
| 160 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ColouredPathStart.lean
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.ColouredPath
|
| 2 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.DeletedComponent
|
| 3 |
+
|
| 4 |
+
namespace OAI
|
| 5 |
+
|
| 6 |
+
/-! Initial longest-path obstruction in the coloured-path proof. -/
|
| 7 |
+
|
| 8 |
+
namespace CycleClique.Construction
|
| 9 |
+
theorem indexedPath_prefix {V : Type*} {G : SimpleGraph V} {q r : ℕ}
|
| 10 |
+
{f : Fin (q + 1) → V} (hf : IsIndexedPath G f) (hrq : r ≤ q) :
|
| 11 |
+
IsIndexedPath G (fun i : Fin (r + 1) => f (Fin.castLE (by omega) i)) := by
|
| 12 |
+
refine ⟨hf.1.comp (Fin.castLE_injective _), ?_⟩
|
| 13 |
+
intro i
|
| 14 |
+
exact hf.2 ⟨i.val, by have := i.isLt; omega⟩
|
| 15 |
+
|
| 16 |
+
theorem indexedPath_cons {V : Type*} {G : SimpleGraph V} {r : ℕ}
|
| 17 |
+
{f : Fin (r + 1) → V} (hf : IsIndexedPath G f) {v : V}
|
| 18 |
+
(hv : v ∉ Set.range f) (hadj : G.Adj v (f 0)) :
|
| 19 |
+
IsIndexedPath G (Fin.cons v f) := by
|
| 20 |
+
refine ⟨Fin.cons_injective_iff.mpr ⟨hv, hf.1⟩, ?_⟩
|
| 21 |
+
intro i
|
| 22 |
+
refine Fin.cases ?_ (fun j => ?_) i
|
| 23 |
+
· simpa using hadj
|
| 24 |
+
· have heq : j.succ.castSucc = j.castSucc.succ := Fin.ext rfl
|
| 25 |
+
rw [heq]
|
| 26 |
+
simpa only [Fin.cons_succ] using hf.2 j
|
| 27 |
+
|
| 28 |
+
/-- One of two differently coloured common neighbours can prefix any
|
| 29 |
+
path avoiding them, producing different colours at its two ends. -/
|
| 30 |
+
theorem colored_path_of_common_neighbor {V : Type*} {H : SimpleGraph V}
|
| 31 |
+
{x y z : V} (hxy : H.Adj x y) (hxz : H.Adj x z)
|
| 32 |
+
(χ : V → Fin 2) (hyz : χ y ≠ χ z) {q : ℕ}
|
| 33 |
+
{f : Fin (q + 1) → V} (hf : IsIndexedPath H f) (hstart : f 0 = x)
|
| 34 |
+
(havoid : ∀ i, f i ≠ y ∧ f i ≠ z) :
|
| 35 |
+
∃ g : Fin (q + 1 + 1) → V, IsIndexedPath H g ∧
|
| 36 |
+
χ (g 0) ≠ χ (g (Fin.last (q + 1))) := by
|
| 37 |
+
have hyavoid : y ∉ Set.range f := by
|
| 38 |
+
rintro ⟨i, hi⟩
|
| 39 |
+
exact (havoid i).1 hi
|
| 40 |
+
have hzavoid : z ∉ Set.range f := by
|
| 41 |
+
rintro ⟨i, hi⟩
|
| 42 |
+
exact (havoid i).2 hi
|
| 43 |
+
by_cases hycol : χ y = χ (f (Fin.last q))
|
| 44 |
+
· refine ⟨Fin.cons z f, indexedPath_cons hf hzavoid (by rw [hstart]; exact hxz.symm), ?_⟩
|
| 45 |
+
simp only [Fin.cons_zero, Fin.cons_last]
|
| 46 |
+
intro hzcol
|
| 47 |
+
exact hyz (hycol.trans hzcol.symm)
|
| 48 |
+
· refine ⟨Fin.cons y f, indexedPath_cons hf hyavoid (by rw [hstart]; exact hxy.symm), ?_⟩
|
| 49 |
+
simpa only [Fin.cons_zero, Fin.cons_last] using hycol
|
| 50 |
+
|
| 51 |
+
/-- Under failure of the desired exact-length coloured path, every
|
| 52 |
+
path starting at the common neighbour in the deletion has smaller order. -/
|
| 53 |
+
theorem no_colored_path_start_bound {V : Type*} {H : SimpleGraph V}
|
| 54 |
+
{x y z : V} (hxy : H.Adj x y) (hxz : H.Adj x z)
|
| 55 |
+
(χ : V → Fin 2) (hyz : χ y ≠ χ z) {ℓ : ℕ} (hℓ : 1 ≤ ℓ)
|
| 56 |
+
(hno : ¬ ∃ g : Fin (ℓ + 1) → V, IsIndexedPath H g ∧
|
| 57 |
+
χ (g 0) ≠ χ (g (Fin.last ℓ)))
|
| 58 |
+
{q : ℕ} {f : Fin (q + 1) → V} (hf : IsIndexedPath H f) (hstart : f 0 = x)
|
| 59 |
+
(havoid : ∀ i, f i ≠ y ∧ f i ≠ z) : q + 1 < ℓ := by
|
| 60 |
+
cases ℓ with
|
| 61 |
+
| zero => omega
|
| 62 |
+
| succ ℓ =>
|
| 63 |
+
by_contra hn
|
| 64 |
+
have hbound : ℓ ≤ q := by omega
|
| 65 |
+
let f' : Fin (ℓ + 1) → V := fun i => f (Fin.castLE (by omega) i)
|
| 66 |
+
have hf' : IsIndexedPath H f' := indexedPath_prefix hf hbound
|
| 67 |
+
have hstart' : f' 0 = x := hstart
|
| 68 |
+
have havoid' : ∀ i, f' i ≠ y ∧ f' i ≠ z := fun i => havoid _
|
| 69 |
+
obtain ⟨g, hg, hcolor⟩ := colored_path_of_common_neighbor hxy hxz χ hyz hf' hstart' havoid'
|
| 70 |
+
exact hno ⟨g, hg, hcolor⟩
|
| 71 |
+
|
| 72 |
+
end CycleClique.Construction
|
| 73 |
+
|
| 74 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ComponentVertices.lean
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.DeletedComponent
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-! Realizing a component of the two-vertex deletion as ambient vertices. -/
|
| 6 |
+
|
| 7 |
+
namespace CycleClique.Construction
|
| 8 |
+
def deletedComponentEmbedding {V : Type*} {H : SimpleGraph V} {y z : V}
|
| 9 |
+
(C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent) : C ↪ V :=
|
| 10 |
+
⟨fun v => v.val.val, fun _ _ h => Subtype.ext (Subtype.ext h)⟩
|
| 11 |
+
|
| 12 |
+
noncomputable def componentVertices {V : Type*} [Fintype V]
|
| 13 |
+
{H : SimpleGraph V} {y z : V}
|
| 14 |
+
(C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent) : Finset V := by
|
| 15 |
+
classical
|
| 16 |
+
exact Finset.univ.map (deletedComponentEmbedding C)
|
| 17 |
+
|
| 18 |
+
@[simp] theorem mem_componentVertices {V : Type*} [Fintype V]
|
| 19 |
+
{H : SimpleGraph V} {y z v : V}
|
| 20 |
+
{C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent} :
|
| 21 |
+
v ∈ componentVertices C ↔ ∃ u : C, u.val.val = v := by
|
| 22 |
+
classical
|
| 23 |
+
constructor
|
| 24 |
+
· intro hv
|
| 25 |
+
change v ∈ Finset.univ.map (deletedComponentEmbedding C) at hv
|
| 26 |
+
obtain ⟨u, _, hu⟩ := Finset.mem_map.mp hv
|
| 27 |
+
exact ⟨u, hu⟩
|
| 28 |
+
· rintro ⟨u, hu⟩
|
| 29 |
+
change v ∈ Finset.univ.map (deletedComponentEmbedding C)
|
| 30 |
+
exact Finset.mem_map.mpr ⟨u, Finset.mem_univ _, hu⟩
|
| 31 |
+
|
| 32 |
+
theorem deleted_not_componentVertices {V : Type*} [Fintype V]
|
| 33 |
+
{H : SimpleGraph V} {y z : V}
|
| 34 |
+
(C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent) :
|
| 35 |
+
y ∉ componentVertices C ∧ z ∉ componentVertices C := by
|
| 36 |
+
constructor
|
| 37 |
+
· rintro hy
|
| 38 |
+
obtain ⟨u, hu⟩ := mem_componentVertices.mp hy
|
| 39 |
+
exact u.val.property.1 hu
|
| 40 |
+
· rintro hz
|
| 41 |
+
obtain ⟨u, hu⟩ := mem_componentVertices.mp hz
|
| 42 |
+
exact u.val.property.2 hu
|
| 43 |
+
|
| 44 |
+
theorem componentVertices_neighbor_cover {V : Type*} [Fintype V]
|
| 45 |
+
{H : SimpleGraph V} {y z : V}
|
| 46 |
+
(C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent)
|
| 47 |
+
{u v : V} (hu : u ∈ componentVertices C) (h : H.Adj u v) :
|
| 48 |
+
v ∈ componentVertices C ∨ v = y ∨ v = z := by
|
| 49 |
+
obtain ⟨u', rfl⟩ := mem_componentVertices.mp hu
|
| 50 |
+
rcases deleted_component_neighbor_cover C u' h with hy | hz | ⟨w, _, hw⟩
|
| 51 |
+
· exact Or.inr (Or.inl hy)
|
| 52 |
+
· exact Or.inr (Or.inr hz)
|
| 53 |
+
· exact Or.inl (mem_componentVertices.mpr ⟨w, hw⟩)
|
| 54 |
+
|
| 55 |
+
theorem componentVertices_connected {V : Type*} [Fintype V]
|
| 56 |
+
{H : SimpleGraph V} {y z : V}
|
| 57 |
+
(C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent) :
|
| 58 |
+
(H.induce (componentVertices C : Set V)).Connected := by
|
| 59 |
+
classical
|
| 60 |
+
let f : C → (componentVertices C : Set V) := fun u =>
|
| 61 |
+
⟨u.val.val, mem_componentVertices.mpr ⟨u, rfl⟩⟩
|
| 62 |
+
let φ : C.toSimpleGraph →g H.induce (componentVertices C : Set V) :=
|
| 63 |
+
{ toFun := f, map_rel' := fun h => h }
|
| 64 |
+
have hsurj : Function.Surjective φ := by
|
| 65 |
+
intro v
|
| 66 |
+
obtain ⟨u, hu⟩ := mem_componentVertices.mp v.property
|
| 67 |
+
exact ⟨u, Subtype.ext hu⟩
|
| 68 |
+
exact C.connected_toSimpleGraph.map φ hsurj
|
| 69 |
+
|
| 70 |
+
/-- Restriction to a vertex set closed under all other neighbours loses
|
| 71 |
+
at most the two deleted neighbours. -/
|
| 72 |
+
theorem induced_degree_loss_pair {V : Type*} [Fintype V]
|
| 73 |
+
{H : SimpleGraph V} {U : Finset V} {y z : V}
|
| 74 |
+
(hcover : ∀ u ∈ U, ∀ v, H.Adj u v → v ∈ U ∨ v = y ∨ v = z)
|
| 75 |
+
(u : (U : Set V)) :
|
| 76 |
+
(H.neighborSet u.val).ncard ≤ ((H.induce (U : Set V)).neighborSet u).ncard + 2 := by
|
| 77 |
+
classical
|
| 78 |
+
let K := H.induce (U : Set V)
|
| 79 |
+
let N : Finset V := (K.neighborFinset u).map ⟨Subtype.val, Subtype.val_injective⟩
|
| 80 |
+
have hsub : H.neighborFinset u.val ⊆ N ∪ {y, z} := by
|
| 81 |
+
intro v hv
|
| 82 |
+
have hadj := (H.mem_neighborFinset u.val v).mp hv
|
| 83 |
+
rcases hcover u.val u.property v hadj with hvU | rfl | rfl
|
| 84 |
+
· let w : (U : Set V) := ⟨v, hvU⟩
|
| 85 |
+
have hw : w ∈ K.neighborFinset u := (K.mem_neighborFinset u w).mpr hadj
|
| 86 |
+
exact Finset.mem_union_left _ (Finset.mem_map.mpr ⟨w, hw, rfl⟩)
|
| 87 |
+
· simp
|
| 88 |
+
· simp
|
| 89 |
+
have hcard := (Finset.card_le_card hsub).trans (Finset.card_union_le N {y, z})
|
| 90 |
+
have hpair : ({y, z} : Finset V).card ≤ 2 := Finset.card_le_two
|
| 91 |
+
have hN : N.card = (K.neighborFinset u).card := Finset.card_map _
|
| 92 |
+
rw [hN] at hcard
|
| 93 |
+
have hdegree : (H.neighborFinset u.val).card ≤ (K.neighborFinset u).card + 2 := by omega
|
| 94 |
+
simpa only [SimpleGraph.card_neighborFinset_eq_degree,
|
| 95 |
+
SimpleGraph.ncard_neighborSet] using hdegree
|
| 96 |
+
|
| 97 |
+
end CycleClique.Construction
|
| 98 |
+
|
| 99 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ConditionalMain.lean
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.AllCheckedCertificates
|
| 2 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.RamseyFromFiniteCoverage
|
| 3 |
+
|
| 4 |
+
namespace OAI
|
| 5 |
+
|
| 6 |
+
/-! The full main Ramsey theorem, conditional only on the precisely stated
|
| 7 |
+
published Chvátal–Erdős input. Finite obstruction inputs are discharged by
|
| 8 |
+
kernel-checked concrete certificates and their exhaustive coverage. -/
|
| 9 |
+
|
| 10 |
+
namespace CycleClique.Construction
|
| 11 |
+
theorem finiteCertificateCoverage : FiniteCertificateCoverage :=
|
| 12 |
+
fun _ _ hk hk' ht htk ht' hhalf => checked_certificate_coverage hk hk' ht htk ht' hhalf
|
| 13 |
+
|
| 14 |
+
theorem no_expanded_counterexample (hCE : CEAlphaTwo)
|
| 15 |
+
{V : Type} [Fintype V] {G : SimpleGraph V} {k a : ℕ}
|
| 16 |
+
(hk : 5 ≤ k) (ha : 2 ≤ a) (hak : a ≤ k)
|
| 17 |
+
(hcard : Fintype.card V = k * a + 1) (hI : IndependenceBound G a)
|
| 18 |
+
(hcycle : ¬ HasCycle G (k + 1))
|
| 19 |
+
(hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty →
|
| 20 |
+
k * I.card + 1 ≤ (closedNeighborhood G I).card) : False :=
|
| 21 |
+
no_expanded_counterexample_of_finite_coverage hCE finiteCertificateCoverage
|
| 22 |
+
hk ha hak hcard hI hcycle hexpand
|
| 23 |
+
|
| 24 |
+
theorem cycle_clique_upper (hCE : CEAlphaTwo) {k a : ℕ}
|
| 25 |
+
(hk : 3 ≤ k) (ha : 2 ≤ a) (hak : a ≤ k) :
|
| 26 |
+
RamseyProperty (k + 1) (a + 1) (k * a + 1) :=
|
| 27 |
+
cycle_clique_upper_of_finite_coverage hCE finiteCertificateCoverage hk ha hak
|
| 28 |
+
|
| 29 |
+
theorem cycle_clique_main (hCE : CEAlphaTwo) {m n : ℕ}
|
| 30 |
+
(hn : 3 ≤ n) (hnm : n ≤ m) (hexcept : (m, n) ≠ (3, 3)) :
|
| 31 |
+
IsRamseyNumber m n ((m - 1) * (n - 1) + 1) :=
|
| 32 |
+
cycle_clique_main_of_finite_coverage hCE finiteCertificateCoverage hn hnm hexcept
|
| 33 |
+
|
| 34 |
+
theorem cycle_clique_ramsey (hCE : CEAlphaTwo) {m n : ℕ}
|
| 35 |
+
(hn : 3 ≤ n) (hnm : n ≤ m) :
|
| 36 |
+
IsRamseyNumber m n (if m = 3 ∧ n = 3 then 6 else (m - 1) * (n - 1) + 1) :=
|
| 37 |
+
cycle_clique_ramsey_of_finite_coverage hCE finiteCertificateCoverage hn hnm
|
| 38 |
+
|
| 39 |
+
end CycleClique.Construction
|
| 40 |
+
|
| 41 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ConnectedLongPath.lean
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.GlobalLongest
|
| 2 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.PathRotation
|
| 3 |
+
|
| 4 |
+
namespace OAI
|
| 5 |
+
|
| 6 |
+
/-! A connected graph of minimum degree s has a path of order at least min(|V|,2s+1). -/
|
| 7 |
+
|
| 8 |
+
namespace CycleClique.Construction
|
| 9 |
+
private theorem last_degree_index_bound {V : Type*} [Fintype V] {G : SimpleGraph V} [DecidableRel G.Adj]
|
| 10 |
+
{r : ℕ} {f : Fin (r + 1) → V}
|
| 11 |
+
(hcover : ∀ v, G.Adj (f (Fin.last r)) v → v ∈ Set.range f) :
|
| 12 |
+
(G.neighborSet (f (Fin.last r))).ncard ≤
|
| 13 |
+
(Finset.univ.filter (fun i : Fin r => G.Adj (f (Fin.last r)) (f i.castSucc))).card := by
|
| 14 |
+
classical
|
| 15 |
+
let A := Finset.univ.filter (fun i : Fin r => G.Adj (f (Fin.last r)) (f i.castSucc))
|
| 16 |
+
have hsub : G.neighborFinset (f (Fin.last r)) ⊆ A.image (fun i => f i.castSucc) := by
|
| 17 |
+
intro v hv
|
| 18 |
+
have hadj := (G.mem_neighborFinset _ _).mp hv
|
| 19 |
+
obtain ⟨j, hj⟩ := hcover v hadj
|
| 20 |
+
have hjne : j ≠ Fin.last r := fun h => hadj.ne (by simpa only [h] using hj)
|
| 21 |
+
have hjlt : j.val < r := by
|
| 22 |
+
have := j.isLt
|
| 23 |
+
have hneq : j.val ≠ r := fun h => hjne (Fin.ext h)
|
| 24 |
+
omega
|
| 25 |
+
let i : Fin r := ⟨j.val, hjlt⟩
|
| 26 |
+
have hij : i.castSucc = j := Fin.ext rfl
|
| 27 |
+
apply Finset.mem_image.mpr
|
| 28 |
+
refine ⟨i, ?_, ?_⟩
|
| 29 |
+
· simp only [A, Finset.mem_filter, Finset.mem_univ, true_and]
|
| 30 |
+
rwa [hij, hj]
|
| 31 |
+
· simpa only [hij] using hj
|
| 32 |
+
have h := (Finset.card_le_card hsub).trans (Finset.card_image_le)
|
| 33 |
+
simpa only [SimpleGraph.card_neighborFinset_eq_degree, SimpleGraph.ncard_neighborSet] using h
|
| 34 |
+
|
| 35 |
+
private theorem first_degree_index_bound {V : Type*} [Fintype V] {G : SimpleGraph V} [DecidableRel G.Adj]
|
| 36 |
+
{r : ℕ} {f : Fin (r + 1) → V}
|
| 37 |
+
(hcover : ∀ v, G.Adj (f 0) v → v ∈ Set.range f) :
|
| 38 |
+
(G.neighborSet (f 0)).ncard ≤
|
| 39 |
+
(Finset.univ.filter (fun i : Fin r => G.Adj (f 0) (f i.succ))).card := by
|
| 40 |
+
classical
|
| 41 |
+
let B := Finset.univ.filter (fun i : Fin r => G.Adj (f 0) (f i.succ))
|
| 42 |
+
have hsub : G.neighborFinset (f 0) ⊆ B.image (fun i => f i.succ) := by
|
| 43 |
+
intro v hv
|
| 44 |
+
have hadj := (G.mem_neighborFinset _ _).mp hv
|
| 45 |
+
obtain ⟨j, hj⟩ := hcover v hadj
|
| 46 |
+
have hjne : j ≠ 0 := fun h => hadj.ne (by simpa only [h] using hj)
|
| 47 |
+
have hjpos : 1 ≤ j.val := by
|
| 48 |
+
have hneq : j.val ≠ 0 := fun h => hjne (Fin.ext (by simpa only [Fin.val_zero] using h))
|
| 49 |
+
omega
|
| 50 |
+
let i : Fin r := ⟨j.val - 1, by have := j.isLt; omega⟩
|
| 51 |
+
have hij : i.succ = j := by apply Fin.ext; dsimp [i]; omega
|
| 52 |
+
apply Finset.mem_image.mpr
|
| 53 |
+
refine ⟨i, ?_, ?_⟩
|
| 54 |
+
· simp only [B, Finset.mem_filter, Finset.mem_univ, true_and]
|
| 55 |
+
rwa [hij, hj]
|
| 56 |
+
· simpa only [hij] using hj
|
| 57 |
+
have h := (Finset.card_le_card hsub).trans (Finset.card_image_le)
|
| 58 |
+
simpa only [SimpleGraph.card_neighborFinset_eq_degree, SimpleGraph.ncard_neighborSet] using h
|
| 59 |
+
|
| 60 |
+
/-- Manuscript Lemma `clq:long-path`, in the application-sized form. -/
|
| 61 |
+
theorem connected_long_path {V : Type*} [Fintype V] {G : SimpleGraph V} {s k : ℕ}
|
| 62 |
+
(hconn : G.Connected) (hdegree : ∀ v, s ≤ (G.neighborSet v).ncard)
|
| 63 |
+
(hk : k ≤ 2 * s + 1) (hcard : k ≤ Fintype.card V) :
|
| 64 |
+
∃ r, ∃ f : Fin (r + 1) → V, IsIndexedPath G f ∧ k ≤ r + 1 := by
|
| 65 |
+
classical
|
| 66 |
+
let : Nonempty V := hconn.nonempty
|
| 67 |
+
obtain ⟨r, f, hf, hmax⟩ := exists_longest_path G
|
| 68 |
+
refine ⟨r, f, hf, ?_⟩
|
| 69 |
+
by_contra hshort
|
| 70 |
+
have hlast : ∀ v, G.Adj (f (Fin.last r)) v → v ∈ Set.range f :=
|
| 71 |
+
longest_path_endpoint_neighbors hf rfl (fun q g hg _ => hmax q g hg)
|
| 72 |
+
have hfirst : ∀ v, G.Adj (f 0) v → v ∈ Set.range f := by
|
| 73 |
+
intro v hv
|
| 74 |
+
have hrev := longest_path_endpoint_neighbors (indexedPath_reverse hf) rfl
|
| 75 |
+
(fun q g hg _ => hmax q g hg) v (by simpa using hv)
|
| 76 |
+
obtain ⟨j, hj⟩ := hrev
|
| 77 |
+
exact ⟨j.rev, hj⟩
|
| 78 |
+
let A := Finset.univ.filter (fun i : Fin r => G.Adj (f (Fin.last r)) (f i.castSucc))
|
| 79 |
+
let B := Finset.univ.filter (fun i : Fin r => G.Adj (f 0) (f i.succ))
|
| 80 |
+
have hA : s ≤ A.card := (hdegree _).trans (last_degree_index_bound hlast)
|
| 81 |
+
have hB : s ≤ B.card := (hdegree _).trans (first_degree_index_bound hfirst)
|
| 82 |
+
have hnotdisjoint : ¬ Disjoint A B := by
|
| 83 |
+
intro hdisjoint
|
| 84 |
+
have h := Finset.card_union_of_disjoint hdisjoint
|
| 85 |
+
have hbound : (A ∪ B).card ≤ r := by
|
| 86 |
+
have hsub : A ∪ B ⊆ Finset.univ := Finset.subset_univ _
|
| 87 |
+
simpa only [Finset.card_univ, Fintype.card_fin] using Finset.card_le_card hsub
|
| 88 |
+
omega
|
| 89 |
+
obtain ⟨p, hpA, hpB⟩ := Finset.not_disjoint_iff.mp hnotdisjoint
|
| 90 |
+
have hpA' := (Finset.mem_filter.mp hpA).2
|
| 91 |
+
have hpB' := (Finset.mem_filter.mp hpB).2
|
| 92 |
+
obtain ⟨hrotinj, hrotchain, hrotfirst, hrotlast, _⟩ := rotate_path f hf.1 hf.2 p hpA'
|
| 93 |
+
have hrot : IsIndexedPath G (f ∘ rotationIndex p) := ⟨hrotinj, hrotchain⟩
|
| 94 |
+
have hclose : G.Adj ((f ∘ rotationIndex p) (Fin.last r)) ((f ∘ rotationIndex p) 0) := by
|
| 95 |
+
rw [hrotfirst, hrotlast]
|
| 96 |
+
exact hpB'.symm
|
| 97 |
+
have hsurj := closed_longest_path_surjective hconn hrot hmax hclose
|
| 98 |
+
have hfull := Fintype.card_le_of_surjective _ hsurj
|
| 99 |
+
simp only [Fintype.card_fin] at hfull
|
| 100 |
+
omega
|
| 101 |
+
|
| 102 |
+
end CycleClique.Construction
|
| 103 |
+
|
| 104 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK10.lean
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK11.lean
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK12.lean
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK13.lean
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK14.lean
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK15.lean
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK16.lean
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK17.lean
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK5.lean
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificatesK5
|
| 2 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage
|
| 3 |
+
|
| 4 |
+
namespace OAI
|
| 5 |
+
|
| 6 |
+
namespace CycleClique.Construction.CertifiedCoverage
|
| 7 |
+
|
| 8 |
+
private theorem k5t3_cover4 : ∀ P ∈ pathPatterns 0 2 [], HasCheckedCertificate 5 3 ([[], [], []] ++ P) := by
|
| 9 |
+
apply pathPatterns_forall_zero
|
| 10 |
+
exact ⟨_, Certificates.k5t3p0, Certificates.k5t3p0_check⟩
|
| 11 |
+
|
| 12 |
+
private theorem k5t3_cover3 : ∀ P ∈ pathPatterns 1 2 [], HasCheckedCertificate 5 3 ([[], []] ++ P) := by
|
| 13 |
+
apply pathPatterns_forall_step
|
| 14 |
+
exact by
|
| 15 |
+
intro _
|
| 16 |
+
exact k5t3_cover4
|
| 17 |
+
|
| 18 |
+
private theorem k5t3_cover5 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 5 3 ([[], [1]] ++ P) := by
|
| 19 |
+
apply pathPatterns_forall_zero
|
| 20 |
+
exact ⟨_, Certificates.k5t3p1, Certificates.k5t3p1_check⟩
|
| 21 |
+
|
| 22 |
+
private theorem k5t3_cover6 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 5 3 ([[], [2]] ++ P) := by
|
| 23 |
+
apply pathPatterns_forall_zero
|
| 24 |
+
exact ⟨_, Certificates.k5t3p2, Certificates.k5t3p2_check⟩
|
| 25 |
+
|
| 26 |
+
private theorem k5t3_cover2 : ∀ P ∈ pathPatterns 2 2 [], HasCheckedCertificate 5 3 ([[]] ++ P) := by
|
| 27 |
+
apply pathPatterns_forall_step
|
| 28 |
+
exact by
|
| 29 |
+
constructor
|
| 30 |
+
· exact by
|
| 31 |
+
intro _
|
| 32 |
+
exact k5t3_cover3
|
| 33 |
+
· intro q
|
| 34 |
+
fin_cases q
|
| 35 |
+
· exact by
|
| 36 |
+
intro _
|
| 37 |
+
exact k5t3_cover5
|
| 38 |
+
· exact by
|
| 39 |
+
intro _
|
| 40 |
+
exact k5t3_cover6
|
| 41 |
+
|
| 42 |
+
private theorem k5t3_cover7 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 5 3 ([[1]] ++ P) := by
|
| 43 |
+
apply pathPatterns_forall_step
|
| 44 |
+
exact by
|
| 45 |
+
intro h
|
| 46 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 47 |
+
|
| 48 |
+
private theorem k5t3_cover8 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 5 3 ([[1, 1]] ++ P) := by
|
| 49 |
+
apply pathPatterns_forall_zero
|
| 50 |
+
exact ⟨_, Certificates.k5t3p3, Certificates.k5t3p3_check⟩
|
| 51 |
+
|
| 52 |
+
private theorem k5t3_cover9 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 5 3 ([[2]] ++ P) := by
|
| 53 |
+
apply pathPatterns_forall_step
|
| 54 |
+
exact by
|
| 55 |
+
intro h
|
| 56 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 57 |
+
|
| 58 |
+
private theorem k5t3_cover1 : ∀ P ∈ pathPatterns 3 2 [], HasCheckedCertificate 5 3 ([] ++ P) := by
|
| 59 |
+
apply pathPatterns_forall_step
|
| 60 |
+
exact by
|
| 61 |
+
constructor
|
| 62 |
+
· exact by
|
| 63 |
+
intro _
|
| 64 |
+
exact k5t3_cover2
|
| 65 |
+
· intro q
|
| 66 |
+
fin_cases q
|
| 67 |
+
· exact by
|
| 68 |
+
constructor
|
| 69 |
+
· exact by
|
| 70 |
+
intro _
|
| 71 |
+
exact k5t3_cover7
|
| 72 |
+
· intro q
|
| 73 |
+
fin_cases q
|
| 74 |
+
· exact by
|
| 75 |
+
intro _
|
| 76 |
+
exact k5t3_cover8
|
| 77 |
+
· exact by
|
| 78 |
+
constructor
|
| 79 |
+
· exact by
|
| 80 |
+
intro _
|
| 81 |
+
exact k5t3_cover9
|
| 82 |
+
· intro q
|
| 83 |
+
exact Fin.elim0 q
|
| 84 |
+
|
| 85 |
+
theorem coverage_k5_t3 :
|
| 86 |
+
∀ P ∈ pathPatterns 3 2, HasCheckedCertificate 5 3 P :=
|
| 87 |
+
k5t3_cover1
|
| 88 |
+
|
| 89 |
+
private theorem k5t4_cover5 : ∀ P ∈ pathPatterns 0 1 [], HasCheckedCertificate 5 4 ([[], [], [], []] ++ P) := by
|
| 90 |
+
apply pathPatterns_forall_zero
|
| 91 |
+
exact ⟨_, Certificates.k5t4p0, Certificates.k5t4p0_check⟩
|
| 92 |
+
|
| 93 |
+
private theorem k5t4_cover4 : ∀ P ∈ pathPatterns 1 1 [], HasCheckedCertificate 5 4 ([[], [], []] ++ P) := by
|
| 94 |
+
apply pathPatterns_forall_step
|
| 95 |
+
exact by
|
| 96 |
+
intro _
|
| 97 |
+
exact k5t4_cover5
|
| 98 |
+
|
| 99 |
+
private theorem k5t4_cover6 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 5 4 ([[], [], [1]] ++ P) := by
|
| 100 |
+
apply pathPatterns_forall_zero
|
| 101 |
+
exact ⟨_, Certificates.k5t4p1, Certificates.k5t4p1_check⟩
|
| 102 |
+
|
| 103 |
+
private theorem k5t4_cover3 : ∀ P ∈ pathPatterns 2 1 [], HasCheckedCertificate 5 4 ([[], []] ++ P) := by
|
| 104 |
+
apply pathPatterns_forall_step
|
| 105 |
+
exact by
|
| 106 |
+
constructor
|
| 107 |
+
· exact by
|
| 108 |
+
intro _
|
| 109 |
+
exact k5t4_cover4
|
| 110 |
+
· intro q
|
| 111 |
+
fin_cases q
|
| 112 |
+
· exact by
|
| 113 |
+
intro _
|
| 114 |
+
exact k5t4_cover6
|
| 115 |
+
|
| 116 |
+
private theorem k5t4_cover7 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 5 4 ([[], [1]] ++ P) := by
|
| 117 |
+
apply pathPatterns_forall_step
|
| 118 |
+
exact by
|
| 119 |
+
intro h
|
| 120 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 121 |
+
|
| 122 |
+
private theorem k5t4_cover2 : ∀ P ∈ pathPatterns 3 1 [], HasCheckedCertificate 5 4 ([[]] ++ P) := by
|
| 123 |
+
apply pathPatterns_forall_step
|
| 124 |
+
exact by
|
| 125 |
+
constructor
|
| 126 |
+
· exact by
|
| 127 |
+
intro _
|
| 128 |
+
exact k5t4_cover3
|
| 129 |
+
· intro q
|
| 130 |
+
fin_cases q
|
| 131 |
+
· exact by
|
| 132 |
+
constructor
|
| 133 |
+
· exact by
|
| 134 |
+
intro _
|
| 135 |
+
exact k5t4_cover7
|
| 136 |
+
· intro q
|
| 137 |
+
exact Fin.elim0 q
|
| 138 |
+
|
| 139 |
+
private theorem k5t4_cover8 : ∀ P ∈ pathPatterns 2 0 [1], HasCheckedCertificate 5 4 ([[1]] ++ P) := by
|
| 140 |
+
apply pathPatterns_forall_step
|
| 141 |
+
exact by
|
| 142 |
+
constructor
|
| 143 |
+
· exact by
|
| 144 |
+
intro h
|
| 145 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 146 |
+
· intro q
|
| 147 |
+
exact Fin.elim0 q
|
| 148 |
+
|
| 149 |
+
private theorem k5t4_cover1 : ∀ P ∈ pathPatterns 4 1 [], HasCheckedCertificate 5 4 ([] ++ P) := by
|
| 150 |
+
apply pathPatterns_forall_step
|
| 151 |
+
exact by
|
| 152 |
+
constructor
|
| 153 |
+
· exact by
|
| 154 |
+
intro _
|
| 155 |
+
exact k5t4_cover2
|
| 156 |
+
· intro q
|
| 157 |
+
fin_cases q
|
| 158 |
+
· exact by
|
| 159 |
+
constructor
|
| 160 |
+
· exact by
|
| 161 |
+
intro _
|
| 162 |
+
exact k5t4_cover8
|
| 163 |
+
· intro q
|
| 164 |
+
exact Fin.elim0 q
|
| 165 |
+
|
| 166 |
+
theorem coverage_k5_t4 :
|
| 167 |
+
∀ P ∈ pathPatterns 4 1, HasCheckedCertificate 5 4 P :=
|
| 168 |
+
k5t4_cover1
|
| 169 |
+
|
| 170 |
+
private theorem k5t5_cover6 : ∀ P ∈ pathPatterns 0 0 [], HasCheckedCertificate 5 5 ([[], [], [], [], []] ++ P) := by
|
| 171 |
+
apply pathPatterns_forall_zero
|
| 172 |
+
exact ⟨_, Certificates.k5t5p0, Certificates.k5t5p0_check⟩
|
| 173 |
+
|
| 174 |
+
private theorem k5t5_cover5 : ∀ P ∈ pathPatterns 1 0 [], HasCheckedCertificate 5 5 ([[], [], [], []] ++ P) := by
|
| 175 |
+
apply pathPatterns_forall_step
|
| 176 |
+
exact by
|
| 177 |
+
intro _
|
| 178 |
+
exact k5t5_cover6
|
| 179 |
+
|
| 180 |
+
private theorem k5t5_cover4 : ∀ P ∈ pathPatterns 2 0 [], HasCheckedCertificate 5 5 ([[], [], []] ++ P) := by
|
| 181 |
+
apply pathPatterns_forall_step
|
| 182 |
+
exact by
|
| 183 |
+
constructor
|
| 184 |
+
· exact by
|
| 185 |
+
intro _
|
| 186 |
+
exact k5t5_cover5
|
| 187 |
+
· intro q
|
| 188 |
+
exact Fin.elim0 q
|
| 189 |
+
|
| 190 |
+
private theorem k5t5_cover3 : ∀ P ∈ pathPatterns 3 0 [], HasCheckedCertificate 5 5 ([[], []] ++ P) := by
|
| 191 |
+
apply pathPatterns_forall_step
|
| 192 |
+
exact by
|
| 193 |
+
constructor
|
| 194 |
+
· exact by
|
| 195 |
+
intro _
|
| 196 |
+
exact k5t5_cover4
|
| 197 |
+
· intro q
|
| 198 |
+
exact Fin.elim0 q
|
| 199 |
+
|
| 200 |
+
private theorem k5t5_cover2 : ∀ P ∈ pathPatterns 4 0 [], HasCheckedCertificate 5 5 ([[]] ++ P) := by
|
| 201 |
+
apply pathPatterns_forall_step
|
| 202 |
+
exact by
|
| 203 |
+
constructor
|
| 204 |
+
· exact by
|
| 205 |
+
intro _
|
| 206 |
+
exact k5t5_cover3
|
| 207 |
+
· intro q
|
| 208 |
+
exact Fin.elim0 q
|
| 209 |
+
|
| 210 |
+
private theorem k5t5_cover1 : ∀ P ∈ pathPatterns 5 0 [], HasCheckedCertificate 5 5 ([] ++ P) := by
|
| 211 |
+
apply pathPatterns_forall_step
|
| 212 |
+
exact by
|
| 213 |
+
constructor
|
| 214 |
+
· exact by
|
| 215 |
+
intro _
|
| 216 |
+
exact k5t5_cover2
|
| 217 |
+
· intro q
|
| 218 |
+
exact Fin.elim0 q
|
| 219 |
+
|
| 220 |
+
theorem coverage_k5_t5 :
|
| 221 |
+
∀ P ∈ pathPatterns 5 0, HasCheckedCertificate 5 5 P :=
|
| 222 |
+
k5t5_cover1
|
| 223 |
+
|
| 224 |
+
end CycleClique.Construction.CertifiedCoverage
|
| 225 |
+
|
| 226 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK6.lean
ADDED
|
@@ -0,0 +1,438 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificatesK6
|
| 2 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage
|
| 3 |
+
|
| 4 |
+
namespace OAI
|
| 5 |
+
|
| 6 |
+
namespace CycleClique.Construction.CertifiedCoverage
|
| 7 |
+
|
| 8 |
+
private theorem k6t3_cover4 : ∀ P ∈ pathPatterns 0 3 [], HasCheckedCertificate 6 3 ([[], [], []] ++ P) := by
|
| 9 |
+
apply pathPatterns_forall_zero
|
| 10 |
+
exact ⟨_, Certificates.k6t3p0, Certificates.k6t3p0_check⟩
|
| 11 |
+
|
| 12 |
+
private theorem k6t3_cover3 : ∀ P ∈ pathPatterns 1 3 [], HasCheckedCertificate 6 3 ([[], []] ++ P) := by
|
| 13 |
+
apply pathPatterns_forall_step
|
| 14 |
+
exact by
|
| 15 |
+
intro _
|
| 16 |
+
exact k6t3_cover4
|
| 17 |
+
|
| 18 |
+
private theorem k6t3_cover5 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 6 3 ([[], [1]] ++ P) := by
|
| 19 |
+
apply pathPatterns_forall_zero
|
| 20 |
+
exact ⟨_, Certificates.k6t3p1, Certificates.k6t3p1_check⟩
|
| 21 |
+
|
| 22 |
+
private theorem k6t3_cover6 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 6 3 ([[], [2]] ++ P) := by
|
| 23 |
+
apply pathPatterns_forall_zero
|
| 24 |
+
exact ⟨_, Certificates.k6t3p2, Certificates.k6t3p2_check⟩
|
| 25 |
+
|
| 26 |
+
private theorem k6t3_cover7 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 6 3 ([[], [3]] ++ P) := by
|
| 27 |
+
apply pathPatterns_forall_zero
|
| 28 |
+
exact ⟨_, Certificates.k6t3p3, Certificates.k6t3p3_check⟩
|
| 29 |
+
|
| 30 |
+
private theorem k6t3_cover2 : ∀ P ∈ pathPatterns 2 3 [], HasCheckedCertificate 6 3 ([[]] ++ P) := by
|
| 31 |
+
apply pathPatterns_forall_step
|
| 32 |
+
exact by
|
| 33 |
+
constructor
|
| 34 |
+
· exact by
|
| 35 |
+
intro _
|
| 36 |
+
exact k6t3_cover3
|
| 37 |
+
· intro q
|
| 38 |
+
fin_cases q
|
| 39 |
+
· exact by
|
| 40 |
+
intro _
|
| 41 |
+
exact k6t3_cover5
|
| 42 |
+
· exact by
|
| 43 |
+
intro _
|
| 44 |
+
exact k6t3_cover6
|
| 45 |
+
· exact by
|
| 46 |
+
intro _
|
| 47 |
+
exact k6t3_cover7
|
| 48 |
+
|
| 49 |
+
private theorem k6t3_cover8 : ∀ P ∈ pathPatterns 1 2 [1], HasCheckedCertificate 6 3 ([[1]] ++ P) := by
|
| 50 |
+
apply pathPatterns_forall_step
|
| 51 |
+
exact by
|
| 52 |
+
intro h
|
| 53 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 54 |
+
|
| 55 |
+
private theorem k6t3_cover9 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 6 3 ([[1, 1]] ++ P) := by
|
| 56 |
+
apply pathPatterns_forall_zero
|
| 57 |
+
exact ⟨_, Certificates.k6t3p4, Certificates.k6t3p4_check⟩
|
| 58 |
+
|
| 59 |
+
private theorem k6t3_cover10 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 6 3 ([[1, 2]] ++ P) := by
|
| 60 |
+
apply pathPatterns_forall_zero
|
| 61 |
+
exact ⟨_, Certificates.k6t3p5, Certificates.k6t3p5_check⟩
|
| 62 |
+
|
| 63 |
+
private theorem k6t3_cover11 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 6 3 ([[2]] ++ P) := by
|
| 64 |
+
apply pathPatterns_forall_step
|
| 65 |
+
exact by
|
| 66 |
+
intro h
|
| 67 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 68 |
+
|
| 69 |
+
private theorem k6t3_cover12 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 6 3 ([[3]] ++ P) := by
|
| 70 |
+
apply pathPatterns_forall_step
|
| 71 |
+
exact by
|
| 72 |
+
intro h
|
| 73 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 74 |
+
|
| 75 |
+
private theorem k6t3_cover1 : ∀ P ∈ pathPatterns 3 3 [], HasCheckedCertificate 6 3 ([] ++ P) := by
|
| 76 |
+
apply pathPatterns_forall_step
|
| 77 |
+
exact by
|
| 78 |
+
constructor
|
| 79 |
+
· exact by
|
| 80 |
+
intro _
|
| 81 |
+
exact k6t3_cover2
|
| 82 |
+
· intro q
|
| 83 |
+
fin_cases q
|
| 84 |
+
· exact by
|
| 85 |
+
constructor
|
| 86 |
+
· exact by
|
| 87 |
+
intro _
|
| 88 |
+
exact k6t3_cover8
|
| 89 |
+
· intro q
|
| 90 |
+
fin_cases q
|
| 91 |
+
· exact by
|
| 92 |
+
intro _
|
| 93 |
+
exact k6t3_cover9
|
| 94 |
+
· exact by
|
| 95 |
+
intro _
|
| 96 |
+
exact k6t3_cover10
|
| 97 |
+
· exact by
|
| 98 |
+
constructor
|
| 99 |
+
· exact by
|
| 100 |
+
intro _
|
| 101 |
+
exact k6t3_cover11
|
| 102 |
+
· intro q
|
| 103 |
+
fin_cases q
|
| 104 |
+
· exact by
|
| 105 |
+
intro h
|
| 106 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 107 |
+
· exact by
|
| 108 |
+
constructor
|
| 109 |
+
· exact by
|
| 110 |
+
intro _
|
| 111 |
+
exact k6t3_cover12
|
| 112 |
+
· intro q
|
| 113 |
+
exact Fin.elim0 q
|
| 114 |
+
|
| 115 |
+
theorem coverage_k6_t3 :
|
| 116 |
+
∀ P ∈ pathPatterns 3 3, HasCheckedCertificate 6 3 P :=
|
| 117 |
+
k6t3_cover1
|
| 118 |
+
|
| 119 |
+
private theorem k6t4_cover5 : ∀ P ∈ pathPatterns 0 2 [], HasCheckedCertificate 6 4 ([[], [], [], []] ++ P) := by
|
| 120 |
+
apply pathPatterns_forall_zero
|
| 121 |
+
exact ⟨_, Certificates.k6t4p0, Certificates.k6t4p0_check⟩
|
| 122 |
+
|
| 123 |
+
private theorem k6t4_cover4 : ∀ P ∈ pathPatterns 1 2 [], HasCheckedCertificate 6 4 ([[], [], []] ++ P) := by
|
| 124 |
+
apply pathPatterns_forall_step
|
| 125 |
+
exact by
|
| 126 |
+
intro _
|
| 127 |
+
exact k6t4_cover5
|
| 128 |
+
|
| 129 |
+
private theorem k6t4_cover6 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 6 4 ([[], [], [1]] ++ P) := by
|
| 130 |
+
apply pathPatterns_forall_zero
|
| 131 |
+
exact ⟨_, Certificates.k6t4p1, Certificates.k6t4p1_check⟩
|
| 132 |
+
|
| 133 |
+
private theorem k6t4_cover7 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 6 4 ([[], [], [2]] ++ P) := by
|
| 134 |
+
apply pathPatterns_forall_zero
|
| 135 |
+
exact ⟨_, Certificates.k6t4p2, Certificates.k6t4p2_check⟩
|
| 136 |
+
|
| 137 |
+
private theorem k6t4_cover3 : ∀ P ∈ pathPatterns 2 2 [], HasCheckedCertificate 6 4 ([[], []] ++ P) := by
|
| 138 |
+
apply pathPatterns_forall_step
|
| 139 |
+
exact by
|
| 140 |
+
constructor
|
| 141 |
+
· exact by
|
| 142 |
+
intro _
|
| 143 |
+
exact k6t4_cover4
|
| 144 |
+
· intro q
|
| 145 |
+
fin_cases q
|
| 146 |
+
· exact by
|
| 147 |
+
intro _
|
| 148 |
+
exact k6t4_cover6
|
| 149 |
+
· exact by
|
| 150 |
+
intro _
|
| 151 |
+
exact k6t4_cover7
|
| 152 |
+
|
| 153 |
+
private theorem k6t4_cover8 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 6 4 ([[], [1]] ++ P) := by
|
| 154 |
+
apply pathPatterns_forall_step
|
| 155 |
+
exact by
|
| 156 |
+
intro h
|
| 157 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 158 |
+
|
| 159 |
+
private theorem k6t4_cover9 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 6 4 ([[], [1, 1]] ++ P) := by
|
| 160 |
+
apply pathPatterns_forall_zero
|
| 161 |
+
exact ⟨_, Certificates.k6t4p3, Certificates.k6t4p3_check⟩
|
| 162 |
+
|
| 163 |
+
private theorem k6t4_cover10 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 6 4 ([[], [2]] ++ P) := by
|
| 164 |
+
apply pathPatterns_forall_step
|
| 165 |
+
exact by
|
| 166 |
+
intro h
|
| 167 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 168 |
+
|
| 169 |
+
private theorem k6t4_cover2 : ∀ P ∈ pathPatterns 3 2 [], HasCheckedCertificate 6 4 ([[]] ++ P) := by
|
| 170 |
+
apply pathPatterns_forall_step
|
| 171 |
+
exact by
|
| 172 |
+
constructor
|
| 173 |
+
· exact by
|
| 174 |
+
intro _
|
| 175 |
+
exact k6t4_cover3
|
| 176 |
+
· intro q
|
| 177 |
+
fin_cases q
|
| 178 |
+
· exact by
|
| 179 |
+
constructor
|
| 180 |
+
· exact by
|
| 181 |
+
intro _
|
| 182 |
+
exact k6t4_cover8
|
| 183 |
+
· intro q
|
| 184 |
+
fin_cases q
|
| 185 |
+
· exact by
|
| 186 |
+
intro _
|
| 187 |
+
exact k6t4_cover9
|
| 188 |
+
· exact by
|
| 189 |
+
constructor
|
| 190 |
+
· exact by
|
| 191 |
+
intro _
|
| 192 |
+
exact k6t4_cover10
|
| 193 |
+
· intro q
|
| 194 |
+
exact Fin.elim0 q
|
| 195 |
+
|
| 196 |
+
private theorem k6t4_cover12 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 6 4 ([[1], [1]] ++ P) := by
|
| 197 |
+
apply pathPatterns_forall_zero
|
| 198 |
+
exact ⟨_, Certificates.k6t4p4, Certificates.k6t4p4_check⟩
|
| 199 |
+
|
| 200 |
+
private theorem k6t4_cover11 : ∀ P ∈ pathPatterns 2 1 [1], HasCheckedCertificate 6 4 ([[1]] ++ P) := by
|
| 201 |
+
apply pathPatterns_forall_step
|
| 202 |
+
exact by
|
| 203 |
+
constructor
|
| 204 |
+
· exact by
|
| 205 |
+
intro h
|
| 206 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 207 |
+
· intro q
|
| 208 |
+
fin_cases q
|
| 209 |
+
· exact by
|
| 210 |
+
intro _
|
| 211 |
+
exact k6t4_cover12
|
| 212 |
+
|
| 213 |
+
private theorem k6t4_cover13 : ∀ P ∈ pathPatterns 1 0 [1, 1], HasCheckedCertificate 6 4 ([[1, 1]] ++ P) := by
|
| 214 |
+
apply pathPatterns_forall_step
|
| 215 |
+
exact by
|
| 216 |
+
intro h
|
| 217 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 218 |
+
|
| 219 |
+
private theorem k6t4_cover14 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 6 4 ([[2]] ++ P) := by
|
| 220 |
+
apply pathPatterns_forall_step
|
| 221 |
+
exact by
|
| 222 |
+
constructor
|
| 223 |
+
· exact by
|
| 224 |
+
intro h
|
| 225 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 226 |
+
· intro q
|
| 227 |
+
exact Fin.elim0 q
|
| 228 |
+
|
| 229 |
+
private theorem k6t4_cover1 : ∀ P ∈ pathPatterns 4 2 [], HasCheckedCertificate 6 4 ([] ++ P) := by
|
| 230 |
+
apply pathPatterns_forall_step
|
| 231 |
+
exact by
|
| 232 |
+
constructor
|
| 233 |
+
· exact by
|
| 234 |
+
intro _
|
| 235 |
+
exact k6t4_cover2
|
| 236 |
+
· intro q
|
| 237 |
+
fin_cases q
|
| 238 |
+
· exact by
|
| 239 |
+
constructor
|
| 240 |
+
· exact by
|
| 241 |
+
intro _
|
| 242 |
+
exact k6t4_cover11
|
| 243 |
+
· intro q
|
| 244 |
+
fin_cases q
|
| 245 |
+
· exact by
|
| 246 |
+
constructor
|
| 247 |
+
· exact by
|
| 248 |
+
intro _
|
| 249 |
+
exact k6t4_cover13
|
| 250 |
+
· intro q
|
| 251 |
+
exact Fin.elim0 q
|
| 252 |
+
· exact by
|
| 253 |
+
constructor
|
| 254 |
+
· exact by
|
| 255 |
+
intro _
|
| 256 |
+
exact k6t4_cover14
|
| 257 |
+
· intro q
|
| 258 |
+
exact Fin.elim0 q
|
| 259 |
+
|
| 260 |
+
theorem coverage_k6_t4 :
|
| 261 |
+
∀ P ∈ pathPatterns 4 2, HasCheckedCertificate 6 4 P :=
|
| 262 |
+
k6t4_cover1
|
| 263 |
+
|
| 264 |
+
private theorem k6t5_cover6 : ∀ P ∈ pathPatterns 0 1 [], HasCheckedCertificate 6 5 ([[], [], [], [], []] ++ P) := by
|
| 265 |
+
apply pathPatterns_forall_zero
|
| 266 |
+
exact ⟨_, Certificates.k6t5p0, Certificates.k6t5p0_check⟩
|
| 267 |
+
|
| 268 |
+
private theorem k6t5_cover5 : ∀ P ∈ pathPatterns 1 1 [], HasCheckedCertificate 6 5 ([[], [], [], []] ++ P) := by
|
| 269 |
+
apply pathPatterns_forall_step
|
| 270 |
+
exact by
|
| 271 |
+
intro _
|
| 272 |
+
exact k6t5_cover6
|
| 273 |
+
|
| 274 |
+
private theorem k6t5_cover7 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 6 5 ([[], [], [], [1]] ++ P) := by
|
| 275 |
+
apply pathPatterns_forall_zero
|
| 276 |
+
exact ⟨_, Certificates.k6t5p1, Certificates.k6t5p1_check⟩
|
| 277 |
+
|
| 278 |
+
private theorem k6t5_cover4 : ∀ P ∈ pathPatterns 2 1 [], HasCheckedCertificate 6 5 ([[], [], []] ++ P) := by
|
| 279 |
+
apply pathPatterns_forall_step
|
| 280 |
+
exact by
|
| 281 |
+
constructor
|
| 282 |
+
· exact by
|
| 283 |
+
intro _
|
| 284 |
+
exact k6t5_cover5
|
| 285 |
+
· intro q
|
| 286 |
+
fin_cases q
|
| 287 |
+
· exact by
|
| 288 |
+
intro _
|
| 289 |
+
exact k6t5_cover7
|
| 290 |
+
|
| 291 |
+
private theorem k6t5_cover8 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 6 5 ([[], [], [1]] ++ P) := by
|
| 292 |
+
apply pathPatterns_forall_step
|
| 293 |
+
exact by
|
| 294 |
+
intro h
|
| 295 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 296 |
+
|
| 297 |
+
private theorem k6t5_cover3 : ∀ P ∈ pathPatterns 3 1 [], HasCheckedCertificate 6 5 ([[], []] ++ P) := by
|
| 298 |
+
apply pathPatterns_forall_step
|
| 299 |
+
exact by
|
| 300 |
+
constructor
|
| 301 |
+
· exact by
|
| 302 |
+
intro _
|
| 303 |
+
exact k6t5_cover4
|
| 304 |
+
· intro q
|
| 305 |
+
fin_cases q
|
| 306 |
+
· exact by
|
| 307 |
+
constructor
|
| 308 |
+
· exact by
|
| 309 |
+
intro _
|
| 310 |
+
exact k6t5_cover8
|
| 311 |
+
· intro q
|
| 312 |
+
exact Fin.elim0 q
|
| 313 |
+
|
| 314 |
+
private theorem k6t5_cover9 : ∀ P ∈ pathPatterns 2 0 [1], HasCheckedCertificate 6 5 ([[], [1]] ++ P) := by
|
| 315 |
+
apply pathPatterns_forall_step
|
| 316 |
+
exact by
|
| 317 |
+
constructor
|
| 318 |
+
· exact by
|
| 319 |
+
intro h
|
| 320 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 321 |
+
· intro q
|
| 322 |
+
exact Fin.elim0 q
|
| 323 |
+
|
| 324 |
+
private theorem k6t5_cover2 : ∀ P ∈ pathPatterns 4 1 [], HasCheckedCertificate 6 5 ([[]] ++ P) := by
|
| 325 |
+
apply pathPatterns_forall_step
|
| 326 |
+
exact by
|
| 327 |
+
constructor
|
| 328 |
+
· exact by
|
| 329 |
+
intro _
|
| 330 |
+
exact k6t5_cover3
|
| 331 |
+
· intro q
|
| 332 |
+
fin_cases q
|
| 333 |
+
· exact by
|
| 334 |
+
constructor
|
| 335 |
+
· exact by
|
| 336 |
+
intro _
|
| 337 |
+
exact k6t5_cover9
|
| 338 |
+
· intro q
|
| 339 |
+
exact Fin.elim0 q
|
| 340 |
+
|
| 341 |
+
private theorem k6t5_cover10 : ∀ P ∈ pathPatterns 3 0 [1], HasCheckedCertificate 6 5 ([[1]] ++ P) := by
|
| 342 |
+
apply pathPatterns_forall_step
|
| 343 |
+
exact by
|
| 344 |
+
constructor
|
| 345 |
+
· exact by
|
| 346 |
+
intro h
|
| 347 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 348 |
+
· intro q
|
| 349 |
+
exact Fin.elim0 q
|
| 350 |
+
|
| 351 |
+
private theorem k6t5_cover1 : ∀ P ∈ pathPatterns 5 1 [], HasCheckedCertificate 6 5 ([] ++ P) := by
|
| 352 |
+
apply pathPatterns_forall_step
|
| 353 |
+
exact by
|
| 354 |
+
constructor
|
| 355 |
+
· exact by
|
| 356 |
+
intro _
|
| 357 |
+
exact k6t5_cover2
|
| 358 |
+
· intro q
|
| 359 |
+
fin_cases q
|
| 360 |
+
· exact by
|
| 361 |
+
constructor
|
| 362 |
+
· exact by
|
| 363 |
+
intro _
|
| 364 |
+
exact k6t5_cover10
|
| 365 |
+
· intro q
|
| 366 |
+
exact Fin.elim0 q
|
| 367 |
+
|
| 368 |
+
theorem coverage_k6_t5 :
|
| 369 |
+
∀ P ∈ pathPatterns 5 1, HasCheckedCertificate 6 5 P :=
|
| 370 |
+
k6t5_cover1
|
| 371 |
+
|
| 372 |
+
private theorem k6t6_cover7 : ∀ P ∈ pathPatterns 0 0 [], HasCheckedCertificate 6 6 ([[], [], [], [], [], []] ++ P) := by
|
| 373 |
+
apply pathPatterns_forall_zero
|
| 374 |
+
exact ⟨_, Certificates.k6t6p0, Certificates.k6t6p0_check⟩
|
| 375 |
+
|
| 376 |
+
private theorem k6t6_cover6 : ∀ P ∈ pathPatterns 1 0 [], HasCheckedCertificate 6 6 ([[], [], [], [], []] ++ P) := by
|
| 377 |
+
apply pathPatterns_forall_step
|
| 378 |
+
exact by
|
| 379 |
+
intro _
|
| 380 |
+
exact k6t6_cover7
|
| 381 |
+
|
| 382 |
+
private theorem k6t6_cover5 : ∀ P ∈ pathPatterns 2 0 [], HasCheckedCertificate 6 6 ([[], [], [], []] ++ P) := by
|
| 383 |
+
apply pathPatterns_forall_step
|
| 384 |
+
exact by
|
| 385 |
+
constructor
|
| 386 |
+
· exact by
|
| 387 |
+
intro _
|
| 388 |
+
exact k6t6_cover6
|
| 389 |
+
· intro q
|
| 390 |
+
exact Fin.elim0 q
|
| 391 |
+
|
| 392 |
+
private theorem k6t6_cover4 : ∀ P ∈ pathPatterns 3 0 [], HasCheckedCertificate 6 6 ([[], [], []] ++ P) := by
|
| 393 |
+
apply pathPatterns_forall_step
|
| 394 |
+
exact by
|
| 395 |
+
constructor
|
| 396 |
+
· exact by
|
| 397 |
+
intro _
|
| 398 |
+
exact k6t6_cover5
|
| 399 |
+
· intro q
|
| 400 |
+
exact Fin.elim0 q
|
| 401 |
+
|
| 402 |
+
private theorem k6t6_cover3 : ∀ P ∈ pathPatterns 4 0 [], HasCheckedCertificate 6 6 ([[], []] ++ P) := by
|
| 403 |
+
apply pathPatterns_forall_step
|
| 404 |
+
exact by
|
| 405 |
+
constructor
|
| 406 |
+
· exact by
|
| 407 |
+
intro _
|
| 408 |
+
exact k6t6_cover4
|
| 409 |
+
· intro q
|
| 410 |
+
exact Fin.elim0 q
|
| 411 |
+
|
| 412 |
+
private theorem k6t6_cover2 : ∀ P ∈ pathPatterns 5 0 [], HasCheckedCertificate 6 6 ([[]] ++ P) := by
|
| 413 |
+
apply pathPatterns_forall_step
|
| 414 |
+
exact by
|
| 415 |
+
constructor
|
| 416 |
+
· exact by
|
| 417 |
+
intro _
|
| 418 |
+
exact k6t6_cover3
|
| 419 |
+
· intro q
|
| 420 |
+
exact Fin.elim0 q
|
| 421 |
+
|
| 422 |
+
private theorem k6t6_cover1 : ∀ P ∈ pathPatterns 6 0 [], HasCheckedCertificate 6 6 ([] ++ P) := by
|
| 423 |
+
apply pathPatterns_forall_step
|
| 424 |
+
exact by
|
| 425 |
+
constructor
|
| 426 |
+
· exact by
|
| 427 |
+
intro _
|
| 428 |
+
exact k6t6_cover2
|
| 429 |
+
· intro q
|
| 430 |
+
exact Fin.elim0 q
|
| 431 |
+
|
| 432 |
+
theorem coverage_k6_t6 :
|
| 433 |
+
∀ P ∈ pathPatterns 6 0, HasCheckedCertificate 6 6 P :=
|
| 434 |
+
k6t6_cover1
|
| 435 |
+
|
| 436 |
+
end CycleClique.Construction.CertifiedCoverage
|
| 437 |
+
|
| 438 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK7.lean
ADDED
|
@@ -0,0 +1,815 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificatesK7
|
| 2 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage
|
| 3 |
+
|
| 4 |
+
namespace OAI
|
| 5 |
+
|
| 6 |
+
namespace CycleClique.Construction.CertifiedCoverage
|
| 7 |
+
|
| 8 |
+
private theorem k7t3_cover4 : ∀ P ∈ pathPatterns 0 4 [], HasCheckedCertificate 7 3 ([[], [], []] ++ P) := by
|
| 9 |
+
apply pathPatterns_forall_zero
|
| 10 |
+
exact ⟨_, Certificates.k7t3p0, Certificates.k7t3p0_check⟩
|
| 11 |
+
|
| 12 |
+
private theorem k7t3_cover3 : ∀ P ∈ pathPatterns 1 4 [], HasCheckedCertificate 7 3 ([[], []] ++ P) := by
|
| 13 |
+
apply pathPatterns_forall_step
|
| 14 |
+
exact by
|
| 15 |
+
intro _
|
| 16 |
+
exact k7t3_cover4
|
| 17 |
+
|
| 18 |
+
private theorem k7t3_cover5 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 7 3 ([[], [1]] ++ P) := by
|
| 19 |
+
apply pathPatterns_forall_zero
|
| 20 |
+
exact ⟨_, Certificates.k7t3p1, Certificates.k7t3p1_check⟩
|
| 21 |
+
|
| 22 |
+
private theorem k7t3_cover6 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 7 3 ([[], [2]] ++ P) := by
|
| 23 |
+
apply pathPatterns_forall_zero
|
| 24 |
+
exact ⟨_, Certificates.k7t3p2, Certificates.k7t3p2_check⟩
|
| 25 |
+
|
| 26 |
+
private theorem k7t3_cover7 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 7 3 ([[], [3]] ++ P) := by
|
| 27 |
+
apply pathPatterns_forall_zero
|
| 28 |
+
exact ⟨_, Certificates.k7t3p3, Certificates.k7t3p3_check⟩
|
| 29 |
+
|
| 30 |
+
private theorem k7t3_cover8 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 7 3 ([[], [4]] ++ P) := by
|
| 31 |
+
apply pathPatterns_forall_zero
|
| 32 |
+
exact ⟨_, Certificates.k7t3p4, Certificates.k7t3p4_check⟩
|
| 33 |
+
|
| 34 |
+
private theorem k7t3_cover2 : ∀ P ∈ pathPatterns 2 4 [], HasCheckedCertificate 7 3 ([[]] ++ P) := by
|
| 35 |
+
apply pathPatterns_forall_step
|
| 36 |
+
exact by
|
| 37 |
+
constructor
|
| 38 |
+
· exact by
|
| 39 |
+
intro _
|
| 40 |
+
exact k7t3_cover3
|
| 41 |
+
· intro q
|
| 42 |
+
fin_cases q
|
| 43 |
+
· exact by
|
| 44 |
+
intro _
|
| 45 |
+
exact k7t3_cover5
|
| 46 |
+
· exact by
|
| 47 |
+
intro _
|
| 48 |
+
exact k7t3_cover6
|
| 49 |
+
· exact by
|
| 50 |
+
intro _
|
| 51 |
+
exact k7t3_cover7
|
| 52 |
+
· exact by
|
| 53 |
+
intro _
|
| 54 |
+
exact k7t3_cover8
|
| 55 |
+
|
| 56 |
+
private theorem k7t3_cover9 : ∀ P ∈ pathPatterns 1 3 [1], HasCheckedCertificate 7 3 ([[1]] ++ P) := by
|
| 57 |
+
apply pathPatterns_forall_step
|
| 58 |
+
exact by
|
| 59 |
+
intro h
|
| 60 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 61 |
+
|
| 62 |
+
private theorem k7t3_cover10 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 7 3 ([[1, 1]] ++ P) := by
|
| 63 |
+
apply pathPatterns_forall_zero
|
| 64 |
+
exact ⟨_, Certificates.k7t3p5, Certificates.k7t3p5_check⟩
|
| 65 |
+
|
| 66 |
+
private theorem k7t3_cover11 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 7 3 ([[1, 2]] ++ P) := by
|
| 67 |
+
apply pathPatterns_forall_zero
|
| 68 |
+
exact ⟨_, Certificates.k7t3p6, Certificates.k7t3p6_check⟩
|
| 69 |
+
|
| 70 |
+
private theorem k7t3_cover12 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 7 3 ([[1, 3]] ++ P) := by
|
| 71 |
+
apply pathPatterns_forall_zero
|
| 72 |
+
exact ⟨_, Certificates.k7t3p7, Certificates.k7t3p7_check⟩
|
| 73 |
+
|
| 74 |
+
private theorem k7t3_cover13 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 7 3 ([[2]] ++ P) := by
|
| 75 |
+
apply pathPatterns_forall_step
|
| 76 |
+
exact by
|
| 77 |
+
intro h
|
| 78 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 79 |
+
|
| 80 |
+
private theorem k7t3_cover14 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 7 3 ([[2, 2]] ++ P) := by
|
| 81 |
+
apply pathPatterns_forall_zero
|
| 82 |
+
exact ⟨_, Certificates.k7t3p8, Certificates.k7t3p8_check⟩
|
| 83 |
+
|
| 84 |
+
private theorem k7t3_cover15 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 7 3 ([[3]] ++ P) := by
|
| 85 |
+
apply pathPatterns_forall_step
|
| 86 |
+
exact by
|
| 87 |
+
intro h
|
| 88 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 89 |
+
|
| 90 |
+
private theorem k7t3_cover16 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 7 3 ([[4]] ++ P) := by
|
| 91 |
+
apply pathPatterns_forall_step
|
| 92 |
+
exact by
|
| 93 |
+
intro h
|
| 94 |
+
exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h)
|
| 95 |
+
|
| 96 |
+
private theorem k7t3_cover1 : ∀ P ∈ pathPatterns 3 4 [], HasCheckedCertificate 7 3 ([] ++ P) := by
|
| 97 |
+
apply pathPatterns_forall_step
|
| 98 |
+
exact by
|
| 99 |
+
constructor
|
| 100 |
+
· exact by
|
| 101 |
+
intro _
|
| 102 |
+
exact k7t3_cover2
|
| 103 |
+
· intro q
|
| 104 |
+
fin_cases q
|
| 105 |
+
· exact by
|
| 106 |
+
constructor
|
| 107 |
+
· exact by
|
| 108 |
+
intro _
|
| 109 |
+
exact k7t3_cover9
|
| 110 |
+
· intro q
|
| 111 |
+
fin_cases q
|
| 112 |
+
· exact by
|
| 113 |
+
intro _
|
| 114 |
+
exact k7t3_cover10
|
| 115 |
+
· exact by
|
| 116 |
+
intro _
|
| 117 |
+
exact k7t3_cover11
|
| 118 |
+
· exact by
|
| 119 |
+
intro _
|
| 120 |
+
exact k7t3_cover12
|
| 121 |
+
· exact by
|
| 122 |
+
constructor
|
| 123 |
+
· exact by
|
| 124 |
+
intro _
|
| 125 |
+
exact k7t3_cover13
|
| 126 |
+
· intro q
|
| 127 |
+
fin_cases q
|
| 128 |
+
· exact by
|
| 129 |
+
intro h
|
| 130 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 131 |
+
· exact by
|
| 132 |
+
intro _
|
| 133 |
+
exact k7t3_cover14
|
| 134 |
+
· exact by
|
| 135 |
+
constructor
|
| 136 |
+
· exact by
|
| 137 |
+
intro _
|
| 138 |
+
exact k7t3_cover15
|
| 139 |
+
· intro q
|
| 140 |
+
fin_cases q
|
| 141 |
+
· exact by
|
| 142 |
+
intro h
|
| 143 |
+
exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h)
|
| 144 |
+
· exact by
|
| 145 |
+
constructor
|
| 146 |
+
· exact by
|
| 147 |
+
intro _
|
| 148 |
+
exact k7t3_cover16
|
| 149 |
+
· intro q
|
| 150 |
+
exact Fin.elim0 q
|
| 151 |
+
|
| 152 |
+
theorem coverage_k7_t3 :
|
| 153 |
+
∀ P ∈ pathPatterns 3 4, HasCheckedCertificate 7 3 P :=
|
| 154 |
+
k7t3_cover1
|
| 155 |
+
|
| 156 |
+
private theorem k7t4_cover5 : ∀ P ∈ pathPatterns 0 3 [], HasCheckedCertificate 7 4 ([[], [], [], []] ++ P) := by
|
| 157 |
+
apply pathPatterns_forall_zero
|
| 158 |
+
exact ⟨_, Certificates.k7t4p0, Certificates.k7t4p0_check⟩
|
| 159 |
+
|
| 160 |
+
private theorem k7t4_cover4 : ∀ P ∈ pathPatterns 1 3 [], HasCheckedCertificate 7 4 ([[], [], []] ++ P) := by
|
| 161 |
+
apply pathPatterns_forall_step
|
| 162 |
+
exact by
|
| 163 |
+
intro _
|
| 164 |
+
exact k7t4_cover5
|
| 165 |
+
|
| 166 |
+
private theorem k7t4_cover6 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 7 4 ([[], [], [1]] ++ P) := by
|
| 167 |
+
apply pathPatterns_forall_zero
|
| 168 |
+
exact ⟨_, Certificates.k7t4p1, Certificates.k7t4p1_check⟩
|
| 169 |
+
|
| 170 |
+
private theorem k7t4_cover7 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 7 4 ([[], [], [2]] ++ P) := by
|
| 171 |
+
apply pathPatterns_forall_zero
|
| 172 |
+
exact ⟨_, Certificates.k7t4p2, Certificates.k7t4p2_check⟩
|
| 173 |
+
|
| 174 |
+
private theorem k7t4_cover8 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 7 4 ([[], [], [3]] ++ P) := by
|
| 175 |
+
apply pathPatterns_forall_zero
|
| 176 |
+
exact ⟨_, Certificates.k7t4p3, Certificates.k7t4p3_check⟩
|
| 177 |
+
|
| 178 |
+
private theorem k7t4_cover3 : ∀ P ∈ pathPatterns 2 3 [], HasCheckedCertificate 7 4 ([[], []] ++ P) := by
|
| 179 |
+
apply pathPatterns_forall_step
|
| 180 |
+
exact by
|
| 181 |
+
constructor
|
| 182 |
+
· exact by
|
| 183 |
+
intro _
|
| 184 |
+
exact k7t4_cover4
|
| 185 |
+
· intro q
|
| 186 |
+
fin_cases q
|
| 187 |
+
· exact by
|
| 188 |
+
intro _
|
| 189 |
+
exact k7t4_cover6
|
| 190 |
+
· exact by
|
| 191 |
+
intro _
|
| 192 |
+
exact k7t4_cover7
|
| 193 |
+
· exact by
|
| 194 |
+
intro _
|
| 195 |
+
exact k7t4_cover8
|
| 196 |
+
|
| 197 |
+
private theorem k7t4_cover9 : ∀ P ∈ pathPatterns 1 2 [1], HasCheckedCertificate 7 4 ([[], [1]] ++ P) := by
|
| 198 |
+
apply pathPatterns_forall_step
|
| 199 |
+
exact by
|
| 200 |
+
intro h
|
| 201 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 202 |
+
|
| 203 |
+
private theorem k7t4_cover10 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 7 4 ([[], [1, 1]] ++ P) := by
|
| 204 |
+
apply pathPatterns_forall_zero
|
| 205 |
+
exact ⟨_, Certificates.k7t4p4, Certificates.k7t4p4_check⟩
|
| 206 |
+
|
| 207 |
+
private theorem k7t4_cover11 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 7 4 ([[], [1, 2]] ++ P) := by
|
| 208 |
+
apply pathPatterns_forall_zero
|
| 209 |
+
exact ⟨_, Certificates.k7t4p5, Certificates.k7t4p5_check⟩
|
| 210 |
+
|
| 211 |
+
private theorem k7t4_cover12 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 7 4 ([[], [2]] ++ P) := by
|
| 212 |
+
apply pathPatterns_forall_step
|
| 213 |
+
exact by
|
| 214 |
+
intro h
|
| 215 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 216 |
+
|
| 217 |
+
private theorem k7t4_cover13 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 7 4 ([[], [3]] ++ P) := by
|
| 218 |
+
apply pathPatterns_forall_step
|
| 219 |
+
exact by
|
| 220 |
+
intro h
|
| 221 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 222 |
+
|
| 223 |
+
private theorem k7t4_cover2 : ∀ P ∈ pathPatterns 3 3 [], HasCheckedCertificate 7 4 ([[]] ++ P) := by
|
| 224 |
+
apply pathPatterns_forall_step
|
| 225 |
+
exact by
|
| 226 |
+
constructor
|
| 227 |
+
· exact by
|
| 228 |
+
intro _
|
| 229 |
+
exact k7t4_cover3
|
| 230 |
+
· intro q
|
| 231 |
+
fin_cases q
|
| 232 |
+
· exact by
|
| 233 |
+
constructor
|
| 234 |
+
· exact by
|
| 235 |
+
intro _
|
| 236 |
+
exact k7t4_cover9
|
| 237 |
+
· intro q
|
| 238 |
+
fin_cases q
|
| 239 |
+
· exact by
|
| 240 |
+
intro _
|
| 241 |
+
exact k7t4_cover10
|
| 242 |
+
· exact by
|
| 243 |
+
intro _
|
| 244 |
+
exact k7t4_cover11
|
| 245 |
+
· exact by
|
| 246 |
+
constructor
|
| 247 |
+
· exact by
|
| 248 |
+
intro _
|
| 249 |
+
exact k7t4_cover12
|
| 250 |
+
· intro q
|
| 251 |
+
fin_cases q
|
| 252 |
+
· exact by
|
| 253 |
+
intro h
|
| 254 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 255 |
+
· exact by
|
| 256 |
+
constructor
|
| 257 |
+
· exact by
|
| 258 |
+
intro _
|
| 259 |
+
exact k7t4_cover13
|
| 260 |
+
· intro q
|
| 261 |
+
exact Fin.elim0 q
|
| 262 |
+
|
| 263 |
+
private theorem k7t4_cover15 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 7 4 ([[1], [1]] ++ P) := by
|
| 264 |
+
apply pathPatterns_forall_zero
|
| 265 |
+
exact ⟨_, Certificates.k7t4p6, Certificates.k7t4p6_check⟩
|
| 266 |
+
|
| 267 |
+
private theorem k7t4_cover16 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 7 4 ([[1], [2]] ++ P) := by
|
| 268 |
+
apply pathPatterns_forall_zero
|
| 269 |
+
exact ⟨_, Certificates.k7t4p7, Certificates.k7t4p7_check⟩
|
| 270 |
+
|
| 271 |
+
private theorem k7t4_cover14 : ∀ P ∈ pathPatterns 2 2 [1], HasCheckedCertificate 7 4 ([[1]] ++ P) := by
|
| 272 |
+
apply pathPatterns_forall_step
|
| 273 |
+
exact by
|
| 274 |
+
constructor
|
| 275 |
+
· exact by
|
| 276 |
+
intro h
|
| 277 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 278 |
+
· intro q
|
| 279 |
+
fin_cases q
|
| 280 |
+
· exact by
|
| 281 |
+
intro _
|
| 282 |
+
exact k7t4_cover15
|
| 283 |
+
· exact by
|
| 284 |
+
intro _
|
| 285 |
+
exact k7t4_cover16
|
| 286 |
+
|
| 287 |
+
private theorem k7t4_cover17 : ∀ P ∈ pathPatterns 1 1 [1, 1], HasCheckedCertificate 7 4 ([[1, 1]] ++ P) := by
|
| 288 |
+
apply pathPatterns_forall_step
|
| 289 |
+
exact by
|
| 290 |
+
intro h
|
| 291 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 292 |
+
|
| 293 |
+
private theorem k7t4_cover18 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1], HasCheckedCertificate 7 4 ([[1, 1, 1]] ++ P) := by
|
| 294 |
+
apply pathPatterns_forall_zero
|
| 295 |
+
exact ⟨_, Certificates.k7t4p8, Certificates.k7t4p8_check⟩
|
| 296 |
+
|
| 297 |
+
private theorem k7t4_cover19 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 7 4 ([[1, 2]] ++ P) := by
|
| 298 |
+
apply pathPatterns_forall_step
|
| 299 |
+
exact by
|
| 300 |
+
intro h
|
| 301 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h)
|
| 302 |
+
|
| 303 |
+
private theorem k7t4_cover20 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 7 4 ([[2]] ++ P) := by
|
| 304 |
+
apply pathPatterns_forall_step
|
| 305 |
+
exact by
|
| 306 |
+
constructor
|
| 307 |
+
· exact by
|
| 308 |
+
intro h
|
| 309 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 310 |
+
· intro q
|
| 311 |
+
fin_cases q
|
| 312 |
+
· exact by
|
| 313 |
+
intro h
|
| 314 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h)
|
| 315 |
+
|
| 316 |
+
private theorem k7t4_cover21 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 7 4 ([[3]] ++ P) := by
|
| 317 |
+
apply pathPatterns_forall_step
|
| 318 |
+
exact by
|
| 319 |
+
constructor
|
| 320 |
+
· exact by
|
| 321 |
+
intro h
|
| 322 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 323 |
+
· intro q
|
| 324 |
+
exact Fin.elim0 q
|
| 325 |
+
|
| 326 |
+
private theorem k7t4_cover1 : ∀ P ∈ pathPatterns 4 3 [], HasCheckedCertificate 7 4 ([] ++ P) := by
|
| 327 |
+
apply pathPatterns_forall_step
|
| 328 |
+
exact by
|
| 329 |
+
constructor
|
| 330 |
+
· exact by
|
| 331 |
+
intro _
|
| 332 |
+
exact k7t4_cover2
|
| 333 |
+
· intro q
|
| 334 |
+
fin_cases q
|
| 335 |
+
· exact by
|
| 336 |
+
constructor
|
| 337 |
+
· exact by
|
| 338 |
+
intro _
|
| 339 |
+
exact k7t4_cover14
|
| 340 |
+
· intro q
|
| 341 |
+
fin_cases q
|
| 342 |
+
· exact by
|
| 343 |
+
constructor
|
| 344 |
+
· exact by
|
| 345 |
+
intro _
|
| 346 |
+
exact k7t4_cover17
|
| 347 |
+
· intro q
|
| 348 |
+
fin_cases q
|
| 349 |
+
· exact by
|
| 350 |
+
intro _
|
| 351 |
+
exact k7t4_cover18
|
| 352 |
+
· exact by
|
| 353 |
+
constructor
|
| 354 |
+
· exact by
|
| 355 |
+
intro _
|
| 356 |
+
exact k7t4_cover19
|
| 357 |
+
· intro q
|
| 358 |
+
exact Fin.elim0 q
|
| 359 |
+
· exact by
|
| 360 |
+
constructor
|
| 361 |
+
· exact by
|
| 362 |
+
intro _
|
| 363 |
+
exact k7t4_cover20
|
| 364 |
+
· intro q
|
| 365 |
+
fin_cases q
|
| 366 |
+
· exact by
|
| 367 |
+
constructor
|
| 368 |
+
· exact by
|
| 369 |
+
intro h
|
| 370 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 371 |
+
· intro q
|
| 372 |
+
exact Fin.elim0 q
|
| 373 |
+
· exact by
|
| 374 |
+
constructor
|
| 375 |
+
· exact by
|
| 376 |
+
intro _
|
| 377 |
+
exact k7t4_cover21
|
| 378 |
+
· intro q
|
| 379 |
+
exact Fin.elim0 q
|
| 380 |
+
|
| 381 |
+
theorem coverage_k7_t4 :
|
| 382 |
+
∀ P ∈ pathPatterns 4 3, HasCheckedCertificate 7 4 P :=
|
| 383 |
+
k7t4_cover1
|
| 384 |
+
|
| 385 |
+
private theorem k7t5_cover6 : ∀ P ∈ pathPatterns 0 2 [], HasCheckedCertificate 7 5 ([[], [], [], [], []] ++ P) := by
|
| 386 |
+
apply pathPatterns_forall_zero
|
| 387 |
+
exact ⟨_, Certificates.k7t5p0, Certificates.k7t5p0_check⟩
|
| 388 |
+
|
| 389 |
+
private theorem k7t5_cover5 : ∀ P ∈ pathPatterns 1 2 [], HasCheckedCertificate 7 5 ([[], [], [], []] ++ P) := by
|
| 390 |
+
apply pathPatterns_forall_step
|
| 391 |
+
exact by
|
| 392 |
+
intro _
|
| 393 |
+
exact k7t5_cover6
|
| 394 |
+
|
| 395 |
+
private theorem k7t5_cover7 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 7 5 ([[], [], [], [1]] ++ P) := by
|
| 396 |
+
apply pathPatterns_forall_zero
|
| 397 |
+
exact ⟨_, Certificates.k7t5p1, Certificates.k7t5p1_check⟩
|
| 398 |
+
|
| 399 |
+
private theorem k7t5_cover8 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 7 5 ([[], [], [], [2]] ++ P) := by
|
| 400 |
+
apply pathPatterns_forall_zero
|
| 401 |
+
exact ⟨_, Certificates.k7t5p2, Certificates.k7t5p2_check⟩
|
| 402 |
+
|
| 403 |
+
private theorem k7t5_cover4 : ∀ P ∈ pathPatterns 2 2 [], HasCheckedCertificate 7 5 ([[], [], []] ++ P) := by
|
| 404 |
+
apply pathPatterns_forall_step
|
| 405 |
+
exact by
|
| 406 |
+
constructor
|
| 407 |
+
· exact by
|
| 408 |
+
intro _
|
| 409 |
+
exact k7t5_cover5
|
| 410 |
+
· intro q
|
| 411 |
+
fin_cases q
|
| 412 |
+
· exact by
|
| 413 |
+
intro _
|
| 414 |
+
exact k7t5_cover7
|
| 415 |
+
· exact by
|
| 416 |
+
intro _
|
| 417 |
+
exact k7t5_cover8
|
| 418 |
+
|
| 419 |
+
private theorem k7t5_cover9 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 7 5 ([[], [], [1]] ++ P) := by
|
| 420 |
+
apply pathPatterns_forall_step
|
| 421 |
+
exact by
|
| 422 |
+
intro h
|
| 423 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 424 |
+
|
| 425 |
+
private theorem k7t5_cover10 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 7 5 ([[], [], [1, 1]] ++ P) := by
|
| 426 |
+
apply pathPatterns_forall_zero
|
| 427 |
+
exact ⟨_, Certificates.k7t5p3, Certificates.k7t5p3_check⟩
|
| 428 |
+
|
| 429 |
+
private theorem k7t5_cover11 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 7 5 ([[], [], [2]] ++ P) := by
|
| 430 |
+
apply pathPatterns_forall_step
|
| 431 |
+
exact by
|
| 432 |
+
intro h
|
| 433 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 434 |
+
|
| 435 |
+
private theorem k7t5_cover3 : ∀ P ∈ pathPatterns 3 2 [], HasCheckedCertificate 7 5 ([[], []] ++ P) := by
|
| 436 |
+
apply pathPatterns_forall_step
|
| 437 |
+
exact by
|
| 438 |
+
constructor
|
| 439 |
+
· exact by
|
| 440 |
+
intro _
|
| 441 |
+
exact k7t5_cover4
|
| 442 |
+
· intro q
|
| 443 |
+
fin_cases q
|
| 444 |
+
· exact by
|
| 445 |
+
constructor
|
| 446 |
+
· exact by
|
| 447 |
+
intro _
|
| 448 |
+
exact k7t5_cover9
|
| 449 |
+
· intro q
|
| 450 |
+
fin_cases q
|
| 451 |
+
· exact by
|
| 452 |
+
intro _
|
| 453 |
+
exact k7t5_cover10
|
| 454 |
+
· exact by
|
| 455 |
+
constructor
|
| 456 |
+
· exact by
|
| 457 |
+
intro _
|
| 458 |
+
exact k7t5_cover11
|
| 459 |
+
· intro q
|
| 460 |
+
exact Fin.elim0 q
|
| 461 |
+
|
| 462 |
+
private theorem k7t5_cover13 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 7 5 ([[], [1], [1]] ++ P) := by
|
| 463 |
+
apply pathPatterns_forall_zero
|
| 464 |
+
exact ⟨_, Certificates.k7t5p4, Certificates.k7t5p4_check⟩
|
| 465 |
+
|
| 466 |
+
private theorem k7t5_cover12 : ∀ P ∈ pathPatterns 2 1 [1], HasCheckedCertificate 7 5 ([[], [1]] ++ P) := by
|
| 467 |
+
apply pathPatterns_forall_step
|
| 468 |
+
exact by
|
| 469 |
+
constructor
|
| 470 |
+
· exact by
|
| 471 |
+
intro h
|
| 472 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 473 |
+
· intro q
|
| 474 |
+
fin_cases q
|
| 475 |
+
· exact by
|
| 476 |
+
intro _
|
| 477 |
+
exact k7t5_cover13
|
| 478 |
+
|
| 479 |
+
private theorem k7t5_cover14 : ∀ P ∈ pathPatterns 1 0 [1, 1], HasCheckedCertificate 7 5 ([[], [1, 1]] ++ P) := by
|
| 480 |
+
apply pathPatterns_forall_step
|
| 481 |
+
exact by
|
| 482 |
+
intro h
|
| 483 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 484 |
+
|
| 485 |
+
private theorem k7t5_cover15 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 7 5 ([[], [2]] ++ P) := by
|
| 486 |
+
apply pathPatterns_forall_step
|
| 487 |
+
exact by
|
| 488 |
+
constructor
|
| 489 |
+
· exact by
|
| 490 |
+
intro h
|
| 491 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 492 |
+
· intro q
|
| 493 |
+
exact Fin.elim0 q
|
| 494 |
+
|
| 495 |
+
private theorem k7t5_cover2 : ∀ P ∈ pathPatterns 4 2 [], HasCheckedCertificate 7 5 ([[]] ++ P) := by
|
| 496 |
+
apply pathPatterns_forall_step
|
| 497 |
+
exact by
|
| 498 |
+
constructor
|
| 499 |
+
· exact by
|
| 500 |
+
intro _
|
| 501 |
+
exact k7t5_cover3
|
| 502 |
+
· intro q
|
| 503 |
+
fin_cases q
|
| 504 |
+
· exact by
|
| 505 |
+
constructor
|
| 506 |
+
· exact by
|
| 507 |
+
intro _
|
| 508 |
+
exact k7t5_cover12
|
| 509 |
+
· intro q
|
| 510 |
+
fin_cases q
|
| 511 |
+
· exact by
|
| 512 |
+
constructor
|
| 513 |
+
· exact by
|
| 514 |
+
intro _
|
| 515 |
+
exact k7t5_cover14
|
| 516 |
+
· intro q
|
| 517 |
+
exact Fin.elim0 q
|
| 518 |
+
· exact by
|
| 519 |
+
constructor
|
| 520 |
+
· exact by
|
| 521 |
+
intro _
|
| 522 |
+
exact k7t5_cover15
|
| 523 |
+
· intro q
|
| 524 |
+
exact Fin.elim0 q
|
| 525 |
+
|
| 526 |
+
private theorem k7t5_cover17 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 7 5 ([[1], [1]] ++ P) := by
|
| 527 |
+
apply pathPatterns_forall_step
|
| 528 |
+
exact by
|
| 529 |
+
intro h
|
| 530 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 531 |
+
|
| 532 |
+
private theorem k7t5_cover16 : ∀ P ∈ pathPatterns 3 1 [1], HasCheckedCertificate 7 5 ([[1]] ++ P) := by
|
| 533 |
+
apply pathPatterns_forall_step
|
| 534 |
+
exact by
|
| 535 |
+
constructor
|
| 536 |
+
· exact by
|
| 537 |
+
intro h
|
| 538 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 539 |
+
· intro q
|
| 540 |
+
fin_cases q
|
| 541 |
+
· exact by
|
| 542 |
+
constructor
|
| 543 |
+
· exact by
|
| 544 |
+
intro _
|
| 545 |
+
exact k7t5_cover17
|
| 546 |
+
· intro q
|
| 547 |
+
exact Fin.elim0 q
|
| 548 |
+
|
| 549 |
+
private theorem k7t5_cover18 : ∀ P ∈ pathPatterns 2 0 [1, 1], HasCheckedCertificate 7 5 ([[1, 1]] ++ P) := by
|
| 550 |
+
apply pathPatterns_forall_step
|
| 551 |
+
exact by
|
| 552 |
+
constructor
|
| 553 |
+
· exact by
|
| 554 |
+
intro h
|
| 555 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 556 |
+
· intro q
|
| 557 |
+
exact Fin.elim0 q
|
| 558 |
+
|
| 559 |
+
private theorem k7t5_cover19 : ∀ P ∈ pathPatterns 3 0 [2], HasCheckedCertificate 7 5 ([[2]] ++ P) := by
|
| 560 |
+
apply pathPatterns_forall_step
|
| 561 |
+
exact by
|
| 562 |
+
constructor
|
| 563 |
+
· exact by
|
| 564 |
+
intro h
|
| 565 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 566 |
+
· intro q
|
| 567 |
+
exact Fin.elim0 q
|
| 568 |
+
|
| 569 |
+
private theorem k7t5_cover1 : ∀ P ∈ pathPatterns 5 2 [], HasCheckedCertificate 7 5 ([] ++ P) := by
|
| 570 |
+
apply pathPatterns_forall_step
|
| 571 |
+
exact by
|
| 572 |
+
constructor
|
| 573 |
+
· exact by
|
| 574 |
+
intro _
|
| 575 |
+
exact k7t5_cover2
|
| 576 |
+
· intro q
|
| 577 |
+
fin_cases q
|
| 578 |
+
· exact by
|
| 579 |
+
constructor
|
| 580 |
+
· exact by
|
| 581 |
+
intro _
|
| 582 |
+
exact k7t5_cover16
|
| 583 |
+
· intro q
|
| 584 |
+
fin_cases q
|
| 585 |
+
· exact by
|
| 586 |
+
constructor
|
| 587 |
+
· exact by
|
| 588 |
+
intro _
|
| 589 |
+
exact k7t5_cover18
|
| 590 |
+
· intro q
|
| 591 |
+
exact Fin.elim0 q
|
| 592 |
+
· exact by
|
| 593 |
+
constructor
|
| 594 |
+
· exact by
|
| 595 |
+
intro _
|
| 596 |
+
exact k7t5_cover19
|
| 597 |
+
· intro q
|
| 598 |
+
exact Fin.elim0 q
|
| 599 |
+
|
| 600 |
+
theorem coverage_k7_t5 :
|
| 601 |
+
∀ P ∈ pathPatterns 5 2, HasCheckedCertificate 7 5 P :=
|
| 602 |
+
k7t5_cover1
|
| 603 |
+
|
| 604 |
+
private theorem k7t6_cover7 : ∀ P ∈ pathPatterns 0 1 [], HasCheckedCertificate 7 6 ([[], [], [], [], [], []] ++ P) := by
|
| 605 |
+
apply pathPatterns_forall_zero
|
| 606 |
+
exact ⟨_, Certificates.k7t6p0, Certificates.k7t6p0_check⟩
|
| 607 |
+
|
| 608 |
+
private theorem k7t6_cover6 : ∀ P ∈ pathPatterns 1 1 [], HasCheckedCertificate 7 6 ([[], [], [], [], []] ++ P) := by
|
| 609 |
+
apply pathPatterns_forall_step
|
| 610 |
+
exact by
|
| 611 |
+
intro _
|
| 612 |
+
exact k7t6_cover7
|
| 613 |
+
|
| 614 |
+
private theorem k7t6_cover8 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 7 6 ([[], [], [], [], [1]] ++ P) := by
|
| 615 |
+
apply pathPatterns_forall_zero
|
| 616 |
+
exact ⟨_, Certificates.k7t6p1, Certificates.k7t6p1_check⟩
|
| 617 |
+
|
| 618 |
+
private theorem k7t6_cover5 : ∀ P ∈ pathPatterns 2 1 [], HasCheckedCertificate 7 6 ([[], [], [], []] ++ P) := by
|
| 619 |
+
apply pathPatterns_forall_step
|
| 620 |
+
exact by
|
| 621 |
+
constructor
|
| 622 |
+
· exact by
|
| 623 |
+
intro _
|
| 624 |
+
exact k7t6_cover6
|
| 625 |
+
· intro q
|
| 626 |
+
fin_cases q
|
| 627 |
+
· exact by
|
| 628 |
+
intro _
|
| 629 |
+
exact k7t6_cover8
|
| 630 |
+
|
| 631 |
+
private theorem k7t6_cover9 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 7 6 ([[], [], [], [1]] ++ P) := by
|
| 632 |
+
apply pathPatterns_forall_step
|
| 633 |
+
exact by
|
| 634 |
+
intro h
|
| 635 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 636 |
+
|
| 637 |
+
private theorem k7t6_cover4 : ∀ P ∈ pathPatterns 3 1 [], HasCheckedCertificate 7 6 ([[], [], []] ++ P) := by
|
| 638 |
+
apply pathPatterns_forall_step
|
| 639 |
+
exact by
|
| 640 |
+
constructor
|
| 641 |
+
· exact by
|
| 642 |
+
intro _
|
| 643 |
+
exact k7t6_cover5
|
| 644 |
+
· intro q
|
| 645 |
+
fin_cases q
|
| 646 |
+
· exact by
|
| 647 |
+
constructor
|
| 648 |
+
· exact by
|
| 649 |
+
intro _
|
| 650 |
+
exact k7t6_cover9
|
| 651 |
+
· intro q
|
| 652 |
+
exact Fin.elim0 q
|
| 653 |
+
|
| 654 |
+
private theorem k7t6_cover10 : ∀ P ∈ pathPatterns 2 0 [1], HasCheckedCertificate 7 6 ([[], [], [1]] ++ P) := by
|
| 655 |
+
apply pathPatterns_forall_step
|
| 656 |
+
exact by
|
| 657 |
+
constructor
|
| 658 |
+
· exact by
|
| 659 |
+
intro h
|
| 660 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 661 |
+
· intro q
|
| 662 |
+
exact Fin.elim0 q
|
| 663 |
+
|
| 664 |
+
private theorem k7t6_cover3 : ∀ P ∈ pathPatterns 4 1 [], HasCheckedCertificate 7 6 ([[], []] ++ P) := by
|
| 665 |
+
apply pathPatterns_forall_step
|
| 666 |
+
exact by
|
| 667 |
+
constructor
|
| 668 |
+
· exact by
|
| 669 |
+
intro _
|
| 670 |
+
exact k7t6_cover4
|
| 671 |
+
· intro q
|
| 672 |
+
fin_cases q
|
| 673 |
+
· exact by
|
| 674 |
+
constructor
|
| 675 |
+
· exact by
|
| 676 |
+
intro _
|
| 677 |
+
exact k7t6_cover10
|
| 678 |
+
· intro q
|
| 679 |
+
exact Fin.elim0 q
|
| 680 |
+
|
| 681 |
+
private theorem k7t6_cover11 : ∀ P ∈ pathPatterns 3 0 [1], HasCheckedCertificate 7 6 ([[], [1]] ++ P) := by
|
| 682 |
+
apply pathPatterns_forall_step
|
| 683 |
+
exact by
|
| 684 |
+
constructor
|
| 685 |
+
· exact by
|
| 686 |
+
intro h
|
| 687 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 688 |
+
· intro q
|
| 689 |
+
exact Fin.elim0 q
|
| 690 |
+
|
| 691 |
+
private theorem k7t6_cover2 : ∀ P ∈ pathPatterns 5 1 [], HasCheckedCertificate 7 6 ([[]] ++ P) := by
|
| 692 |
+
apply pathPatterns_forall_step
|
| 693 |
+
exact by
|
| 694 |
+
constructor
|
| 695 |
+
· exact by
|
| 696 |
+
intro _
|
| 697 |
+
exact k7t6_cover3
|
| 698 |
+
· intro q
|
| 699 |
+
fin_cases q
|
| 700 |
+
· exact by
|
| 701 |
+
constructor
|
| 702 |
+
· exact by
|
| 703 |
+
intro _
|
| 704 |
+
exact k7t6_cover11
|
| 705 |
+
· intro q
|
| 706 |
+
exact Fin.elim0 q
|
| 707 |
+
|
| 708 |
+
private theorem k7t6_cover12 : ∀ P ∈ pathPatterns 4 0 [1], HasCheckedCertificate 7 6 ([[1]] ++ P) := by
|
| 709 |
+
apply pathPatterns_forall_step
|
| 710 |
+
exact by
|
| 711 |
+
constructor
|
| 712 |
+
· exact by
|
| 713 |
+
intro h
|
| 714 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 715 |
+
· intro q
|
| 716 |
+
exact Fin.elim0 q
|
| 717 |
+
|
| 718 |
+
private theorem k7t6_cover1 : ∀ P ∈ pathPatterns 6 1 [], HasCheckedCertificate 7 6 ([] ++ P) := by
|
| 719 |
+
apply pathPatterns_forall_step
|
| 720 |
+
exact by
|
| 721 |
+
constructor
|
| 722 |
+
· exact by
|
| 723 |
+
intro _
|
| 724 |
+
exact k7t6_cover2
|
| 725 |
+
· intro q
|
| 726 |
+
fin_cases q
|
| 727 |
+
· exact by
|
| 728 |
+
constructor
|
| 729 |
+
· exact by
|
| 730 |
+
intro _
|
| 731 |
+
exact k7t6_cover12
|
| 732 |
+
· intro q
|
| 733 |
+
exact Fin.elim0 q
|
| 734 |
+
|
| 735 |
+
theorem coverage_k7_t6 :
|
| 736 |
+
∀ P ∈ pathPatterns 6 1, HasCheckedCertificate 7 6 P :=
|
| 737 |
+
k7t6_cover1
|
| 738 |
+
|
| 739 |
+
private theorem k7t7_cover8 : ∀ P ∈ pathPatterns 0 0 [], HasCheckedCertificate 7 7 ([[], [], [], [], [], [], []] ++ P) := by
|
| 740 |
+
apply pathPatterns_forall_zero
|
| 741 |
+
exact ⟨_, Certificates.k7t7p0, Certificates.k7t7p0_check⟩
|
| 742 |
+
|
| 743 |
+
private theorem k7t7_cover7 : ∀ P ∈ pathPatterns 1 0 [], HasCheckedCertificate 7 7 ([[], [], [], [], [], []] ++ P) := by
|
| 744 |
+
apply pathPatterns_forall_step
|
| 745 |
+
exact by
|
| 746 |
+
intro _
|
| 747 |
+
exact k7t7_cover8
|
| 748 |
+
|
| 749 |
+
private theorem k7t7_cover6 : ∀ P ∈ pathPatterns 2 0 [], HasCheckedCertificate 7 7 ([[], [], [], [], []] ++ P) := by
|
| 750 |
+
apply pathPatterns_forall_step
|
| 751 |
+
exact by
|
| 752 |
+
constructor
|
| 753 |
+
· exact by
|
| 754 |
+
intro _
|
| 755 |
+
exact k7t7_cover7
|
| 756 |
+
· intro q
|
| 757 |
+
exact Fin.elim0 q
|
| 758 |
+
|
| 759 |
+
private theorem k7t7_cover5 : ∀ P ∈ pathPatterns 3 0 [], HasCheckedCertificate 7 7 ([[], [], [], []] ++ P) := by
|
| 760 |
+
apply pathPatterns_forall_step
|
| 761 |
+
exact by
|
| 762 |
+
constructor
|
| 763 |
+
· exact by
|
| 764 |
+
intro _
|
| 765 |
+
exact k7t7_cover6
|
| 766 |
+
· intro q
|
| 767 |
+
exact Fin.elim0 q
|
| 768 |
+
|
| 769 |
+
private theorem k7t7_cover4 : ∀ P ∈ pathPatterns 4 0 [], HasCheckedCertificate 7 7 ([[], [], []] ++ P) := by
|
| 770 |
+
apply pathPatterns_forall_step
|
| 771 |
+
exact by
|
| 772 |
+
constructor
|
| 773 |
+
· exact by
|
| 774 |
+
intro _
|
| 775 |
+
exact k7t7_cover5
|
| 776 |
+
· intro q
|
| 777 |
+
exact Fin.elim0 q
|
| 778 |
+
|
| 779 |
+
private theorem k7t7_cover3 : ∀ P ∈ pathPatterns 5 0 [], HasCheckedCertificate 7 7 ([[], []] ++ P) := by
|
| 780 |
+
apply pathPatterns_forall_step
|
| 781 |
+
exact by
|
| 782 |
+
constructor
|
| 783 |
+
· exact by
|
| 784 |
+
intro _
|
| 785 |
+
exact k7t7_cover4
|
| 786 |
+
· intro q
|
| 787 |
+
exact Fin.elim0 q
|
| 788 |
+
|
| 789 |
+
private theorem k7t7_cover2 : ∀ P ∈ pathPatterns 6 0 [], HasCheckedCertificate 7 7 ([[]] ++ P) := by
|
| 790 |
+
apply pathPatterns_forall_step
|
| 791 |
+
exact by
|
| 792 |
+
constructor
|
| 793 |
+
· exact by
|
| 794 |
+
intro _
|
| 795 |
+
exact k7t7_cover3
|
| 796 |
+
· intro q
|
| 797 |
+
exact Fin.elim0 q
|
| 798 |
+
|
| 799 |
+
private theorem k7t7_cover1 : ∀ P ∈ pathPatterns 7 0 [], HasCheckedCertificate 7 7 ([] ++ P) := by
|
| 800 |
+
apply pathPatterns_forall_step
|
| 801 |
+
exact by
|
| 802 |
+
constructor
|
| 803 |
+
· exact by
|
| 804 |
+
intro _
|
| 805 |
+
exact k7t7_cover2
|
| 806 |
+
· intro q
|
| 807 |
+
exact Fin.elim0 q
|
| 808 |
+
|
| 809 |
+
theorem coverage_k7_t7 :
|
| 810 |
+
∀ P ∈ pathPatterns 7 0, HasCheckedCertificate 7 7 P :=
|
| 811 |
+
k7t7_cover1
|
| 812 |
+
|
| 813 |
+
end CycleClique.Construction.CertifiedCoverage
|
| 814 |
+
|
| 815 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK8.lean
ADDED
|
@@ -0,0 +1,1290 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
namespace OAI
|
| 5 |
+
|
| 6 |
+
namespace CycleClique.Construction.CertifiedCoverage
|
| 7 |
+
|
| 8 |
+
private theorem k8t4_cover5 : ∀ P ∈ pathPatterns 0 4 [], HasCheckedCertificate 8 4 ([[], [], [], []] ++ P) := by
|
| 9 |
+
apply pathPatterns_forall_zero
|
| 10 |
+
exact ⟨_, Certificates.k8t4p0, Certificates.k8t4p0_check⟩
|
| 11 |
+
|
| 12 |
+
private theorem k8t4_cover4 : ∀ P ∈ pathPatterns 1 4 [], HasCheckedCertificate 8 4 ([[], [], []] ++ P) := by
|
| 13 |
+
apply pathPatterns_forall_step
|
| 14 |
+
exact by
|
| 15 |
+
intro _
|
| 16 |
+
exact k8t4_cover5
|
| 17 |
+
|
| 18 |
+
private theorem k8t4_cover6 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 8 4 ([[], [], [1]] ++ P) := by
|
| 19 |
+
apply pathPatterns_forall_zero
|
| 20 |
+
exact ⟨_, Certificates.k8t4p1, Certificates.k8t4p1_check⟩
|
| 21 |
+
|
| 22 |
+
private theorem k8t4_cover7 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 8 4 ([[], [], [2]] ++ P) := by
|
| 23 |
+
apply pathPatterns_forall_zero
|
| 24 |
+
exact ⟨_, Certificates.k8t4p2, Certificates.k8t4p2_check⟩
|
| 25 |
+
|
| 26 |
+
private theorem k8t4_cover8 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 8 4 ([[], [], [3]] ++ P) := by
|
| 27 |
+
apply pathPatterns_forall_zero
|
| 28 |
+
exact ⟨_, Certificates.k8t4p3, Certificates.k8t4p3_check⟩
|
| 29 |
+
|
| 30 |
+
private theorem k8t4_cover9 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 8 4 ([[], [], [4]] ++ P) := by
|
| 31 |
+
apply pathPatterns_forall_zero
|
| 32 |
+
exact ⟨_, Certificates.k8t4p4, Certificates.k8t4p4_check⟩
|
| 33 |
+
|
| 34 |
+
private theorem k8t4_cover3 : ∀ P ∈ pathPatterns 2 4 [], HasCheckedCertificate 8 4 ([[], []] ++ P) := by
|
| 35 |
+
apply pathPatterns_forall_step
|
| 36 |
+
exact by
|
| 37 |
+
constructor
|
| 38 |
+
· exact by
|
| 39 |
+
intro _
|
| 40 |
+
exact k8t4_cover4
|
| 41 |
+
· intro q
|
| 42 |
+
fin_cases q
|
| 43 |
+
· exact by
|
| 44 |
+
intro _
|
| 45 |
+
exact k8t4_cover6
|
| 46 |
+
· exact by
|
| 47 |
+
intro _
|
| 48 |
+
exact k8t4_cover7
|
| 49 |
+
· exact by
|
| 50 |
+
intro _
|
| 51 |
+
exact k8t4_cover8
|
| 52 |
+
· exact by
|
| 53 |
+
intro _
|
| 54 |
+
exact k8t4_cover9
|
| 55 |
+
|
| 56 |
+
private theorem k8t4_cover10 : ∀ P ∈ pathPatterns 1 3 [1], HasCheckedCertificate 8 4 ([[], [1]] ++ P) := by
|
| 57 |
+
apply pathPatterns_forall_step
|
| 58 |
+
exact by
|
| 59 |
+
intro h
|
| 60 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 61 |
+
|
| 62 |
+
private theorem k8t4_cover11 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 8 4 ([[], [1, 1]] ++ P) := by
|
| 63 |
+
apply pathPatterns_forall_zero
|
| 64 |
+
exact ⟨_, Certificates.k8t4p5, Certificates.k8t4p5_check⟩
|
| 65 |
+
|
| 66 |
+
private theorem k8t4_cover12 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 8 4 ([[], [1, 2]] ++ P) := by
|
| 67 |
+
apply pathPatterns_forall_zero
|
| 68 |
+
exact ⟨_, Certificates.k8t4p6, Certificates.k8t4p6_check⟩
|
| 69 |
+
|
| 70 |
+
private theorem k8t4_cover13 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 8 4 ([[], [1, 3]] ++ P) := by
|
| 71 |
+
apply pathPatterns_forall_zero
|
| 72 |
+
exact ⟨_, Certificates.k8t4p7, Certificates.k8t4p7_check⟩
|
| 73 |
+
|
| 74 |
+
private theorem k8t4_cover14 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 8 4 ([[], [2]] ++ P) := by
|
| 75 |
+
apply pathPatterns_forall_step
|
| 76 |
+
exact by
|
| 77 |
+
intro h
|
| 78 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 79 |
+
|
| 80 |
+
private theorem k8t4_cover15 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 8 4 ([[], [2, 2]] ++ P) := by
|
| 81 |
+
apply pathPatterns_forall_zero
|
| 82 |
+
exact ⟨_, Certificates.k8t4p8, Certificates.k8t4p8_check⟩
|
| 83 |
+
|
| 84 |
+
private theorem k8t4_cover16 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 8 4 ([[], [3]] ++ P) := by
|
| 85 |
+
apply pathPatterns_forall_step
|
| 86 |
+
exact by
|
| 87 |
+
intro h
|
| 88 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 89 |
+
|
| 90 |
+
private theorem k8t4_cover17 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 8 4 ([[], [4]] ++ P) := by
|
| 91 |
+
apply pathPatterns_forall_step
|
| 92 |
+
exact by
|
| 93 |
+
intro h
|
| 94 |
+
exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h)
|
| 95 |
+
|
| 96 |
+
private theorem k8t4_cover2 : ∀ P ∈ pathPatterns 3 4 [], HasCheckedCertificate 8 4 ([[]] ++ P) := by
|
| 97 |
+
apply pathPatterns_forall_step
|
| 98 |
+
exact by
|
| 99 |
+
constructor
|
| 100 |
+
· exact by
|
| 101 |
+
intro _
|
| 102 |
+
exact k8t4_cover3
|
| 103 |
+
· intro q
|
| 104 |
+
fin_cases q
|
| 105 |
+
· exact by
|
| 106 |
+
constructor
|
| 107 |
+
· exact by
|
| 108 |
+
intro _
|
| 109 |
+
exact k8t4_cover10
|
| 110 |
+
· intro q
|
| 111 |
+
fin_cases q
|
| 112 |
+
· exact by
|
| 113 |
+
intro _
|
| 114 |
+
exact k8t4_cover11
|
| 115 |
+
· exact by
|
| 116 |
+
intro _
|
| 117 |
+
exact k8t4_cover12
|
| 118 |
+
· exact by
|
| 119 |
+
intro _
|
| 120 |
+
exact k8t4_cover13
|
| 121 |
+
· exact by
|
| 122 |
+
constructor
|
| 123 |
+
· exact by
|
| 124 |
+
intro _
|
| 125 |
+
exact k8t4_cover14
|
| 126 |
+
· intro q
|
| 127 |
+
fin_cases q
|
| 128 |
+
· exact by
|
| 129 |
+
intro h
|
| 130 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 131 |
+
· exact by
|
| 132 |
+
intro _
|
| 133 |
+
exact k8t4_cover15
|
| 134 |
+
· exact by
|
| 135 |
+
constructor
|
| 136 |
+
· exact by
|
| 137 |
+
intro _
|
| 138 |
+
exact k8t4_cover16
|
| 139 |
+
· intro q
|
| 140 |
+
fin_cases q
|
| 141 |
+
· exact by
|
| 142 |
+
intro h
|
| 143 |
+
exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h)
|
| 144 |
+
· exact by
|
| 145 |
+
constructor
|
| 146 |
+
· exact by
|
| 147 |
+
intro _
|
| 148 |
+
exact k8t4_cover17
|
| 149 |
+
· intro q
|
| 150 |
+
exact Fin.elim0 q
|
| 151 |
+
|
| 152 |
+
private theorem k8t4_cover19 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 8 4 ([[1], [1]] ++ P) := by
|
| 153 |
+
apply pathPatterns_forall_zero
|
| 154 |
+
exact ⟨_, Certificates.k8t4p9, Certificates.k8t4p9_check⟩
|
| 155 |
+
|
| 156 |
+
private theorem k8t4_cover20 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 8 4 ([[1], [2]] ++ P) := by
|
| 157 |
+
apply pathPatterns_forall_zero
|
| 158 |
+
exact ⟨_, Certificates.k8t4p10, Certificates.k8t4p10_check⟩
|
| 159 |
+
|
| 160 |
+
private theorem k8t4_cover21 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 8 4 ([[1], [3]] ++ P) := by
|
| 161 |
+
apply pathPatterns_forall_zero
|
| 162 |
+
exact ⟨_, Certificates.k8t4p11, Certificates.k8t4p11_check⟩
|
| 163 |
+
|
| 164 |
+
private theorem k8t4_cover18 : ∀ P ∈ pathPatterns 2 3 [1], HasCheckedCertificate 8 4 ([[1]] ++ P) := by
|
| 165 |
+
apply pathPatterns_forall_step
|
| 166 |
+
exact by
|
| 167 |
+
constructor
|
| 168 |
+
· exact by
|
| 169 |
+
intro h
|
| 170 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 171 |
+
· intro q
|
| 172 |
+
fin_cases q
|
| 173 |
+
· exact by
|
| 174 |
+
intro _
|
| 175 |
+
exact k8t4_cover19
|
| 176 |
+
· exact by
|
| 177 |
+
intro _
|
| 178 |
+
exact k8t4_cover20
|
| 179 |
+
· exact by
|
| 180 |
+
intro _
|
| 181 |
+
exact k8t4_cover21
|
| 182 |
+
|
| 183 |
+
private theorem k8t4_cover22 : ∀ P ∈ pathPatterns 1 2 [1, 1], HasCheckedCertificate 8 4 ([[1, 1]] ++ P) := by
|
| 184 |
+
apply pathPatterns_forall_step
|
| 185 |
+
exact by
|
| 186 |
+
intro h
|
| 187 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 188 |
+
|
| 189 |
+
private theorem k8t4_cover23 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1], HasCheckedCertificate 8 4 ([[1, 1, 1]] ++ P) := by
|
| 190 |
+
apply pathPatterns_forall_zero
|
| 191 |
+
exact ⟨_, Certificates.k8t4p12, Certificates.k8t4p12_check⟩
|
| 192 |
+
|
| 193 |
+
private theorem k8t4_cover24 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2], HasCheckedCertificate 8 4 ([[1, 1, 2]] ++ P) := by
|
| 194 |
+
apply pathPatterns_forall_zero
|
| 195 |
+
exact ⟨_, Certificates.k8t4p13, Certificates.k8t4p13_check⟩
|
| 196 |
+
|
| 197 |
+
private theorem k8t4_cover25 : ∀ P ∈ pathPatterns 1 1 [1, 2], HasCheckedCertificate 8 4 ([[1, 2]] ++ P) := by
|
| 198 |
+
apply pathPatterns_forall_step
|
| 199 |
+
exact by
|
| 200 |
+
intro h
|
| 201 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h)
|
| 202 |
+
|
| 203 |
+
private theorem k8t4_cover26 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 8 4 ([[1, 2, 1]] ++ P) := by
|
| 204 |
+
apply pathPatterns_forall_zero
|
| 205 |
+
exact ⟨_, Certificates.k8t4p14, Certificates.k8t4p14_check⟩
|
| 206 |
+
|
| 207 |
+
private theorem k8t4_cover27 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 8 4 ([[1, 3]] ++ P) := by
|
| 208 |
+
apply pathPatterns_forall_step
|
| 209 |
+
exact by
|
| 210 |
+
intro h
|
| 211 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h)
|
| 212 |
+
|
| 213 |
+
private theorem k8t4_cover29 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 8 4 ([[2], [2]] ++ P) := by
|
| 214 |
+
apply pathPatterns_forall_zero
|
| 215 |
+
exact ⟨_, Certificates.k8t4p15, Certificates.k8t4p15_check⟩
|
| 216 |
+
|
| 217 |
+
private theorem k8t4_cover28 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 8 4 ([[2]] ++ P) := by
|
| 218 |
+
apply pathPatterns_forall_step
|
| 219 |
+
exact by
|
| 220 |
+
constructor
|
| 221 |
+
· exact by
|
| 222 |
+
intro h
|
| 223 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 224 |
+
· intro q
|
| 225 |
+
fin_cases q
|
| 226 |
+
· exact by
|
| 227 |
+
intro h
|
| 228 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h)
|
| 229 |
+
· exact by
|
| 230 |
+
intro _
|
| 231 |
+
exact k8t4_cover29
|
| 232 |
+
|
| 233 |
+
private theorem k8t4_cover30 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 8 4 ([[2, 2]] ++ P) := by
|
| 234 |
+
apply pathPatterns_forall_step
|
| 235 |
+
exact by
|
| 236 |
+
intro h
|
| 237 |
+
exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h)
|
| 238 |
+
|
| 239 |
+
private theorem k8t4_cover31 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 8 4 ([[3]] ++ P) := by
|
| 240 |
+
apply pathPatterns_forall_step
|
| 241 |
+
exact by
|
| 242 |
+
constructor
|
| 243 |
+
· exact by
|
| 244 |
+
intro h
|
| 245 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 246 |
+
· intro q
|
| 247 |
+
fin_cases q
|
| 248 |
+
· exact by
|
| 249 |
+
intro h
|
| 250 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h)
|
| 251 |
+
|
| 252 |
+
private theorem k8t4_cover32 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 8 4 ([[4]] ++ P) := by
|
| 253 |
+
apply pathPatterns_forall_step
|
| 254 |
+
exact by
|
| 255 |
+
constructor
|
| 256 |
+
· exact by
|
| 257 |
+
intro h
|
| 258 |
+
exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h)
|
| 259 |
+
· intro q
|
| 260 |
+
exact Fin.elim0 q
|
| 261 |
+
|
| 262 |
+
private theorem k8t4_cover1 : ∀ P ∈ pathPatterns 4 4 [], HasCheckedCertificate 8 4 ([] ++ P) := by
|
| 263 |
+
apply pathPatterns_forall_step
|
| 264 |
+
exact by
|
| 265 |
+
constructor
|
| 266 |
+
· exact by
|
| 267 |
+
intro _
|
| 268 |
+
exact k8t4_cover2
|
| 269 |
+
· intro q
|
| 270 |
+
fin_cases q
|
| 271 |
+
· exact by
|
| 272 |
+
constructor
|
| 273 |
+
· exact by
|
| 274 |
+
intro _
|
| 275 |
+
exact k8t4_cover18
|
| 276 |
+
· intro q
|
| 277 |
+
fin_cases q
|
| 278 |
+
· exact by
|
| 279 |
+
constructor
|
| 280 |
+
· exact by
|
| 281 |
+
intro _
|
| 282 |
+
exact k8t4_cover22
|
| 283 |
+
· intro q
|
| 284 |
+
fin_cases q
|
| 285 |
+
· exact by
|
| 286 |
+
intro _
|
| 287 |
+
exact k8t4_cover23
|
| 288 |
+
· exact by
|
| 289 |
+
intro _
|
| 290 |
+
exact k8t4_cover24
|
| 291 |
+
· exact by
|
| 292 |
+
constructor
|
| 293 |
+
· exact by
|
| 294 |
+
intro _
|
| 295 |
+
exact k8t4_cover25
|
| 296 |
+
· intro q
|
| 297 |
+
fin_cases q
|
| 298 |
+
· exact by
|
| 299 |
+
intro _
|
| 300 |
+
exact k8t4_cover26
|
| 301 |
+
· exact by
|
| 302 |
+
constructor
|
| 303 |
+
· exact by
|
| 304 |
+
intro _
|
| 305 |
+
exact k8t4_cover27
|
| 306 |
+
· intro q
|
| 307 |
+
exact Fin.elim0 q
|
| 308 |
+
· exact by
|
| 309 |
+
constructor
|
| 310 |
+
· exact by
|
| 311 |
+
intro _
|
| 312 |
+
exact k8t4_cover28
|
| 313 |
+
· intro q
|
| 314 |
+
fin_cases q
|
| 315 |
+
· exact by
|
| 316 |
+
constructor
|
| 317 |
+
· exact by
|
| 318 |
+
intro h
|
| 319 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 320 |
+
· intro q
|
| 321 |
+
fin_cases q
|
| 322 |
+
· exact by
|
| 323 |
+
intro h
|
| 324 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h)
|
| 325 |
+
· exact by
|
| 326 |
+
constructor
|
| 327 |
+
· exact by
|
| 328 |
+
intro _
|
| 329 |
+
exact k8t4_cover30
|
| 330 |
+
· intro q
|
| 331 |
+
exact Fin.elim0 q
|
| 332 |
+
· exact by
|
| 333 |
+
constructor
|
| 334 |
+
· exact by
|
| 335 |
+
intro _
|
| 336 |
+
exact k8t4_cover31
|
| 337 |
+
· intro q
|
| 338 |
+
fin_cases q
|
| 339 |
+
· exact by
|
| 340 |
+
constructor
|
| 341 |
+
· exact by
|
| 342 |
+
intro h
|
| 343 |
+
exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h)
|
| 344 |
+
· intro q
|
| 345 |
+
exact Fin.elim0 q
|
| 346 |
+
· exact by
|
| 347 |
+
constructor
|
| 348 |
+
· exact by
|
| 349 |
+
intro _
|
| 350 |
+
exact k8t4_cover32
|
| 351 |
+
· intro q
|
| 352 |
+
exact Fin.elim0 q
|
| 353 |
+
|
| 354 |
+
theorem coverage_k8_t4 :
|
| 355 |
+
∀ P ∈ pathPatterns 4 4, HasCheckedCertificate 8 4 P :=
|
| 356 |
+
k8t4_cover1
|
| 357 |
+
|
| 358 |
+
private theorem k8t5_cover6 : ∀ P ∈ pathPatterns 0 3 [], HasCheckedCertificate 8 5 ([[], [], [], [], []] ++ P) := by
|
| 359 |
+
apply pathPatterns_forall_zero
|
| 360 |
+
exact ⟨_, Certificates.k8t5p0, Certificates.k8t5p0_check⟩
|
| 361 |
+
|
| 362 |
+
private theorem k8t5_cover5 : ∀ P ∈ pathPatterns 1 3 [], HasCheckedCertificate 8 5 ([[], [], [], []] ++ P) := by
|
| 363 |
+
apply pathPatterns_forall_step
|
| 364 |
+
exact by
|
| 365 |
+
intro _
|
| 366 |
+
exact k8t5_cover6
|
| 367 |
+
|
| 368 |
+
private theorem k8t5_cover7 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 8 5 ([[], [], [], [1]] ++ P) := by
|
| 369 |
+
apply pathPatterns_forall_zero
|
| 370 |
+
exact ⟨_, Certificates.k8t5p1, Certificates.k8t5p1_check⟩
|
| 371 |
+
|
| 372 |
+
private theorem k8t5_cover8 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 8 5 ([[], [], [], [2]] ++ P) := by
|
| 373 |
+
apply pathPatterns_forall_zero
|
| 374 |
+
exact ⟨_, Certificates.k8t5p2, Certificates.k8t5p2_check⟩
|
| 375 |
+
|
| 376 |
+
private theorem k8t5_cover9 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 8 5 ([[], [], [], [3]] ++ P) := by
|
| 377 |
+
apply pathPatterns_forall_zero
|
| 378 |
+
exact ⟨_, Certificates.k8t5p3, Certificates.k8t5p3_check⟩
|
| 379 |
+
|
| 380 |
+
private theorem k8t5_cover4 : ∀ P ∈ pathPatterns 2 3 [], HasCheckedCertificate 8 5 ([[], [], []] ++ P) := by
|
| 381 |
+
apply pathPatterns_forall_step
|
| 382 |
+
exact by
|
| 383 |
+
constructor
|
| 384 |
+
· exact by
|
| 385 |
+
intro _
|
| 386 |
+
exact k8t5_cover5
|
| 387 |
+
· intro q
|
| 388 |
+
fin_cases q
|
| 389 |
+
· exact by
|
| 390 |
+
intro _
|
| 391 |
+
exact k8t5_cover7
|
| 392 |
+
· exact by
|
| 393 |
+
intro _
|
| 394 |
+
exact k8t5_cover8
|
| 395 |
+
· exact by
|
| 396 |
+
intro _
|
| 397 |
+
exact k8t5_cover9
|
| 398 |
+
|
| 399 |
+
private theorem k8t5_cover10 : ∀ P ∈ pathPatterns 1 2 [1], HasCheckedCertificate 8 5 ([[], [], [1]] ++ P) := by
|
| 400 |
+
apply pathPatterns_forall_step
|
| 401 |
+
exact by
|
| 402 |
+
intro h
|
| 403 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 404 |
+
|
| 405 |
+
private theorem k8t5_cover11 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 8 5 ([[], [], [1, 1]] ++ P) := by
|
| 406 |
+
apply pathPatterns_forall_zero
|
| 407 |
+
exact ⟨_, Certificates.k8t5p4, Certificates.k8t5p4_check⟩
|
| 408 |
+
|
| 409 |
+
private theorem k8t5_cover12 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 8 5 ([[], [], [1, 2]] ++ P) := by
|
| 410 |
+
apply pathPatterns_forall_zero
|
| 411 |
+
exact ⟨_, Certificates.k8t5p5, Certificates.k8t5p5_check⟩
|
| 412 |
+
|
| 413 |
+
private theorem k8t5_cover13 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 8 5 ([[], [], [2]] ++ P) := by
|
| 414 |
+
apply pathPatterns_forall_step
|
| 415 |
+
exact by
|
| 416 |
+
intro h
|
| 417 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 418 |
+
|
| 419 |
+
private theorem k8t5_cover14 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 8 5 ([[], [], [3]] ++ P) := by
|
| 420 |
+
apply pathPatterns_forall_step
|
| 421 |
+
exact by
|
| 422 |
+
intro h
|
| 423 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 424 |
+
|
| 425 |
+
private theorem k8t5_cover3 : ∀ P ∈ pathPatterns 3 3 [], HasCheckedCertificate 8 5 ([[], []] ++ P) := by
|
| 426 |
+
apply pathPatterns_forall_step
|
| 427 |
+
exact by
|
| 428 |
+
constructor
|
| 429 |
+
· exact by
|
| 430 |
+
intro _
|
| 431 |
+
exact k8t5_cover4
|
| 432 |
+
· intro q
|
| 433 |
+
fin_cases q
|
| 434 |
+
· exact by
|
| 435 |
+
constructor
|
| 436 |
+
· exact by
|
| 437 |
+
intro _
|
| 438 |
+
exact k8t5_cover10
|
| 439 |
+
· intro q
|
| 440 |
+
fin_cases q
|
| 441 |
+
· exact by
|
| 442 |
+
intro _
|
| 443 |
+
exact k8t5_cover11
|
| 444 |
+
· exact by
|
| 445 |
+
intro _
|
| 446 |
+
exact k8t5_cover12
|
| 447 |
+
· exact by
|
| 448 |
+
constructor
|
| 449 |
+
· exact by
|
| 450 |
+
intro _
|
| 451 |
+
exact k8t5_cover13
|
| 452 |
+
· intro q
|
| 453 |
+
fin_cases q
|
| 454 |
+
· exact by
|
| 455 |
+
intro h
|
| 456 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 457 |
+
· exact by
|
| 458 |
+
constructor
|
| 459 |
+
· exact by
|
| 460 |
+
intro _
|
| 461 |
+
exact k8t5_cover14
|
| 462 |
+
· intro q
|
| 463 |
+
exact Fin.elim0 q
|
| 464 |
+
|
| 465 |
+
private theorem k8t5_cover16 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 8 5 ([[], [1], [1]] ++ P) := by
|
| 466 |
+
apply pathPatterns_forall_zero
|
| 467 |
+
exact ⟨_, Certificates.k8t5p6, Certificates.k8t5p6_check⟩
|
| 468 |
+
|
| 469 |
+
private theorem k8t5_cover17 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 8 5 ([[], [1], [2]] ++ P) := by
|
| 470 |
+
apply pathPatterns_forall_zero
|
| 471 |
+
exact ⟨_, Certificates.k8t5p7, Certificates.k8t5p7_check⟩
|
| 472 |
+
|
| 473 |
+
private theorem k8t5_cover15 : ∀ P ∈ pathPatterns 2 2 [1], HasCheckedCertificate 8 5 ([[], [1]] ++ P) := by
|
| 474 |
+
apply pathPatterns_forall_step
|
| 475 |
+
exact by
|
| 476 |
+
constructor
|
| 477 |
+
· exact by
|
| 478 |
+
intro h
|
| 479 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 480 |
+
· intro q
|
| 481 |
+
fin_cases q
|
| 482 |
+
· exact by
|
| 483 |
+
intro _
|
| 484 |
+
exact k8t5_cover16
|
| 485 |
+
· exact by
|
| 486 |
+
intro _
|
| 487 |
+
exact k8t5_cover17
|
| 488 |
+
|
| 489 |
+
private theorem k8t5_cover18 : ∀ P ∈ pathPatterns 1 1 [1, 1], HasCheckedCertificate 8 5 ([[], [1, 1]] ++ P) := by
|
| 490 |
+
apply pathPatterns_forall_step
|
| 491 |
+
exact by
|
| 492 |
+
intro h
|
| 493 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 494 |
+
|
| 495 |
+
private theorem k8t5_cover19 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1], HasCheckedCertificate 8 5 ([[], [1, 1, 1]] ++ P) := by
|
| 496 |
+
apply pathPatterns_forall_zero
|
| 497 |
+
exact ⟨_, Certificates.k8t5p8, Certificates.k8t5p8_check⟩
|
| 498 |
+
|
| 499 |
+
private theorem k8t5_cover20 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 8 5 ([[], [1, 2]] ++ P) := by
|
| 500 |
+
apply pathPatterns_forall_step
|
| 501 |
+
exact by
|
| 502 |
+
intro h
|
| 503 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h)
|
| 504 |
+
|
| 505 |
+
private theorem k8t5_cover21 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 8 5 ([[], [2]] ++ P) := by
|
| 506 |
+
apply pathPatterns_forall_step
|
| 507 |
+
exact by
|
| 508 |
+
constructor
|
| 509 |
+
· exact by
|
| 510 |
+
intro h
|
| 511 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 512 |
+
· intro q
|
| 513 |
+
fin_cases q
|
| 514 |
+
· exact by
|
| 515 |
+
intro h
|
| 516 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h)
|
| 517 |
+
|
| 518 |
+
private theorem k8t5_cover22 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 8 5 ([[], [3]] ++ P) := by
|
| 519 |
+
apply pathPatterns_forall_step
|
| 520 |
+
exact by
|
| 521 |
+
constructor
|
| 522 |
+
· exact by
|
| 523 |
+
intro h
|
| 524 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 525 |
+
· intro q
|
| 526 |
+
exact Fin.elim0 q
|
| 527 |
+
|
| 528 |
+
private theorem k8t5_cover2 : ∀ P ∈ pathPatterns 4 3 [], HasCheckedCertificate 8 5 ([[]] ++ P) := by
|
| 529 |
+
apply pathPatterns_forall_step
|
| 530 |
+
exact by
|
| 531 |
+
constructor
|
| 532 |
+
· exact by
|
| 533 |
+
intro _
|
| 534 |
+
exact k8t5_cover3
|
| 535 |
+
· intro q
|
| 536 |
+
fin_cases q
|
| 537 |
+
· exact by
|
| 538 |
+
constructor
|
| 539 |
+
· exact by
|
| 540 |
+
intro _
|
| 541 |
+
exact k8t5_cover15
|
| 542 |
+
· intro q
|
| 543 |
+
fin_cases q
|
| 544 |
+
· exact by
|
| 545 |
+
constructor
|
| 546 |
+
· exact by
|
| 547 |
+
intro _
|
| 548 |
+
exact k8t5_cover18
|
| 549 |
+
· intro q
|
| 550 |
+
fin_cases q
|
| 551 |
+
· exact by
|
| 552 |
+
intro _
|
| 553 |
+
exact k8t5_cover19
|
| 554 |
+
· exact by
|
| 555 |
+
constructor
|
| 556 |
+
· exact by
|
| 557 |
+
intro _
|
| 558 |
+
exact k8t5_cover20
|
| 559 |
+
· intro q
|
| 560 |
+
exact Fin.elim0 q
|
| 561 |
+
· exact by
|
| 562 |
+
constructor
|
| 563 |
+
· exact by
|
| 564 |
+
intro _
|
| 565 |
+
exact k8t5_cover21
|
| 566 |
+
· intro q
|
| 567 |
+
fin_cases q
|
| 568 |
+
· exact by
|
| 569 |
+
constructor
|
| 570 |
+
· exact by
|
| 571 |
+
intro h
|
| 572 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 573 |
+
· intro q
|
| 574 |
+
exact Fin.elim0 q
|
| 575 |
+
· exact by
|
| 576 |
+
constructor
|
| 577 |
+
· exact by
|
| 578 |
+
intro _
|
| 579 |
+
exact k8t5_cover22
|
| 580 |
+
· intro q
|
| 581 |
+
exact Fin.elim0 q
|
| 582 |
+
|
| 583 |
+
private theorem k8t5_cover24 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 8 5 ([[1], [1]] ++ P) := by
|
| 584 |
+
apply pathPatterns_forall_step
|
| 585 |
+
exact by
|
| 586 |
+
intro h
|
| 587 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 588 |
+
|
| 589 |
+
private theorem k8t5_cover25 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 8 5 ([[1], [1, 1]] ++ P) := by
|
| 590 |
+
apply pathPatterns_forall_zero
|
| 591 |
+
exact ⟨_, Certificates.k8t5p9, Certificates.k8t5p9_check⟩
|
| 592 |
+
|
| 593 |
+
private theorem k8t5_cover26 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 8 5 ([[1], [2]] ++ P) := by
|
| 594 |
+
apply pathPatterns_forall_step
|
| 595 |
+
exact by
|
| 596 |
+
intro h
|
| 597 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 598 |
+
|
| 599 |
+
private theorem k8t5_cover23 : ∀ P ∈ pathPatterns 3 2 [1], HasCheckedCertificate 8 5 ([[1]] ++ P) := by
|
| 600 |
+
apply pathPatterns_forall_step
|
| 601 |
+
exact by
|
| 602 |
+
constructor
|
| 603 |
+
· exact by
|
| 604 |
+
intro h
|
| 605 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 606 |
+
· intro q
|
| 607 |
+
fin_cases q
|
| 608 |
+
· exact by
|
| 609 |
+
constructor
|
| 610 |
+
· exact by
|
| 611 |
+
intro _
|
| 612 |
+
exact k8t5_cover24
|
| 613 |
+
· intro q
|
| 614 |
+
fin_cases q
|
| 615 |
+
· exact by
|
| 616 |
+
intro _
|
| 617 |
+
exact k8t5_cover25
|
| 618 |
+
· exact by
|
| 619 |
+
constructor
|
| 620 |
+
· exact by
|
| 621 |
+
intro _
|
| 622 |
+
exact k8t5_cover26
|
| 623 |
+
· intro q
|
| 624 |
+
exact Fin.elim0 q
|
| 625 |
+
|
| 626 |
+
private theorem k8t5_cover27 : ∀ P ∈ pathPatterns 2 1 [1, 1], HasCheckedCertificate 8 5 ([[1, 1]] ++ P) := by
|
| 627 |
+
apply pathPatterns_forall_step
|
| 628 |
+
exact by
|
| 629 |
+
constructor
|
| 630 |
+
· exact by
|
| 631 |
+
intro h
|
| 632 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 633 |
+
· intro q
|
| 634 |
+
fin_cases q
|
| 635 |
+
· exact by
|
| 636 |
+
intro h
|
| 637 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h)
|
| 638 |
+
|
| 639 |
+
private theorem k8t5_cover28 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1], HasCheckedCertificate 8 5 ([[1, 1, 1]] ++ P) := by
|
| 640 |
+
apply pathPatterns_forall_step
|
| 641 |
+
exact by
|
| 642 |
+
intro h
|
| 643 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h)
|
| 644 |
+
|
| 645 |
+
private theorem k8t5_cover29 : ∀ P ∈ pathPatterns 2 0 [1, 2], HasCheckedCertificate 8 5 ([[1, 2]] ++ P) := by
|
| 646 |
+
apply pathPatterns_forall_step
|
| 647 |
+
exact by
|
| 648 |
+
constructor
|
| 649 |
+
· exact by
|
| 650 |
+
intro h
|
| 651 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h)
|
| 652 |
+
· intro q
|
| 653 |
+
exact Fin.elim0 q
|
| 654 |
+
|
| 655 |
+
private theorem k8t5_cover30 : ∀ P ∈ pathPatterns 3 1 [2], HasCheckedCertificate 8 5 ([[2]] ++ P) := by
|
| 656 |
+
apply pathPatterns_forall_step
|
| 657 |
+
exact by
|
| 658 |
+
constructor
|
| 659 |
+
· exact by
|
| 660 |
+
intro h
|
| 661 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 662 |
+
· intro q
|
| 663 |
+
fin_cases q
|
| 664 |
+
· exact by
|
| 665 |
+
constructor
|
| 666 |
+
· exact by
|
| 667 |
+
intro h
|
| 668 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h)
|
| 669 |
+
· intro q
|
| 670 |
+
exact Fin.elim0 q
|
| 671 |
+
|
| 672 |
+
private theorem k8t5_cover31 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 8 5 ([[3]] ++ P) := by
|
| 673 |
+
apply pathPatterns_forall_step
|
| 674 |
+
exact by
|
| 675 |
+
constructor
|
| 676 |
+
· exact by
|
| 677 |
+
intro h
|
| 678 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 679 |
+
· intro q
|
| 680 |
+
exact Fin.elim0 q
|
| 681 |
+
|
| 682 |
+
private theorem k8t5_cover1 : ∀ P ∈ pathPatterns 5 3 [], HasCheckedCertificate 8 5 ([] ++ P) := by
|
| 683 |
+
apply pathPatterns_forall_step
|
| 684 |
+
exact by
|
| 685 |
+
constructor
|
| 686 |
+
· exact by
|
| 687 |
+
intro _
|
| 688 |
+
exact k8t5_cover2
|
| 689 |
+
· intro q
|
| 690 |
+
fin_cases q
|
| 691 |
+
· exact by
|
| 692 |
+
constructor
|
| 693 |
+
· exact by
|
| 694 |
+
intro _
|
| 695 |
+
exact k8t5_cover23
|
| 696 |
+
· intro q
|
| 697 |
+
fin_cases q
|
| 698 |
+
· exact by
|
| 699 |
+
constructor
|
| 700 |
+
· exact by
|
| 701 |
+
intro _
|
| 702 |
+
exact k8t5_cover27
|
| 703 |
+
· intro q
|
| 704 |
+
fin_cases q
|
| 705 |
+
· exact by
|
| 706 |
+
constructor
|
| 707 |
+
· exact by
|
| 708 |
+
intro _
|
| 709 |
+
exact k8t5_cover28
|
| 710 |
+
· intro q
|
| 711 |
+
exact Fin.elim0 q
|
| 712 |
+
· exact by
|
| 713 |
+
constructor
|
| 714 |
+
· exact by
|
| 715 |
+
intro _
|
| 716 |
+
exact k8t5_cover29
|
| 717 |
+
· intro q
|
| 718 |
+
exact Fin.elim0 q
|
| 719 |
+
· exact by
|
| 720 |
+
constructor
|
| 721 |
+
· exact by
|
| 722 |
+
intro _
|
| 723 |
+
exact k8t5_cover30
|
| 724 |
+
· intro q
|
| 725 |
+
fin_cases q
|
| 726 |
+
· exact by
|
| 727 |
+
constructor
|
| 728 |
+
· exact by
|
| 729 |
+
intro h
|
| 730 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 731 |
+
· intro q
|
| 732 |
+
exact Fin.elim0 q
|
| 733 |
+
· exact by
|
| 734 |
+
constructor
|
| 735 |
+
· exact by
|
| 736 |
+
intro _
|
| 737 |
+
exact k8t5_cover31
|
| 738 |
+
· intro q
|
| 739 |
+
exact Fin.elim0 q
|
| 740 |
+
|
| 741 |
+
theorem coverage_k8_t5 :
|
| 742 |
+
∀ P ∈ pathPatterns 5 3, HasCheckedCertificate 8 5 P :=
|
| 743 |
+
k8t5_cover1
|
| 744 |
+
|
| 745 |
+
private theorem k8t6_cover7 : ∀ P ∈ pathPatterns 0 2 [], HasCheckedCertificate 8 6 ([[], [], [], [], [], []] ++ P) := by
|
| 746 |
+
apply pathPatterns_forall_zero
|
| 747 |
+
exact ⟨_, Certificates.k8t6p0, Certificates.k8t6p0_check⟩
|
| 748 |
+
|
| 749 |
+
private theorem k8t6_cover6 : ∀ P ∈ pathPatterns 1 2 [], HasCheckedCertificate 8 6 ([[], [], [], [], []] ++ P) := by
|
| 750 |
+
apply pathPatterns_forall_step
|
| 751 |
+
exact by
|
| 752 |
+
intro _
|
| 753 |
+
exact k8t6_cover7
|
| 754 |
+
|
| 755 |
+
private theorem k8t6_cover8 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 8 6 ([[], [], [], [], [1]] ++ P) := by
|
| 756 |
+
apply pathPatterns_forall_zero
|
| 757 |
+
exact ⟨_, Certificates.k8t6p1, Certificates.k8t6p1_check⟩
|
| 758 |
+
|
| 759 |
+
private theorem k8t6_cover9 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 8 6 ([[], [], [], [], [2]] ++ P) := by
|
| 760 |
+
apply pathPatterns_forall_zero
|
| 761 |
+
exact ⟨_, Certificates.k8t6p2, Certificates.k8t6p2_check⟩
|
| 762 |
+
|
| 763 |
+
private theorem k8t6_cover5 : ∀ P ∈ pathPatterns 2 2 [], HasCheckedCertificate 8 6 ([[], [], [], []] ++ P) := by
|
| 764 |
+
apply pathPatterns_forall_step
|
| 765 |
+
exact by
|
| 766 |
+
constructor
|
| 767 |
+
· exact by
|
| 768 |
+
intro _
|
| 769 |
+
exact k8t6_cover6
|
| 770 |
+
· intro q
|
| 771 |
+
fin_cases q
|
| 772 |
+
· exact by
|
| 773 |
+
intro _
|
| 774 |
+
exact k8t6_cover8
|
| 775 |
+
· exact by
|
| 776 |
+
intro _
|
| 777 |
+
exact k8t6_cover9
|
| 778 |
+
|
| 779 |
+
private theorem k8t6_cover10 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 8 6 ([[], [], [], [1]] ++ P) := by
|
| 780 |
+
apply pathPatterns_forall_step
|
| 781 |
+
exact by
|
| 782 |
+
intro h
|
| 783 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 784 |
+
|
| 785 |
+
private theorem k8t6_cover11 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 8 6 ([[], [], [], [1, 1]] ++ P) := by
|
| 786 |
+
apply pathPatterns_forall_zero
|
| 787 |
+
exact ⟨_, Certificates.k8t6p3, Certificates.k8t6p3_check⟩
|
| 788 |
+
|
| 789 |
+
private theorem k8t6_cover12 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 8 6 ([[], [], [], [2]] ++ P) := by
|
| 790 |
+
apply pathPatterns_forall_step
|
| 791 |
+
exact by
|
| 792 |
+
intro h
|
| 793 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 794 |
+
|
| 795 |
+
private theorem k8t6_cover4 : ∀ P ∈ pathPatterns 3 2 [], HasCheckedCertificate 8 6 ([[], [], []] ++ P) := by
|
| 796 |
+
apply pathPatterns_forall_step
|
| 797 |
+
exact by
|
| 798 |
+
constructor
|
| 799 |
+
· exact by
|
| 800 |
+
intro _
|
| 801 |
+
exact k8t6_cover5
|
| 802 |
+
· intro q
|
| 803 |
+
fin_cases q
|
| 804 |
+
· exact by
|
| 805 |
+
constructor
|
| 806 |
+
· exact by
|
| 807 |
+
intro _
|
| 808 |
+
exact k8t6_cover10
|
| 809 |
+
· intro q
|
| 810 |
+
fin_cases q
|
| 811 |
+
· exact by
|
| 812 |
+
intro _
|
| 813 |
+
exact k8t6_cover11
|
| 814 |
+
· exact by
|
| 815 |
+
constructor
|
| 816 |
+
· exact by
|
| 817 |
+
intro _
|
| 818 |
+
exact k8t6_cover12
|
| 819 |
+
· intro q
|
| 820 |
+
exact Fin.elim0 q
|
| 821 |
+
|
| 822 |
+
private theorem k8t6_cover14 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 8 6 ([[], [], [1], [1]] ++ P) := by
|
| 823 |
+
apply pathPatterns_forall_zero
|
| 824 |
+
exact ⟨_, Certificates.k8t6p4, Certificates.k8t6p4_check⟩
|
| 825 |
+
|
| 826 |
+
private theorem k8t6_cover13 : ∀ P ∈ pathPatterns 2 1 [1], HasCheckedCertificate 8 6 ([[], [], [1]] ++ P) := by
|
| 827 |
+
apply pathPatterns_forall_step
|
| 828 |
+
exact by
|
| 829 |
+
constructor
|
| 830 |
+
· exact by
|
| 831 |
+
intro h
|
| 832 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 833 |
+
· intro q
|
| 834 |
+
fin_cases q
|
| 835 |
+
· exact by
|
| 836 |
+
intro _
|
| 837 |
+
exact k8t6_cover14
|
| 838 |
+
|
| 839 |
+
private theorem k8t6_cover15 : ∀ P ∈ pathPatterns 1 0 [1, 1], HasCheckedCertificate 8 6 ([[], [], [1, 1]] ++ P) := by
|
| 840 |
+
apply pathPatterns_forall_step
|
| 841 |
+
exact by
|
| 842 |
+
intro h
|
| 843 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 844 |
+
|
| 845 |
+
private theorem k8t6_cover16 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 8 6 ([[], [], [2]] ++ P) := by
|
| 846 |
+
apply pathPatterns_forall_step
|
| 847 |
+
exact by
|
| 848 |
+
constructor
|
| 849 |
+
· exact by
|
| 850 |
+
intro h
|
| 851 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 852 |
+
· intro q
|
| 853 |
+
exact Fin.elim0 q
|
| 854 |
+
|
| 855 |
+
private theorem k8t6_cover3 : ∀ P ∈ pathPatterns 4 2 [], HasCheckedCertificate 8 6 ([[], []] ++ P) := by
|
| 856 |
+
apply pathPatterns_forall_step
|
| 857 |
+
exact by
|
| 858 |
+
constructor
|
| 859 |
+
· exact by
|
| 860 |
+
intro _
|
| 861 |
+
exact k8t6_cover4
|
| 862 |
+
· intro q
|
| 863 |
+
fin_cases q
|
| 864 |
+
· exact by
|
| 865 |
+
constructor
|
| 866 |
+
· exact by
|
| 867 |
+
intro _
|
| 868 |
+
exact k8t6_cover13
|
| 869 |
+
· intro q
|
| 870 |
+
fin_cases q
|
| 871 |
+
· exact by
|
| 872 |
+
constructor
|
| 873 |
+
· exact by
|
| 874 |
+
intro _
|
| 875 |
+
exact k8t6_cover15
|
| 876 |
+
· intro q
|
| 877 |
+
exact Fin.elim0 q
|
| 878 |
+
· exact by
|
| 879 |
+
constructor
|
| 880 |
+
· exact by
|
| 881 |
+
intro _
|
| 882 |
+
exact k8t6_cover16
|
| 883 |
+
· intro q
|
| 884 |
+
exact Fin.elim0 q
|
| 885 |
+
|
| 886 |
+
private theorem k8t6_cover18 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 8 6 ([[], [1], [1]] ++ P) := by
|
| 887 |
+
apply pathPatterns_forall_step
|
| 888 |
+
exact by
|
| 889 |
+
intro h
|
| 890 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 891 |
+
|
| 892 |
+
private theorem k8t6_cover17 : ∀ P ∈ pathPatterns 3 1 [1], HasCheckedCertificate 8 6 ([[], [1]] ++ P) := by
|
| 893 |
+
apply pathPatterns_forall_step
|
| 894 |
+
exact by
|
| 895 |
+
constructor
|
| 896 |
+
· exact by
|
| 897 |
+
intro h
|
| 898 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 899 |
+
· intro q
|
| 900 |
+
fin_cases q
|
| 901 |
+
· exact by
|
| 902 |
+
constructor
|
| 903 |
+
· exact by
|
| 904 |
+
intro _
|
| 905 |
+
exact k8t6_cover18
|
| 906 |
+
· intro q
|
| 907 |
+
exact Fin.elim0 q
|
| 908 |
+
|
| 909 |
+
private theorem k8t6_cover19 : ∀ P ∈ pathPatterns 2 0 [1, 1], HasCheckedCertificate 8 6 ([[], [1, 1]] ++ P) := by
|
| 910 |
+
apply pathPatterns_forall_step
|
| 911 |
+
exact by
|
| 912 |
+
constructor
|
| 913 |
+
· exact by
|
| 914 |
+
intro h
|
| 915 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 916 |
+
· intro q
|
| 917 |
+
exact Fin.elim0 q
|
| 918 |
+
|
| 919 |
+
private theorem k8t6_cover20 : ∀ P ∈ pathPatterns 3 0 [2], HasCheckedCertificate 8 6 ([[], [2]] ++ P) := by
|
| 920 |
+
apply pathPatterns_forall_step
|
| 921 |
+
exact by
|
| 922 |
+
constructor
|
| 923 |
+
· exact by
|
| 924 |
+
intro h
|
| 925 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 926 |
+
· intro q
|
| 927 |
+
exact Fin.elim0 q
|
| 928 |
+
|
| 929 |
+
private theorem k8t6_cover2 : ∀ P ∈ pathPatterns 5 2 [], HasCheckedCertificate 8 6 ([[]] ++ P) := by
|
| 930 |
+
apply pathPatterns_forall_step
|
| 931 |
+
exact by
|
| 932 |
+
constructor
|
| 933 |
+
· exact by
|
| 934 |
+
intro _
|
| 935 |
+
exact k8t6_cover3
|
| 936 |
+
· intro q
|
| 937 |
+
fin_cases q
|
| 938 |
+
· exact by
|
| 939 |
+
constructor
|
| 940 |
+
· exact by
|
| 941 |
+
intro _
|
| 942 |
+
exact k8t6_cover17
|
| 943 |
+
· intro q
|
| 944 |
+
fin_cases q
|
| 945 |
+
· exact by
|
| 946 |
+
constructor
|
| 947 |
+
· exact by
|
| 948 |
+
intro _
|
| 949 |
+
exact k8t6_cover19
|
| 950 |
+
· intro q
|
| 951 |
+
exact Fin.elim0 q
|
| 952 |
+
· exact by
|
| 953 |
+
constructor
|
| 954 |
+
· exact by
|
| 955 |
+
intro _
|
| 956 |
+
exact k8t6_cover20
|
| 957 |
+
· intro q
|
| 958 |
+
exact Fin.elim0 q
|
| 959 |
+
|
| 960 |
+
private theorem k8t6_cover22 : ∀ P ∈ pathPatterns 2 0 [1], HasCheckedCertificate 8 6 ([[1], [1]] ++ P) := by
|
| 961 |
+
apply pathPatterns_forall_step
|
| 962 |
+
exact by
|
| 963 |
+
constructor
|
| 964 |
+
· exact by
|
| 965 |
+
intro h
|
| 966 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 967 |
+
· intro q
|
| 968 |
+
exact Fin.elim0 q
|
| 969 |
+
|
| 970 |
+
private theorem k8t6_cover21 : ∀ P ∈ pathPatterns 4 1 [1], HasCheckedCertificate 8 6 ([[1]] ++ P) := by
|
| 971 |
+
apply pathPatterns_forall_step
|
| 972 |
+
exact by
|
| 973 |
+
constructor
|
| 974 |
+
· exact by
|
| 975 |
+
intro h
|
| 976 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 977 |
+
· intro q
|
| 978 |
+
fin_cases q
|
| 979 |
+
· exact by
|
| 980 |
+
constructor
|
| 981 |
+
· exact by
|
| 982 |
+
intro _
|
| 983 |
+
exact k8t6_cover22
|
| 984 |
+
· intro q
|
| 985 |
+
exact Fin.elim0 q
|
| 986 |
+
|
| 987 |
+
private theorem k8t6_cover23 : ∀ P ∈ pathPatterns 3 0 [1, 1], HasCheckedCertificate 8 6 ([[1, 1]] ++ P) := by
|
| 988 |
+
apply pathPatterns_forall_step
|
| 989 |
+
exact by
|
| 990 |
+
constructor
|
| 991 |
+
· exact by
|
| 992 |
+
intro h
|
| 993 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 994 |
+
· intro q
|
| 995 |
+
exact Fin.elim0 q
|
| 996 |
+
|
| 997 |
+
private theorem k8t6_cover24 : ∀ P ∈ pathPatterns 4 0 [2], HasCheckedCertificate 8 6 ([[2]] ++ P) := by
|
| 998 |
+
apply pathPatterns_forall_step
|
| 999 |
+
exact by
|
| 1000 |
+
constructor
|
| 1001 |
+
· exact by
|
| 1002 |
+
intro h
|
| 1003 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 1004 |
+
· intro q
|
| 1005 |
+
exact Fin.elim0 q
|
| 1006 |
+
|
| 1007 |
+
private theorem k8t6_cover1 : ∀ P ∈ pathPatterns 6 2 [], HasCheckedCertificate 8 6 ([] ++ P) := by
|
| 1008 |
+
apply pathPatterns_forall_step
|
| 1009 |
+
exact by
|
| 1010 |
+
constructor
|
| 1011 |
+
· exact by
|
| 1012 |
+
intro _
|
| 1013 |
+
exact k8t6_cover2
|
| 1014 |
+
· intro q
|
| 1015 |
+
fin_cases q
|
| 1016 |
+
· exact by
|
| 1017 |
+
constructor
|
| 1018 |
+
· exact by
|
| 1019 |
+
intro _
|
| 1020 |
+
exact k8t6_cover21
|
| 1021 |
+
· intro q
|
| 1022 |
+
fin_cases q
|
| 1023 |
+
· exact by
|
| 1024 |
+
constructor
|
| 1025 |
+
· exact by
|
| 1026 |
+
intro _
|
| 1027 |
+
exact k8t6_cover23
|
| 1028 |
+
· intro q
|
| 1029 |
+
exact Fin.elim0 q
|
| 1030 |
+
· exact by
|
| 1031 |
+
constructor
|
| 1032 |
+
· exact by
|
| 1033 |
+
intro _
|
| 1034 |
+
exact k8t6_cover24
|
| 1035 |
+
· intro q
|
| 1036 |
+
exact Fin.elim0 q
|
| 1037 |
+
|
| 1038 |
+
theorem coverage_k8_t6 :
|
| 1039 |
+
∀ P ∈ pathPatterns 6 2, HasCheckedCertificate 8 6 P :=
|
| 1040 |
+
k8t6_cover1
|
| 1041 |
+
|
| 1042 |
+
private theorem k8t7_cover8 : ∀ P ∈ pathPatterns 0 1 [], HasCheckedCertificate 8 7 ([[], [], [], [], [], [], []] ++ P) := by
|
| 1043 |
+
apply pathPatterns_forall_zero
|
| 1044 |
+
exact ⟨_, Certificates.k8t7p0, Certificates.k8t7p0_check⟩
|
| 1045 |
+
|
| 1046 |
+
private theorem k8t7_cover7 : ∀ P ∈ pathPatterns 1 1 [], HasCheckedCertificate 8 7 ([[], [], [], [], [], []] ++ P) := by
|
| 1047 |
+
apply pathPatterns_forall_step
|
| 1048 |
+
exact by
|
| 1049 |
+
intro _
|
| 1050 |
+
exact k8t7_cover8
|
| 1051 |
+
|
| 1052 |
+
private theorem k8t7_cover9 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 8 7 ([[], [], [], [], [], [1]] ++ P) := by
|
| 1053 |
+
apply pathPatterns_forall_zero
|
| 1054 |
+
exact ⟨_, Certificates.k8t7p1, Certificates.k8t7p1_check⟩
|
| 1055 |
+
|
| 1056 |
+
private theorem k8t7_cover6 : ∀ P ∈ pathPatterns 2 1 [], HasCheckedCertificate 8 7 ([[], [], [], [], []] ++ P) := by
|
| 1057 |
+
apply pathPatterns_forall_step
|
| 1058 |
+
exact by
|
| 1059 |
+
constructor
|
| 1060 |
+
· exact by
|
| 1061 |
+
intro _
|
| 1062 |
+
exact k8t7_cover7
|
| 1063 |
+
· intro q
|
| 1064 |
+
fin_cases q
|
| 1065 |
+
· exact by
|
| 1066 |
+
intro _
|
| 1067 |
+
exact k8t7_cover9
|
| 1068 |
+
|
| 1069 |
+
private theorem k8t7_cover10 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 8 7 ([[], [], [], [], [1]] ++ P) := by
|
| 1070 |
+
apply pathPatterns_forall_step
|
| 1071 |
+
exact by
|
| 1072 |
+
intro h
|
| 1073 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 1074 |
+
|
| 1075 |
+
private theorem k8t7_cover5 : ∀ P ∈ pathPatterns 3 1 [], HasCheckedCertificate 8 7 ([[], [], [], []] ++ P) := by
|
| 1076 |
+
apply pathPatterns_forall_step
|
| 1077 |
+
exact by
|
| 1078 |
+
constructor
|
| 1079 |
+
· exact by
|
| 1080 |
+
intro _
|
| 1081 |
+
exact k8t7_cover6
|
| 1082 |
+
· intro q
|
| 1083 |
+
fin_cases q
|
| 1084 |
+
· exact by
|
| 1085 |
+
constructor
|
| 1086 |
+
· exact by
|
| 1087 |
+
intro _
|
| 1088 |
+
exact k8t7_cover10
|
| 1089 |
+
· intro q
|
| 1090 |
+
exact Fin.elim0 q
|
| 1091 |
+
|
| 1092 |
+
private theorem k8t7_cover11 : ∀ P ∈ pathPatterns 2 0 [1], HasCheckedCertificate 8 7 ([[], [], [], [1]] ++ P) := by
|
| 1093 |
+
apply pathPatterns_forall_step
|
| 1094 |
+
exact by
|
| 1095 |
+
constructor
|
| 1096 |
+
· exact by
|
| 1097 |
+
intro h
|
| 1098 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 1099 |
+
· intro q
|
| 1100 |
+
exact Fin.elim0 q
|
| 1101 |
+
|
| 1102 |
+
private theorem k8t7_cover4 : ∀ P ∈ pathPatterns 4 1 [], HasCheckedCertificate 8 7 ([[], [], []] ++ P) := by
|
| 1103 |
+
apply pathPatterns_forall_step
|
| 1104 |
+
exact by
|
| 1105 |
+
constructor
|
| 1106 |
+
· exact by
|
| 1107 |
+
intro _
|
| 1108 |
+
exact k8t7_cover5
|
| 1109 |
+
· intro q
|
| 1110 |
+
fin_cases q
|
| 1111 |
+
· exact by
|
| 1112 |
+
constructor
|
| 1113 |
+
· exact by
|
| 1114 |
+
intro _
|
| 1115 |
+
exact k8t7_cover11
|
| 1116 |
+
· intro q
|
| 1117 |
+
exact Fin.elim0 q
|
| 1118 |
+
|
| 1119 |
+
private theorem k8t7_cover12 : ∀ P ∈ pathPatterns 3 0 [1], HasCheckedCertificate 8 7 ([[], [], [1]] ++ P) := by
|
| 1120 |
+
apply pathPatterns_forall_step
|
| 1121 |
+
exact by
|
| 1122 |
+
constructor
|
| 1123 |
+
· exact by
|
| 1124 |
+
intro h
|
| 1125 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 1126 |
+
· intro q
|
| 1127 |
+
exact Fin.elim0 q
|
| 1128 |
+
|
| 1129 |
+
private theorem k8t7_cover3 : ∀ P ∈ pathPatterns 5 1 [], HasCheckedCertificate 8 7 ([[], []] ++ P) := by
|
| 1130 |
+
apply pathPatterns_forall_step
|
| 1131 |
+
exact by
|
| 1132 |
+
constructor
|
| 1133 |
+
· exact by
|
| 1134 |
+
intro _
|
| 1135 |
+
exact k8t7_cover4
|
| 1136 |
+
· intro q
|
| 1137 |
+
fin_cases q
|
| 1138 |
+
· exact by
|
| 1139 |
+
constructor
|
| 1140 |
+
· exact by
|
| 1141 |
+
intro _
|
| 1142 |
+
exact k8t7_cover12
|
| 1143 |
+
· intro q
|
| 1144 |
+
exact Fin.elim0 q
|
| 1145 |
+
|
| 1146 |
+
private theorem k8t7_cover13 : ∀ P ∈ pathPatterns 4 0 [1], HasCheckedCertificate 8 7 ([[], [1]] ++ P) := by
|
| 1147 |
+
apply pathPatterns_forall_step
|
| 1148 |
+
exact by
|
| 1149 |
+
constructor
|
| 1150 |
+
· exact by
|
| 1151 |
+
intro h
|
| 1152 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 1153 |
+
· intro q
|
| 1154 |
+
exact Fin.elim0 q
|
| 1155 |
+
|
| 1156 |
+
private theorem k8t7_cover2 : ∀ P ∈ pathPatterns 6 1 [], HasCheckedCertificate 8 7 ([[]] ++ P) := by
|
| 1157 |
+
apply pathPatterns_forall_step
|
| 1158 |
+
exact by
|
| 1159 |
+
constructor
|
| 1160 |
+
· exact by
|
| 1161 |
+
intro _
|
| 1162 |
+
exact k8t7_cover3
|
| 1163 |
+
· intro q
|
| 1164 |
+
fin_cases q
|
| 1165 |
+
· exact by
|
| 1166 |
+
constructor
|
| 1167 |
+
· exact by
|
| 1168 |
+
intro _
|
| 1169 |
+
exact k8t7_cover13
|
| 1170 |
+
· intro q
|
| 1171 |
+
exact Fin.elim0 q
|
| 1172 |
+
|
| 1173 |
+
private theorem k8t7_cover14 : ∀ P ∈ pathPatterns 5 0 [1], HasCheckedCertificate 8 7 ([[1]] ++ P) := by
|
| 1174 |
+
apply pathPatterns_forall_step
|
| 1175 |
+
exact by
|
| 1176 |
+
constructor
|
| 1177 |
+
· exact by
|
| 1178 |
+
intro h
|
| 1179 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 1180 |
+
· intro q
|
| 1181 |
+
exact Fin.elim0 q
|
| 1182 |
+
|
| 1183 |
+
private theorem k8t7_cover1 : ∀ P ∈ pathPatterns 7 1 [], HasCheckedCertificate 8 7 ([] ++ P) := by
|
| 1184 |
+
apply pathPatterns_forall_step
|
| 1185 |
+
exact by
|
| 1186 |
+
constructor
|
| 1187 |
+
· exact by
|
| 1188 |
+
intro _
|
| 1189 |
+
exact k8t7_cover2
|
| 1190 |
+
· intro q
|
| 1191 |
+
fin_cases q
|
| 1192 |
+
· exact by
|
| 1193 |
+
constructor
|
| 1194 |
+
· exact by
|
| 1195 |
+
intro _
|
| 1196 |
+
exact k8t7_cover14
|
| 1197 |
+
· intro q
|
| 1198 |
+
exact Fin.elim0 q
|
| 1199 |
+
|
| 1200 |
+
theorem coverage_k8_t7 :
|
| 1201 |
+
∀ P ∈ pathPatterns 7 1, HasCheckedCertificate 8 7 P :=
|
| 1202 |
+
k8t7_cover1
|
| 1203 |
+
|
| 1204 |
+
private theorem k8t8_cover9 : ∀ P ∈ pathPatterns 0 0 [], HasCheckedCertificate 8 8 ([[], [], [], [], [], [], [], []] ++ P) := by
|
| 1205 |
+
apply pathPatterns_forall_zero
|
| 1206 |
+
exact ⟨_, Certificates.k8t8p0, Certificates.k8t8p0_check⟩
|
| 1207 |
+
|
| 1208 |
+
private theorem k8t8_cover8 : ∀ P ∈ pathPatterns 1 0 [], HasCheckedCertificate 8 8 ([[], [], [], [], [], [], []] ++ P) := by
|
| 1209 |
+
apply pathPatterns_forall_step
|
| 1210 |
+
exact by
|
| 1211 |
+
intro _
|
| 1212 |
+
exact k8t8_cover9
|
| 1213 |
+
|
| 1214 |
+
private theorem k8t8_cover7 : ∀ P ∈ pathPatterns 2 0 [], HasCheckedCertificate 8 8 ([[], [], [], [], [], []] ++ P) := by
|
| 1215 |
+
apply pathPatterns_forall_step
|
| 1216 |
+
exact by
|
| 1217 |
+
constructor
|
| 1218 |
+
· exact by
|
| 1219 |
+
intro _
|
| 1220 |
+
exact k8t8_cover8
|
| 1221 |
+
· intro q
|
| 1222 |
+
exact Fin.elim0 q
|
| 1223 |
+
|
| 1224 |
+
private theorem k8t8_cover6 : ∀ P ∈ pathPatterns 3 0 [], HasCheckedCertificate 8 8 ([[], [], [], [], []] ++ P) := by
|
| 1225 |
+
apply pathPatterns_forall_step
|
| 1226 |
+
exact by
|
| 1227 |
+
constructor
|
| 1228 |
+
· exact by
|
| 1229 |
+
intro _
|
| 1230 |
+
exact k8t8_cover7
|
| 1231 |
+
· intro q
|
| 1232 |
+
exact Fin.elim0 q
|
| 1233 |
+
|
| 1234 |
+
private theorem k8t8_cover5 : ∀ P ∈ pathPatterns 4 0 [], HasCheckedCertificate 8 8 ([[], [], [], []] ++ P) := by
|
| 1235 |
+
apply pathPatterns_forall_step
|
| 1236 |
+
exact by
|
| 1237 |
+
constructor
|
| 1238 |
+
· exact by
|
| 1239 |
+
intro _
|
| 1240 |
+
exact k8t8_cover6
|
| 1241 |
+
· intro q
|
| 1242 |
+
exact Fin.elim0 q
|
| 1243 |
+
|
| 1244 |
+
private theorem k8t8_cover4 : ∀ P ∈ pathPatterns 5 0 [], HasCheckedCertificate 8 8 ([[], [], []] ++ P) := by
|
| 1245 |
+
apply pathPatterns_forall_step
|
| 1246 |
+
exact by
|
| 1247 |
+
constructor
|
| 1248 |
+
· exact by
|
| 1249 |
+
intro _
|
| 1250 |
+
exact k8t8_cover5
|
| 1251 |
+
· intro q
|
| 1252 |
+
exact Fin.elim0 q
|
| 1253 |
+
|
| 1254 |
+
private theorem k8t8_cover3 : ∀ P ∈ pathPatterns 6 0 [], HasCheckedCertificate 8 8 ([[], []] ++ P) := by
|
| 1255 |
+
apply pathPatterns_forall_step
|
| 1256 |
+
exact by
|
| 1257 |
+
constructor
|
| 1258 |
+
· exact by
|
| 1259 |
+
intro _
|
| 1260 |
+
exact k8t8_cover4
|
| 1261 |
+
· intro q
|
| 1262 |
+
exact Fin.elim0 q
|
| 1263 |
+
|
| 1264 |
+
private theorem k8t8_cover2 : ∀ P ∈ pathPatterns 7 0 [], HasCheckedCertificate 8 8 ([[]] ++ P) := by
|
| 1265 |
+
apply pathPatterns_forall_step
|
| 1266 |
+
exact by
|
| 1267 |
+
constructor
|
| 1268 |
+
· exact by
|
| 1269 |
+
intro _
|
| 1270 |
+
exact k8t8_cover3
|
| 1271 |
+
· intro q
|
| 1272 |
+
exact Fin.elim0 q
|
| 1273 |
+
|
| 1274 |
+
private theorem k8t8_cover1 : ∀ P ∈ pathPatterns 8 0 [], HasCheckedCertificate 8 8 ([] ++ P) := by
|
| 1275 |
+
apply pathPatterns_forall_step
|
| 1276 |
+
exact by
|
| 1277 |
+
constructor
|
| 1278 |
+
· exact by
|
| 1279 |
+
intro _
|
| 1280 |
+
exact k8t8_cover2
|
| 1281 |
+
· intro q
|
| 1282 |
+
exact Fin.elim0 q
|
| 1283 |
+
|
| 1284 |
+
theorem coverage_k8_t8 :
|
| 1285 |
+
∀ P ∈ pathPatterns 8 0, HasCheckedCertificate 8 8 P :=
|
| 1286 |
+
k8t8_cover1
|
| 1287 |
+
|
| 1288 |
+
end CycleClique.Construction.CertifiedCoverage
|
| 1289 |
+
|
| 1290 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CoverageK9.lean
ADDED
|
@@ -0,0 +1,2318 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificatesK9
|
| 2 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.CertificateCoverage
|
| 3 |
+
|
| 4 |
+
namespace OAI
|
| 5 |
+
|
| 6 |
+
namespace CycleClique.Construction.CertifiedCoverage
|
| 7 |
+
|
| 8 |
+
private theorem k9t4_cover6 : ∀ P ∈ pathPatterns 0 5 [], HasCheckedCertificate 9 4 ([[], [], [], []] ++ P) := by
|
| 9 |
+
apply pathPatterns_forall_zero
|
| 10 |
+
exact ⟨_, Certificates.k9t4p0, Certificates.k9t4p0_check⟩
|
| 11 |
+
|
| 12 |
+
private theorem k9t4_cover5 : ∀ P ∈ pathPatterns 1 5 [], HasCheckedCertificate 9 4 ([[], [], []] ++ P) := by
|
| 13 |
+
apply pathPatterns_forall_step
|
| 14 |
+
exact by
|
| 15 |
+
intro _
|
| 16 |
+
exact k9t4_cover6
|
| 17 |
+
|
| 18 |
+
private theorem k9t4_cover7 : ∀ P ∈ pathPatterns 0 4 [1], HasCheckedCertificate 9 4 ([[], [], [1]] ++ P) := by
|
| 19 |
+
apply pathPatterns_forall_zero
|
| 20 |
+
exact ⟨_, Certificates.k9t4p1, Certificates.k9t4p1_check⟩
|
| 21 |
+
|
| 22 |
+
private theorem k9t4_cover8 : ∀ P ∈ pathPatterns 0 3 [2], HasCheckedCertificate 9 4 ([[], [], [2]] ++ P) := by
|
| 23 |
+
apply pathPatterns_forall_zero
|
| 24 |
+
exact ⟨_, Certificates.k9t4p2, Certificates.k9t4p2_check⟩
|
| 25 |
+
|
| 26 |
+
private theorem k9t4_cover9 : ∀ P ∈ pathPatterns 0 2 [3], HasCheckedCertificate 9 4 ([[], [], [3]] ++ P) := by
|
| 27 |
+
apply pathPatterns_forall_zero
|
| 28 |
+
exact ⟨_, Certificates.k9t4p3, Certificates.k9t4p3_check⟩
|
| 29 |
+
|
| 30 |
+
private theorem k9t4_cover10 : ∀ P ∈ pathPatterns 0 1 [4], HasCheckedCertificate 9 4 ([[], [], [4]] ++ P) := by
|
| 31 |
+
apply pathPatterns_forall_zero
|
| 32 |
+
exact ⟨_, Certificates.k9t4p4, Certificates.k9t4p4_check⟩
|
| 33 |
+
|
| 34 |
+
private theorem k9t4_cover11 : ∀ P ∈ pathPatterns 0 0 [5], HasCheckedCertificate 9 4 ([[], [], [5]] ++ P) := by
|
| 35 |
+
apply pathPatterns_forall_zero
|
| 36 |
+
exact ⟨_, Certificates.k9t4p5, Certificates.k9t4p5_check⟩
|
| 37 |
+
|
| 38 |
+
private theorem k9t4_cover4 : ∀ P ∈ pathPatterns 2 5 [], HasCheckedCertificate 9 4 ([[], []] ++ P) := by
|
| 39 |
+
apply pathPatterns_forall_step
|
| 40 |
+
exact by
|
| 41 |
+
constructor
|
| 42 |
+
· exact by
|
| 43 |
+
intro _
|
| 44 |
+
exact k9t4_cover5
|
| 45 |
+
· intro q
|
| 46 |
+
fin_cases q
|
| 47 |
+
· exact by
|
| 48 |
+
intro _
|
| 49 |
+
exact k9t4_cover7
|
| 50 |
+
· exact by
|
| 51 |
+
intro _
|
| 52 |
+
exact k9t4_cover8
|
| 53 |
+
· exact by
|
| 54 |
+
intro _
|
| 55 |
+
exact k9t4_cover9
|
| 56 |
+
· exact by
|
| 57 |
+
intro _
|
| 58 |
+
exact k9t4_cover10
|
| 59 |
+
· exact by
|
| 60 |
+
intro _
|
| 61 |
+
exact k9t4_cover11
|
| 62 |
+
|
| 63 |
+
private theorem k9t4_cover12 : ∀ P ∈ pathPatterns 1 4 [1], HasCheckedCertificate 9 4 ([[], [1]] ++ P) := by
|
| 64 |
+
apply pathPatterns_forall_step
|
| 65 |
+
exact by
|
| 66 |
+
intro h
|
| 67 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 68 |
+
|
| 69 |
+
private theorem k9t4_cover13 : ∀ P ∈ pathPatterns 0 3 [1, 1], HasCheckedCertificate 9 4 ([[], [1, 1]] ++ P) := by
|
| 70 |
+
apply pathPatterns_forall_zero
|
| 71 |
+
exact ⟨_, Certificates.k9t4p6, Certificates.k9t4p6_check⟩
|
| 72 |
+
|
| 73 |
+
private theorem k9t4_cover14 : ∀ P ∈ pathPatterns 0 2 [1, 2], HasCheckedCertificate 9 4 ([[], [1, 2]] ++ P) := by
|
| 74 |
+
apply pathPatterns_forall_zero
|
| 75 |
+
exact ⟨_, Certificates.k9t4p7, Certificates.k9t4p7_check⟩
|
| 76 |
+
|
| 77 |
+
private theorem k9t4_cover15 : ∀ P ∈ pathPatterns 0 1 [1, 3], HasCheckedCertificate 9 4 ([[], [1, 3]] ++ P) := by
|
| 78 |
+
apply pathPatterns_forall_zero
|
| 79 |
+
exact ⟨_, Certificates.k9t4p8, Certificates.k9t4p8_check⟩
|
| 80 |
+
|
| 81 |
+
private theorem k9t4_cover16 : ∀ P ∈ pathPatterns 0 0 [1, 4], HasCheckedCertificate 9 4 ([[], [1, 4]] ++ P) := by
|
| 82 |
+
apply pathPatterns_forall_zero
|
| 83 |
+
exact ⟨_, Certificates.k9t4p9, Certificates.k9t4p9_check⟩
|
| 84 |
+
|
| 85 |
+
private theorem k9t4_cover17 : ∀ P ∈ pathPatterns 1 3 [2], HasCheckedCertificate 9 4 ([[], [2]] ++ P) := by
|
| 86 |
+
apply pathPatterns_forall_step
|
| 87 |
+
exact by
|
| 88 |
+
intro h
|
| 89 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 90 |
+
|
| 91 |
+
private theorem k9t4_cover18 : ∀ P ∈ pathPatterns 0 1 [2, 2], HasCheckedCertificate 9 4 ([[], [2, 2]] ++ P) := by
|
| 92 |
+
apply pathPatterns_forall_zero
|
| 93 |
+
exact ⟨_, Certificates.k9t4p10, Certificates.k9t4p10_check⟩
|
| 94 |
+
|
| 95 |
+
private theorem k9t4_cover19 : ∀ P ∈ pathPatterns 0 0 [2, 3], HasCheckedCertificate 9 4 ([[], [2, 3]] ++ P) := by
|
| 96 |
+
apply pathPatterns_forall_zero
|
| 97 |
+
exact ⟨_, Certificates.k9t4p11, Certificates.k9t4p11_check⟩
|
| 98 |
+
|
| 99 |
+
private theorem k9t4_cover20 : ∀ P ∈ pathPatterns 1 2 [3], HasCheckedCertificate 9 4 ([[], [3]] ++ P) := by
|
| 100 |
+
apply pathPatterns_forall_step
|
| 101 |
+
exact by
|
| 102 |
+
intro h
|
| 103 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 104 |
+
|
| 105 |
+
private theorem k9t4_cover21 : ∀ P ∈ pathPatterns 1 1 [4], HasCheckedCertificate 9 4 ([[], [4]] ++ P) := by
|
| 106 |
+
apply pathPatterns_forall_step
|
| 107 |
+
exact by
|
| 108 |
+
intro h
|
| 109 |
+
exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h)
|
| 110 |
+
|
| 111 |
+
private theorem k9t4_cover22 : ∀ P ∈ pathPatterns 1 0 [5], HasCheckedCertificate 9 4 ([[], [5]] ++ P) := by
|
| 112 |
+
apply pathPatterns_forall_step
|
| 113 |
+
exact by
|
| 114 |
+
intro h
|
| 115 |
+
exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h)
|
| 116 |
+
|
| 117 |
+
private theorem k9t4_cover3 : ∀ P ∈ pathPatterns 3 5 [], HasCheckedCertificate 9 4 ([[]] ++ P) := by
|
| 118 |
+
apply pathPatterns_forall_step
|
| 119 |
+
exact by
|
| 120 |
+
constructor
|
| 121 |
+
· exact by
|
| 122 |
+
intro _
|
| 123 |
+
exact k9t4_cover4
|
| 124 |
+
· intro q
|
| 125 |
+
fin_cases q
|
| 126 |
+
· exact by
|
| 127 |
+
constructor
|
| 128 |
+
· exact by
|
| 129 |
+
intro _
|
| 130 |
+
exact k9t4_cover12
|
| 131 |
+
· intro q
|
| 132 |
+
fin_cases q
|
| 133 |
+
· exact by
|
| 134 |
+
intro _
|
| 135 |
+
exact k9t4_cover13
|
| 136 |
+
· exact by
|
| 137 |
+
intro _
|
| 138 |
+
exact k9t4_cover14
|
| 139 |
+
· exact by
|
| 140 |
+
intro _
|
| 141 |
+
exact k9t4_cover15
|
| 142 |
+
· exact by
|
| 143 |
+
intro _
|
| 144 |
+
exact k9t4_cover16
|
| 145 |
+
· exact by
|
| 146 |
+
constructor
|
| 147 |
+
· exact by
|
| 148 |
+
intro _
|
| 149 |
+
exact k9t4_cover17
|
| 150 |
+
· intro q
|
| 151 |
+
fin_cases q
|
| 152 |
+
· exact by
|
| 153 |
+
intro h
|
| 154 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 155 |
+
· exact by
|
| 156 |
+
intro _
|
| 157 |
+
exact k9t4_cover18
|
| 158 |
+
· exact by
|
| 159 |
+
intro _
|
| 160 |
+
exact k9t4_cover19
|
| 161 |
+
· exact by
|
| 162 |
+
constructor
|
| 163 |
+
· exact by
|
| 164 |
+
intro _
|
| 165 |
+
exact k9t4_cover20
|
| 166 |
+
· intro q
|
| 167 |
+
fin_cases q
|
| 168 |
+
· exact by
|
| 169 |
+
intro h
|
| 170 |
+
exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h)
|
| 171 |
+
· exact by
|
| 172 |
+
intro h
|
| 173 |
+
exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h)
|
| 174 |
+
· exact by
|
| 175 |
+
constructor
|
| 176 |
+
· exact by
|
| 177 |
+
intro _
|
| 178 |
+
exact k9t4_cover21
|
| 179 |
+
· intro q
|
| 180 |
+
fin_cases q
|
| 181 |
+
· exact by
|
| 182 |
+
intro h
|
| 183 |
+
exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h)
|
| 184 |
+
· exact by
|
| 185 |
+
constructor
|
| 186 |
+
· exact by
|
| 187 |
+
intro _
|
| 188 |
+
exact k9t4_cover22
|
| 189 |
+
· intro q
|
| 190 |
+
exact Fin.elim0 q
|
| 191 |
+
|
| 192 |
+
private theorem k9t4_cover24 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 9 4 ([[1], [1]] ++ P) := by
|
| 193 |
+
apply pathPatterns_forall_zero
|
| 194 |
+
exact ⟨_, Certificates.k9t4p12, Certificates.k9t4p12_check⟩
|
| 195 |
+
|
| 196 |
+
private theorem k9t4_cover25 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 9 4 ([[1], [2]] ++ P) := by
|
| 197 |
+
apply pathPatterns_forall_zero
|
| 198 |
+
exact ⟨_, Certificates.k9t4p13, Certificates.k9t4p13_check⟩
|
| 199 |
+
|
| 200 |
+
private theorem k9t4_cover26 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 9 4 ([[1], [3]] ++ P) := by
|
| 201 |
+
apply pathPatterns_forall_zero
|
| 202 |
+
exact ⟨_, Certificates.k9t4p14, Certificates.k9t4p14_check⟩
|
| 203 |
+
|
| 204 |
+
private theorem k9t4_cover27 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 9 4 ([[1], [4]] ++ P) := by
|
| 205 |
+
apply pathPatterns_forall_zero
|
| 206 |
+
exact ⟨_, Certificates.k9t4p15, Certificates.k9t4p15_check⟩
|
| 207 |
+
|
| 208 |
+
private theorem k9t4_cover23 : ∀ P ∈ pathPatterns 2 4 [1], HasCheckedCertificate 9 4 ([[1]] ++ P) := by
|
| 209 |
+
apply pathPatterns_forall_step
|
| 210 |
+
exact by
|
| 211 |
+
constructor
|
| 212 |
+
· exact by
|
| 213 |
+
intro h
|
| 214 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 215 |
+
· intro q
|
| 216 |
+
fin_cases q
|
| 217 |
+
· exact by
|
| 218 |
+
intro _
|
| 219 |
+
exact k9t4_cover24
|
| 220 |
+
· exact by
|
| 221 |
+
intro _
|
| 222 |
+
exact k9t4_cover25
|
| 223 |
+
· exact by
|
| 224 |
+
intro _
|
| 225 |
+
exact k9t4_cover26
|
| 226 |
+
· exact by
|
| 227 |
+
intro _
|
| 228 |
+
exact k9t4_cover27
|
| 229 |
+
|
| 230 |
+
private theorem k9t4_cover28 : ∀ P ∈ pathPatterns 1 3 [1, 1], HasCheckedCertificate 9 4 ([[1, 1]] ++ P) := by
|
| 231 |
+
apply pathPatterns_forall_step
|
| 232 |
+
exact by
|
| 233 |
+
intro h
|
| 234 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 235 |
+
|
| 236 |
+
private theorem k9t4_cover29 : ∀ P ∈ pathPatterns 0 2 [1, 1, 1], HasCheckedCertificate 9 4 ([[1, 1, 1]] ++ P) := by
|
| 237 |
+
apply pathPatterns_forall_zero
|
| 238 |
+
exact ⟨_, Certificates.k9t4p16, Certificates.k9t4p16_check⟩
|
| 239 |
+
|
| 240 |
+
private theorem k9t4_cover30 : ∀ P ∈ pathPatterns 0 1 [1, 1, 2], HasCheckedCertificate 9 4 ([[1, 1, 2]] ++ P) := by
|
| 241 |
+
apply pathPatterns_forall_zero
|
| 242 |
+
exact ⟨_, Certificates.k9t4p17, Certificates.k9t4p17_check⟩
|
| 243 |
+
|
| 244 |
+
private theorem k9t4_cover31 : ∀ P ∈ pathPatterns 0 0 [1, 1, 3], HasCheckedCertificate 9 4 ([[1, 1, 3]] ++ P) := by
|
| 245 |
+
apply pathPatterns_forall_zero
|
| 246 |
+
exact ⟨_, Certificates.k9t4p18, Certificates.k9t4p18_check⟩
|
| 247 |
+
|
| 248 |
+
private theorem k9t4_cover32 : ∀ P ∈ pathPatterns 1 2 [1, 2], HasCheckedCertificate 9 4 ([[1, 2]] ++ P) := by
|
| 249 |
+
apply pathPatterns_forall_step
|
| 250 |
+
exact by
|
| 251 |
+
intro h
|
| 252 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h)
|
| 253 |
+
|
| 254 |
+
private theorem k9t4_cover33 : ∀ P ∈ pathPatterns 0 1 [1, 2, 1], HasCheckedCertificate 9 4 ([[1, 2, 1]] ++ P) := by
|
| 255 |
+
apply pathPatterns_forall_zero
|
| 256 |
+
exact ⟨_, Certificates.k9t4p19, Certificates.k9t4p19_check⟩
|
| 257 |
+
|
| 258 |
+
private theorem k9t4_cover34 : ∀ P ∈ pathPatterns 0 0 [1, 2, 2], HasCheckedCertificate 9 4 ([[1, 2, 2]] ++ P) := by
|
| 259 |
+
apply pathPatterns_forall_zero
|
| 260 |
+
exact ⟨_, Certificates.k9t4p20, Certificates.k9t4p20_check⟩
|
| 261 |
+
|
| 262 |
+
private theorem k9t4_cover35 : ∀ P ∈ pathPatterns 1 1 [1, 3], HasCheckedCertificate 9 4 ([[1, 3]] ++ P) := by
|
| 263 |
+
apply pathPatterns_forall_step
|
| 264 |
+
exact by
|
| 265 |
+
intro h
|
| 266 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h)
|
| 267 |
+
|
| 268 |
+
private theorem k9t4_cover36 : ∀ P ∈ pathPatterns 0 0 [1, 3, 1], HasCheckedCertificate 9 4 ([[1, 3, 1]] ++ P) := by
|
| 269 |
+
apply pathPatterns_forall_zero
|
| 270 |
+
exact ⟨_, Certificates.k9t4p21, Certificates.k9t4p21_check⟩
|
| 271 |
+
|
| 272 |
+
private theorem k9t4_cover37 : ∀ P ∈ pathPatterns 1 0 [1, 4], HasCheckedCertificate 9 4 ([[1, 4]] ++ P) := by
|
| 273 |
+
apply pathPatterns_forall_step
|
| 274 |
+
exact by
|
| 275 |
+
intro h
|
| 276 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 4] [] ∧ LexLE [] [])) h)
|
| 277 |
+
|
| 278 |
+
private theorem k9t4_cover39 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 9 4 ([[2], [2]] ++ P) := by
|
| 279 |
+
apply pathPatterns_forall_zero
|
| 280 |
+
exact ⟨_, Certificates.k9t4p22, Certificates.k9t4p22_check⟩
|
| 281 |
+
|
| 282 |
+
private theorem k9t4_cover40 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 9 4 ([[2], [3]] ++ P) := by
|
| 283 |
+
apply pathPatterns_forall_zero
|
| 284 |
+
exact ⟨_, Certificates.k9t4p23, Certificates.k9t4p23_check⟩
|
| 285 |
+
|
| 286 |
+
private theorem k9t4_cover38 : ∀ P ∈ pathPatterns 2 3 [2], HasCheckedCertificate 9 4 ([[2]] ++ P) := by
|
| 287 |
+
apply pathPatterns_forall_step
|
| 288 |
+
exact by
|
| 289 |
+
constructor
|
| 290 |
+
· exact by
|
| 291 |
+
intro h
|
| 292 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 293 |
+
· intro q
|
| 294 |
+
fin_cases q
|
| 295 |
+
· exact by
|
| 296 |
+
intro h
|
| 297 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h)
|
| 298 |
+
· exact by
|
| 299 |
+
intro _
|
| 300 |
+
exact k9t4_cover39
|
| 301 |
+
· exact by
|
| 302 |
+
intro _
|
| 303 |
+
exact k9t4_cover40
|
| 304 |
+
|
| 305 |
+
private theorem k9t4_cover41 : ∀ P ∈ pathPatterns 0 0 [2, 1, 2], HasCheckedCertificate 9 4 ([[2, 1, 2]] ++ P) := by
|
| 306 |
+
apply pathPatterns_forall_zero
|
| 307 |
+
exact ⟨_, Certificates.k9t4p24, Certificates.k9t4p24_check⟩
|
| 308 |
+
|
| 309 |
+
private theorem k9t4_cover42 : ∀ P ∈ pathPatterns 1 1 [2, 2], HasCheckedCertificate 9 4 ([[2, 2]] ++ P) := by
|
| 310 |
+
apply pathPatterns_forall_step
|
| 311 |
+
exact by
|
| 312 |
+
intro h
|
| 313 |
+
exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h)
|
| 314 |
+
|
| 315 |
+
private theorem k9t4_cover43 : ∀ P ∈ pathPatterns 1 0 [2, 3], HasCheckedCertificate 9 4 ([[2, 3]] ++ P) := by
|
| 316 |
+
apply pathPatterns_forall_step
|
| 317 |
+
exact by
|
| 318 |
+
intro h
|
| 319 |
+
exact False.elim ((by decide : ¬ (LexLE [2, 3] [] ∧ LexLE [] [])) h)
|
| 320 |
+
|
| 321 |
+
private theorem k9t4_cover44 : ∀ P ∈ pathPatterns 2 2 [3], HasCheckedCertificate 9 4 ([[3]] ++ P) := by
|
| 322 |
+
apply pathPatterns_forall_step
|
| 323 |
+
exact by
|
| 324 |
+
constructor
|
| 325 |
+
· exact by
|
| 326 |
+
intro h
|
| 327 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 328 |
+
· intro q
|
| 329 |
+
fin_cases q
|
| 330 |
+
· exact by
|
| 331 |
+
intro h
|
| 332 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h)
|
| 333 |
+
· exact by
|
| 334 |
+
intro h
|
| 335 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [2] ∧ LexLE [2] [2])) h)
|
| 336 |
+
|
| 337 |
+
private theorem k9t4_cover45 : ∀ P ∈ pathPatterns 2 1 [4], HasCheckedCertificate 9 4 ([[4]] ++ P) := by
|
| 338 |
+
apply pathPatterns_forall_step
|
| 339 |
+
exact by
|
| 340 |
+
constructor
|
| 341 |
+
· exact by
|
| 342 |
+
intro h
|
| 343 |
+
exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h)
|
| 344 |
+
· intro q
|
| 345 |
+
fin_cases q
|
| 346 |
+
· exact by
|
| 347 |
+
intro h
|
| 348 |
+
exact False.elim ((by decide : ¬ (LexLE [4] [1] ∧ LexLE [1] [1])) h)
|
| 349 |
+
|
| 350 |
+
private theorem k9t4_cover46 : ∀ P ∈ pathPatterns 2 0 [5], HasCheckedCertificate 9 4 ([[5]] ++ P) := by
|
| 351 |
+
apply pathPatterns_forall_step
|
| 352 |
+
exact by
|
| 353 |
+
constructor
|
| 354 |
+
· exact by
|
| 355 |
+
intro h
|
| 356 |
+
exact False.elim ((by decide : ¬ (LexLE [5] [] ∧ LexLE [] [])) h)
|
| 357 |
+
· intro q
|
| 358 |
+
exact Fin.elim0 q
|
| 359 |
+
|
| 360 |
+
private theorem k9t4_seq2 : amountSequenceForall 3 5 (fun tail =>
|
| 361 |
+
(LexLE [] ([] ++ tail) ∧ LexLE ([] ++ tail) ([] ++ tail).reverse) →
|
| 362 |
+
∀ P ∈ pathPatterns (3 - ([] ++ tail).length) (5 - ([] ++ tail).sum) ([] ++ tail),
|
| 363 |
+
HasCheckedCertificate 9 4 ([] ++ (([] ++ tail) :: P))) :=
|
| 364 |
+
by
|
| 365 |
+
constructor
|
| 366 |
+
· exact by
|
| 367 |
+
intro _
|
| 368 |
+
exact k9t4_cover3
|
| 369 |
+
· intro q
|
| 370 |
+
fin_cases q
|
| 371 |
+
· exact by
|
| 372 |
+
constructor
|
| 373 |
+
· exact by
|
| 374 |
+
intro _
|
| 375 |
+
exact k9t4_cover23
|
| 376 |
+
· intro q
|
| 377 |
+
fin_cases q
|
| 378 |
+
· exact by
|
| 379 |
+
constructor
|
| 380 |
+
· exact by
|
| 381 |
+
intro _
|
| 382 |
+
exact k9t4_cover28
|
| 383 |
+
· intro q
|
| 384 |
+
fin_cases q
|
| 385 |
+
· exact by
|
| 386 |
+
intro _
|
| 387 |
+
exact k9t4_cover29
|
| 388 |
+
· exact by
|
| 389 |
+
intro _
|
| 390 |
+
exact k9t4_cover30
|
| 391 |
+
· exact by
|
| 392 |
+
intro _
|
| 393 |
+
exact k9t4_cover31
|
| 394 |
+
· exact by
|
| 395 |
+
constructor
|
| 396 |
+
· exact by
|
| 397 |
+
intro _
|
| 398 |
+
exact k9t4_cover32
|
| 399 |
+
· intro q
|
| 400 |
+
fin_cases q
|
| 401 |
+
· exact by
|
| 402 |
+
intro _
|
| 403 |
+
exact k9t4_cover33
|
| 404 |
+
· exact by
|
| 405 |
+
intro _
|
| 406 |
+
exact k9t4_cover34
|
| 407 |
+
· exact by
|
| 408 |
+
constructor
|
| 409 |
+
· exact by
|
| 410 |
+
intro _
|
| 411 |
+
exact k9t4_cover35
|
| 412 |
+
· intro q
|
| 413 |
+
fin_cases q
|
| 414 |
+
· exact by
|
| 415 |
+
intro _
|
| 416 |
+
exact k9t4_cover36
|
| 417 |
+
· exact by
|
| 418 |
+
constructor
|
| 419 |
+
· exact by
|
| 420 |
+
intro _
|
| 421 |
+
exact k9t4_cover37
|
| 422 |
+
· intro q
|
| 423 |
+
exact Fin.elim0 q
|
| 424 |
+
· exact by
|
| 425 |
+
constructor
|
| 426 |
+
· exact by
|
| 427 |
+
intro _
|
| 428 |
+
exact k9t4_cover38
|
| 429 |
+
· intro q
|
| 430 |
+
fin_cases q
|
| 431 |
+
· exact by
|
| 432 |
+
constructor
|
| 433 |
+
· exact by
|
| 434 |
+
intro h
|
| 435 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 436 |
+
· intro q
|
| 437 |
+
fin_cases q
|
| 438 |
+
· exact by
|
| 439 |
+
intro h
|
| 440 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h)
|
| 441 |
+
· exact by
|
| 442 |
+
intro _
|
| 443 |
+
exact k9t4_cover41
|
| 444 |
+
· exact by
|
| 445 |
+
constructor
|
| 446 |
+
· exact by
|
| 447 |
+
intro _
|
| 448 |
+
exact k9t4_cover42
|
| 449 |
+
· intro q
|
| 450 |
+
fin_cases q
|
| 451 |
+
· exact by
|
| 452 |
+
intro h
|
| 453 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 2, 1] ∧ LexLE [2, 2, 1] [1, 2, 2])) h)
|
| 454 |
+
· exact by
|
| 455 |
+
constructor
|
| 456 |
+
· exact by
|
| 457 |
+
intro _
|
| 458 |
+
exact k9t4_cover43
|
| 459 |
+
· intro q
|
| 460 |
+
exact Fin.elim0 q
|
| 461 |
+
· exact by
|
| 462 |
+
constructor
|
| 463 |
+
· exact by
|
| 464 |
+
intro _
|
| 465 |
+
exact k9t4_cover44
|
| 466 |
+
· intro q
|
| 467 |
+
fin_cases q
|
| 468 |
+
· exact by
|
| 469 |
+
constructor
|
| 470 |
+
· exact by
|
| 471 |
+
intro h
|
| 472 |
+
exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h)
|
| 473 |
+
· intro q
|
| 474 |
+
fin_cases q
|
| 475 |
+
· exact by
|
| 476 |
+
intro h
|
| 477 |
+
exact False.elim ((by decide : ¬ (LexLE [] [3, 1, 1] ∧ LexLE [3, 1, 1] [1, 1, 3])) h)
|
| 478 |
+
· exact by
|
| 479 |
+
constructor
|
| 480 |
+
· exact by
|
| 481 |
+
intro h
|
| 482 |
+
exact False.elim ((by decide : ¬ (LexLE [] [3, 2] ∧ LexLE [3, 2] [2, 3])) h)
|
| 483 |
+
· intro q
|
| 484 |
+
exact Fin.elim0 q
|
| 485 |
+
· exact by
|
| 486 |
+
constructor
|
| 487 |
+
· exact by
|
| 488 |
+
intro _
|
| 489 |
+
exact k9t4_cover45
|
| 490 |
+
· intro q
|
| 491 |
+
fin_cases q
|
| 492 |
+
· exact by
|
| 493 |
+
constructor
|
| 494 |
+
· exact by
|
| 495 |
+
intro h
|
| 496 |
+
exact False.elim ((by decide : ¬ (LexLE [] [4, 1] ∧ LexLE [4, 1] [1, 4])) h)
|
| 497 |
+
· intro q
|
| 498 |
+
exact Fin.elim0 q
|
| 499 |
+
· exact by
|
| 500 |
+
constructor
|
| 501 |
+
· exact by
|
| 502 |
+
intro _
|
| 503 |
+
exact k9t4_cover46
|
| 504 |
+
· intro q
|
| 505 |
+
exact Fin.elim0 q
|
| 506 |
+
|
| 507 |
+
private theorem k9t4_cover1 : ∀ P ∈ pathPatterns 4 5 [], HasCheckedCertificate 9 4 ([] ++ P) := by
|
| 508 |
+
apply pathPatterns_forall_step
|
| 509 |
+
exact k9t4_seq2
|
| 510 |
+
|
| 511 |
+
|
| 512 |
+
theorem coverage_k9_t4 :
|
| 513 |
+
∀ P ∈ pathPatterns 4 5, HasCheckedCertificate 9 4 P :=
|
| 514 |
+
k9t4_cover1
|
| 515 |
+
|
| 516 |
+
private theorem k9t5_cover6 : ∀ P ∈ pathPatterns 0 4 [], HasCheckedCertificate 9 5 ([[], [], [], [], []] ++ P) := by
|
| 517 |
+
apply pathPatterns_forall_zero
|
| 518 |
+
exact ⟨_, Certificates.k9t5p0, Certificates.k9t5p0_check⟩
|
| 519 |
+
|
| 520 |
+
private theorem k9t5_cover5 : ∀ P ∈ pathPatterns 1 4 [], HasCheckedCertificate 9 5 ([[], [], [], []] ++ P) := by
|
| 521 |
+
apply pathPatterns_forall_step
|
| 522 |
+
exact by
|
| 523 |
+
intro _
|
| 524 |
+
exact k9t5_cover6
|
| 525 |
+
|
| 526 |
+
private theorem k9t5_cover7 : ∀ P ∈ pathPatterns 0 3 [1], HasCheckedCertificate 9 5 ([[], [], [], [1]] ++ P) := by
|
| 527 |
+
apply pathPatterns_forall_zero
|
| 528 |
+
exact ⟨_, Certificates.k9t5p1, Certificates.k9t5p1_check⟩
|
| 529 |
+
|
| 530 |
+
private theorem k9t5_cover8 : ∀ P ∈ pathPatterns 0 2 [2], HasCheckedCertificate 9 5 ([[], [], [], [2]] ++ P) := by
|
| 531 |
+
apply pathPatterns_forall_zero
|
| 532 |
+
exact ⟨_, Certificates.k9t5p2, Certificates.k9t5p2_check⟩
|
| 533 |
+
|
| 534 |
+
private theorem k9t5_cover9 : ∀ P ∈ pathPatterns 0 1 [3], HasCheckedCertificate 9 5 ([[], [], [], [3]] ++ P) := by
|
| 535 |
+
apply pathPatterns_forall_zero
|
| 536 |
+
exact ⟨_, Certificates.k9t5p3, Certificates.k9t5p3_check⟩
|
| 537 |
+
|
| 538 |
+
private theorem k9t5_cover10 : ∀ P ∈ pathPatterns 0 0 [4], HasCheckedCertificate 9 5 ([[], [], [], [4]] ++ P) := by
|
| 539 |
+
apply pathPatterns_forall_zero
|
| 540 |
+
exact ⟨_, Certificates.k9t5p4, Certificates.k9t5p4_check⟩
|
| 541 |
+
|
| 542 |
+
private theorem k9t5_cover4 : ∀ P ∈ pathPatterns 2 4 [], HasCheckedCertificate 9 5 ([[], [], []] ++ P) := by
|
| 543 |
+
apply pathPatterns_forall_step
|
| 544 |
+
exact by
|
| 545 |
+
constructor
|
| 546 |
+
· exact by
|
| 547 |
+
intro _
|
| 548 |
+
exact k9t5_cover5
|
| 549 |
+
· intro q
|
| 550 |
+
fin_cases q
|
| 551 |
+
· exact by
|
| 552 |
+
intro _
|
| 553 |
+
exact k9t5_cover7
|
| 554 |
+
· exact by
|
| 555 |
+
intro _
|
| 556 |
+
exact k9t5_cover8
|
| 557 |
+
· exact by
|
| 558 |
+
intro _
|
| 559 |
+
exact k9t5_cover9
|
| 560 |
+
· exact by
|
| 561 |
+
intro _
|
| 562 |
+
exact k9t5_cover10
|
| 563 |
+
|
| 564 |
+
private theorem k9t5_cover11 : ∀ P ∈ pathPatterns 1 3 [1], HasCheckedCertificate 9 5 ([[], [], [1]] ++ P) := by
|
| 565 |
+
apply pathPatterns_forall_step
|
| 566 |
+
exact by
|
| 567 |
+
intro h
|
| 568 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 569 |
+
|
| 570 |
+
private theorem k9t5_cover12 : ∀ P ∈ pathPatterns 0 2 [1, 1], HasCheckedCertificate 9 5 ([[], [], [1, 1]] ++ P) := by
|
| 571 |
+
apply pathPatterns_forall_zero
|
| 572 |
+
exact ⟨_, Certificates.k9t5p5, Certificates.k9t5p5_check⟩
|
| 573 |
+
|
| 574 |
+
private theorem k9t5_cover13 : ∀ P ∈ pathPatterns 0 1 [1, 2], HasCheckedCertificate 9 5 ([[], [], [1, 2]] ++ P) := by
|
| 575 |
+
apply pathPatterns_forall_zero
|
| 576 |
+
exact ⟨_, Certificates.k9t5p6, Certificates.k9t5p6_check⟩
|
| 577 |
+
|
| 578 |
+
private theorem k9t5_cover14 : ∀ P ∈ pathPatterns 0 0 [1, 3], HasCheckedCertificate 9 5 ([[], [], [1, 3]] ++ P) := by
|
| 579 |
+
apply pathPatterns_forall_zero
|
| 580 |
+
exact ⟨_, Certificates.k9t5p7, Certificates.k9t5p7_check⟩
|
| 581 |
+
|
| 582 |
+
private theorem k9t5_cover15 : ∀ P ∈ pathPatterns 1 2 [2], HasCheckedCertificate 9 5 ([[], [], [2]] ++ P) := by
|
| 583 |
+
apply pathPatterns_forall_step
|
| 584 |
+
exact by
|
| 585 |
+
intro h
|
| 586 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 587 |
+
|
| 588 |
+
private theorem k9t5_cover16 : ∀ P ∈ pathPatterns 0 0 [2, 2], HasCheckedCertificate 9 5 ([[], [], [2, 2]] ++ P) := by
|
| 589 |
+
apply pathPatterns_forall_zero
|
| 590 |
+
exact ⟨_, Certificates.k9t5p8, Certificates.k9t5p8_check⟩
|
| 591 |
+
|
| 592 |
+
private theorem k9t5_cover17 : ∀ P ∈ pathPatterns 1 1 [3], HasCheckedCertificate 9 5 ([[], [], [3]] ++ P) := by
|
| 593 |
+
apply pathPatterns_forall_step
|
| 594 |
+
exact by
|
| 595 |
+
intro h
|
| 596 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 597 |
+
|
| 598 |
+
private theorem k9t5_cover18 : ∀ P ∈ pathPatterns 1 0 [4], HasCheckedCertificate 9 5 ([[], [], [4]] ++ P) := by
|
| 599 |
+
apply pathPatterns_forall_step
|
| 600 |
+
exact by
|
| 601 |
+
intro h
|
| 602 |
+
exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h)
|
| 603 |
+
|
| 604 |
+
private theorem k9t5_cover3 : ∀ P ∈ pathPatterns 3 4 [], HasCheckedCertificate 9 5 ([[], []] ++ P) := by
|
| 605 |
+
apply pathPatterns_forall_step
|
| 606 |
+
exact by
|
| 607 |
+
constructor
|
| 608 |
+
· exact by
|
| 609 |
+
intro _
|
| 610 |
+
exact k9t5_cover4
|
| 611 |
+
· intro q
|
| 612 |
+
fin_cases q
|
| 613 |
+
· exact by
|
| 614 |
+
constructor
|
| 615 |
+
· exact by
|
| 616 |
+
intro _
|
| 617 |
+
exact k9t5_cover11
|
| 618 |
+
· intro q
|
| 619 |
+
fin_cases q
|
| 620 |
+
· exact by
|
| 621 |
+
intro _
|
| 622 |
+
exact k9t5_cover12
|
| 623 |
+
· exact by
|
| 624 |
+
intro _
|
| 625 |
+
exact k9t5_cover13
|
| 626 |
+
· exact by
|
| 627 |
+
intro _
|
| 628 |
+
exact k9t5_cover14
|
| 629 |
+
· exact by
|
| 630 |
+
constructor
|
| 631 |
+
· exact by
|
| 632 |
+
intro _
|
| 633 |
+
exact k9t5_cover15
|
| 634 |
+
· intro q
|
| 635 |
+
fin_cases q
|
| 636 |
+
· exact by
|
| 637 |
+
intro h
|
| 638 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 639 |
+
· exact by
|
| 640 |
+
intro _
|
| 641 |
+
exact k9t5_cover16
|
| 642 |
+
· exact by
|
| 643 |
+
constructor
|
| 644 |
+
· exact by
|
| 645 |
+
intro _
|
| 646 |
+
exact k9t5_cover17
|
| 647 |
+
· intro q
|
| 648 |
+
fin_cases q
|
| 649 |
+
· exact by
|
| 650 |
+
intro h
|
| 651 |
+
exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h)
|
| 652 |
+
· exact by
|
| 653 |
+
constructor
|
| 654 |
+
· exact by
|
| 655 |
+
intro _
|
| 656 |
+
exact k9t5_cover18
|
| 657 |
+
· intro q
|
| 658 |
+
exact Fin.elim0 q
|
| 659 |
+
|
| 660 |
+
private theorem k9t5_cover20 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 9 5 ([[], [1], [1]] ++ P) := by
|
| 661 |
+
apply pathPatterns_forall_zero
|
| 662 |
+
exact ⟨_, Certificates.k9t5p9, Certificates.k9t5p9_check⟩
|
| 663 |
+
|
| 664 |
+
private theorem k9t5_cover21 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 9 5 ([[], [1], [2]] ++ P) := by
|
| 665 |
+
apply pathPatterns_forall_zero
|
| 666 |
+
exact ⟨_, Certificates.k9t5p10, Certificates.k9t5p10_check⟩
|
| 667 |
+
|
| 668 |
+
private theorem k9t5_cover22 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 9 5 ([[], [1], [3]] ++ P) := by
|
| 669 |
+
apply pathPatterns_forall_zero
|
| 670 |
+
exact ⟨_, Certificates.k9t5p11, Certificates.k9t5p11_check⟩
|
| 671 |
+
|
| 672 |
+
private theorem k9t5_cover19 : ∀ P ∈ pathPatterns 2 3 [1], HasCheckedCertificate 9 5 ([[], [1]] ++ P) := by
|
| 673 |
+
apply pathPatterns_forall_step
|
| 674 |
+
exact by
|
| 675 |
+
constructor
|
| 676 |
+
· exact by
|
| 677 |
+
intro h
|
| 678 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 679 |
+
· intro q
|
| 680 |
+
fin_cases q
|
| 681 |
+
· exact by
|
| 682 |
+
intro _
|
| 683 |
+
exact k9t5_cover20
|
| 684 |
+
· exact by
|
| 685 |
+
intro _
|
| 686 |
+
exact k9t5_cover21
|
| 687 |
+
· exact by
|
| 688 |
+
intro _
|
| 689 |
+
exact k9t5_cover22
|
| 690 |
+
|
| 691 |
+
private theorem k9t5_cover23 : ∀ P ∈ pathPatterns 1 2 [1, 1], HasCheckedCertificate 9 5 ([[], [1, 1]] ++ P) := by
|
| 692 |
+
apply pathPatterns_forall_step
|
| 693 |
+
exact by
|
| 694 |
+
intro h
|
| 695 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 696 |
+
|
| 697 |
+
private theorem k9t5_cover24 : ∀ P ∈ pathPatterns 0 1 [1, 1, 1], HasCheckedCertificate 9 5 ([[], [1, 1, 1]] ++ P) := by
|
| 698 |
+
apply pathPatterns_forall_zero
|
| 699 |
+
exact ⟨_, Certificates.k9t5p12, Certificates.k9t5p12_check⟩
|
| 700 |
+
|
| 701 |
+
private theorem k9t5_cover25 : ∀ P ∈ pathPatterns 0 0 [1, 1, 2], HasCheckedCertificate 9 5 ([[], [1, 1, 2]] ++ P) := by
|
| 702 |
+
apply pathPatterns_forall_zero
|
| 703 |
+
exact ⟨_, Certificates.k9t5p13, Certificates.k9t5p13_check⟩
|
| 704 |
+
|
| 705 |
+
private theorem k9t5_cover26 : ∀ P ∈ pathPatterns 1 1 [1, 2], HasCheckedCertificate 9 5 ([[], [1, 2]] ++ P) := by
|
| 706 |
+
apply pathPatterns_forall_step
|
| 707 |
+
exact by
|
| 708 |
+
intro h
|
| 709 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h)
|
| 710 |
+
|
| 711 |
+
private theorem k9t5_cover27 : ∀ P ∈ pathPatterns 0 0 [1, 2, 1], HasCheckedCertificate 9 5 ([[], [1, 2, 1]] ++ P) := by
|
| 712 |
+
apply pathPatterns_forall_zero
|
| 713 |
+
exact ⟨_, Certificates.k9t5p14, Certificates.k9t5p14_check⟩
|
| 714 |
+
|
| 715 |
+
private theorem k9t5_cover28 : ∀ P ∈ pathPatterns 1 0 [1, 3], HasCheckedCertificate 9 5 ([[], [1, 3]] ++ P) := by
|
| 716 |
+
apply pathPatterns_forall_step
|
| 717 |
+
exact by
|
| 718 |
+
intro h
|
| 719 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h)
|
| 720 |
+
|
| 721 |
+
private theorem k9t5_cover30 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 9 5 ([[], [2], [2]] ++ P) := by
|
| 722 |
+
apply pathPatterns_forall_zero
|
| 723 |
+
exact ⟨_, Certificates.k9t5p15, Certificates.k9t5p15_check⟩
|
| 724 |
+
|
| 725 |
+
private theorem k9t5_cover29 : ∀ P ∈ pathPatterns 2 2 [2], HasCheckedCertificate 9 5 ([[], [2]] ++ P) := by
|
| 726 |
+
apply pathPatterns_forall_step
|
| 727 |
+
exact by
|
| 728 |
+
constructor
|
| 729 |
+
· exact by
|
| 730 |
+
intro h
|
| 731 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 732 |
+
· intro q
|
| 733 |
+
fin_cases q
|
| 734 |
+
· exact by
|
| 735 |
+
intro h
|
| 736 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h)
|
| 737 |
+
· exact by
|
| 738 |
+
intro _
|
| 739 |
+
exact k9t5_cover30
|
| 740 |
+
|
| 741 |
+
private theorem k9t5_cover31 : ∀ P ∈ pathPatterns 1 0 [2, 2], HasCheckedCertificate 9 5 ([[], [2, 2]] ++ P) := by
|
| 742 |
+
apply pathPatterns_forall_step
|
| 743 |
+
exact by
|
| 744 |
+
intro h
|
| 745 |
+
exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h)
|
| 746 |
+
|
| 747 |
+
private theorem k9t5_cover32 : ∀ P ∈ pathPatterns 2 1 [3], HasCheckedCertificate 9 5 ([[], [3]] ++ P) := by
|
| 748 |
+
apply pathPatterns_forall_step
|
| 749 |
+
exact by
|
| 750 |
+
constructor
|
| 751 |
+
· exact by
|
| 752 |
+
intro h
|
| 753 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 754 |
+
· intro q
|
| 755 |
+
fin_cases q
|
| 756 |
+
· exact by
|
| 757 |
+
intro h
|
| 758 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h)
|
| 759 |
+
|
| 760 |
+
private theorem k9t5_cover33 : ∀ P ∈ pathPatterns 2 0 [4], HasCheckedCertificate 9 5 ([[], [4]] ++ P) := by
|
| 761 |
+
apply pathPatterns_forall_step
|
| 762 |
+
exact by
|
| 763 |
+
constructor
|
| 764 |
+
· exact by
|
| 765 |
+
intro h
|
| 766 |
+
exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h)
|
| 767 |
+
· intro q
|
| 768 |
+
exact Fin.elim0 q
|
| 769 |
+
|
| 770 |
+
private theorem k9t5_cover2 : ∀ P ∈ pathPatterns 4 4 [], HasCheckedCertificate 9 5 ([[]] ++ P) := by
|
| 771 |
+
apply pathPatterns_forall_step
|
| 772 |
+
exact by
|
| 773 |
+
constructor
|
| 774 |
+
· exact by
|
| 775 |
+
intro _
|
| 776 |
+
exact k9t5_cover3
|
| 777 |
+
· intro q
|
| 778 |
+
fin_cases q
|
| 779 |
+
· exact by
|
| 780 |
+
constructor
|
| 781 |
+
· exact by
|
| 782 |
+
intro _
|
| 783 |
+
exact k9t5_cover19
|
| 784 |
+
· intro q
|
| 785 |
+
fin_cases q
|
| 786 |
+
· exact by
|
| 787 |
+
constructor
|
| 788 |
+
· exact by
|
| 789 |
+
intro _
|
| 790 |
+
exact k9t5_cover23
|
| 791 |
+
· intro q
|
| 792 |
+
fin_cases q
|
| 793 |
+
· exact by
|
| 794 |
+
intro _
|
| 795 |
+
exact k9t5_cover24
|
| 796 |
+
· exact by
|
| 797 |
+
intro _
|
| 798 |
+
exact k9t5_cover25
|
| 799 |
+
· exact by
|
| 800 |
+
constructor
|
| 801 |
+
· exact by
|
| 802 |
+
intro _
|
| 803 |
+
exact k9t5_cover26
|
| 804 |
+
· intro q
|
| 805 |
+
fin_cases q
|
| 806 |
+
· exact by
|
| 807 |
+
intro _
|
| 808 |
+
exact k9t5_cover27
|
| 809 |
+
· exact by
|
| 810 |
+
constructor
|
| 811 |
+
· exact by
|
| 812 |
+
intro _
|
| 813 |
+
exact k9t5_cover28
|
| 814 |
+
· intro q
|
| 815 |
+
exact Fin.elim0 q
|
| 816 |
+
· exact by
|
| 817 |
+
constructor
|
| 818 |
+
· exact by
|
| 819 |
+
intro _
|
| 820 |
+
exact k9t5_cover29
|
| 821 |
+
· intro q
|
| 822 |
+
fin_cases q
|
| 823 |
+
· exact by
|
| 824 |
+
constructor
|
| 825 |
+
· exact by
|
| 826 |
+
intro h
|
| 827 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 828 |
+
· intro q
|
| 829 |
+
fin_cases q
|
| 830 |
+
· exact by
|
| 831 |
+
intro h
|
| 832 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h)
|
| 833 |
+
· exact by
|
| 834 |
+
constructor
|
| 835 |
+
· exact by
|
| 836 |
+
intro _
|
| 837 |
+
exact k9t5_cover31
|
| 838 |
+
· intro q
|
| 839 |
+
exact Fin.elim0 q
|
| 840 |
+
· exact by
|
| 841 |
+
constructor
|
| 842 |
+
· exact by
|
| 843 |
+
intro _
|
| 844 |
+
exact k9t5_cover32
|
| 845 |
+
· intro q
|
| 846 |
+
fin_cases q
|
| 847 |
+
· exact by
|
| 848 |
+
constructor
|
| 849 |
+
· exact by
|
| 850 |
+
intro h
|
| 851 |
+
exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h)
|
| 852 |
+
· intro q
|
| 853 |
+
exact Fin.elim0 q
|
| 854 |
+
· exact by
|
| 855 |
+
constructor
|
| 856 |
+
· exact by
|
| 857 |
+
intro _
|
| 858 |
+
exact k9t5_cover33
|
| 859 |
+
· intro q
|
| 860 |
+
exact Fin.elim0 q
|
| 861 |
+
|
| 862 |
+
private theorem k9t5_cover35 : ∀ P ∈ pathPatterns 1 2 [1], HasCheckedCertificate 9 5 ([[1], [1]] ++ P) := by
|
| 863 |
+
apply pathPatterns_forall_step
|
| 864 |
+
exact by
|
| 865 |
+
intro h
|
| 866 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 867 |
+
|
| 868 |
+
private theorem k9t5_cover36 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 9 5 ([[1], [1, 1]] ++ P) := by
|
| 869 |
+
apply pathPatterns_forall_zero
|
| 870 |
+
exact ⟨_, Certificates.k9t5p16, Certificates.k9t5p16_check⟩
|
| 871 |
+
|
| 872 |
+
private theorem k9t5_cover37 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 9 5 ([[1], [1, 2]] ++ P) := by
|
| 873 |
+
apply pathPatterns_forall_zero
|
| 874 |
+
exact ⟨_, Certificates.k9t5p17, Certificates.k9t5p17_check⟩
|
| 875 |
+
|
| 876 |
+
private theorem k9t5_cover38 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 9 5 ([[1], [2]] ++ P) := by
|
| 877 |
+
apply pathPatterns_forall_step
|
| 878 |
+
exact by
|
| 879 |
+
intro h
|
| 880 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 881 |
+
|
| 882 |
+
private theorem k9t5_cover39 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 9 5 ([[1], [3]] ++ P) := by
|
| 883 |
+
apply pathPatterns_forall_step
|
| 884 |
+
exact by
|
| 885 |
+
intro h
|
| 886 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 887 |
+
|
| 888 |
+
private theorem k9t5_cover34 : ∀ P ∈ pathPatterns 3 3 [1], HasCheckedCertificate 9 5 ([[1]] ++ P) := by
|
| 889 |
+
apply pathPatterns_forall_step
|
| 890 |
+
exact by
|
| 891 |
+
constructor
|
| 892 |
+
· exact by
|
| 893 |
+
intro h
|
| 894 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 895 |
+
· intro q
|
| 896 |
+
fin_cases q
|
| 897 |
+
· exact by
|
| 898 |
+
constructor
|
| 899 |
+
· exact by
|
| 900 |
+
intro _
|
| 901 |
+
exact k9t5_cover35
|
| 902 |
+
· intro q
|
| 903 |
+
fin_cases q
|
| 904 |
+
· exact by
|
| 905 |
+
intro _
|
| 906 |
+
exact k9t5_cover36
|
| 907 |
+
· exact by
|
| 908 |
+
intro _
|
| 909 |
+
exact k9t5_cover37
|
| 910 |
+
· exact by
|
| 911 |
+
constructor
|
| 912 |
+
· exact by
|
| 913 |
+
intro _
|
| 914 |
+
exact k9t5_cover38
|
| 915 |
+
· intro q
|
| 916 |
+
fin_cases q
|
| 917 |
+
· exact by
|
| 918 |
+
intro h
|
| 919 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 920 |
+
· exact by
|
| 921 |
+
constructor
|
| 922 |
+
· exact by
|
| 923 |
+
intro _
|
| 924 |
+
exact k9t5_cover39
|
| 925 |
+
· intro q
|
| 926 |
+
exact Fin.elim0 q
|
| 927 |
+
|
| 928 |
+
private theorem k9t5_cover41 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 9 5 ([[1, 1], [2]] ++ P) := by
|
| 929 |
+
apply pathPatterns_forall_zero
|
| 930 |
+
exact ⟨_, Certificates.k9t5p18, Certificates.k9t5p18_check⟩
|
| 931 |
+
|
| 932 |
+
private theorem k9t5_cover40 : ∀ P ∈ pathPatterns 2 2 [1, 1], HasCheckedCertificate 9 5 ([[1, 1]] ++ P) := by
|
| 933 |
+
apply pathPatterns_forall_step
|
| 934 |
+
exact by
|
| 935 |
+
constructor
|
| 936 |
+
· exact by
|
| 937 |
+
intro h
|
| 938 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 939 |
+
· intro q
|
| 940 |
+
fin_cases q
|
| 941 |
+
· exact by
|
| 942 |
+
intro h
|
| 943 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h)
|
| 944 |
+
· exact by
|
| 945 |
+
intro _
|
| 946 |
+
exact k9t5_cover41
|
| 947 |
+
|
| 948 |
+
private theorem k9t5_cover42 : ∀ P ∈ pathPatterns 1 1 [1, 1, 1], HasCheckedCertificate 9 5 ([[1, 1, 1]] ++ P) := by
|
| 949 |
+
apply pathPatterns_forall_step
|
| 950 |
+
exact by
|
| 951 |
+
intro h
|
| 952 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h)
|
| 953 |
+
|
| 954 |
+
private theorem k9t5_cover43 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1, 1], HasCheckedCertificate 9 5 ([[1, 1, 1, 1]] ++ P) := by
|
| 955 |
+
apply pathPatterns_forall_zero
|
| 956 |
+
exact ⟨_, Certificates.k9t5p19, Certificates.k9t5p19_check⟩
|
| 957 |
+
|
| 958 |
+
private theorem k9t5_cover44 : ∀ P ∈ pathPatterns 1 0 [1, 1, 2], HasCheckedCertificate 9 5 ([[1, 1, 2]] ++ P) := by
|
| 959 |
+
apply pathPatterns_forall_step
|
| 960 |
+
exact by
|
| 961 |
+
intro h
|
| 962 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1, 2] [] ∧ LexLE [] [])) h)
|
| 963 |
+
|
| 964 |
+
private theorem k9t5_cover45 : ∀ P ∈ pathPatterns 2 1 [1, 2], HasCheckedCertificate 9 5 ([[1, 2]] ++ P) := by
|
| 965 |
+
apply pathPatterns_forall_step
|
| 966 |
+
exact by
|
| 967 |
+
constructor
|
| 968 |
+
· exact by
|
| 969 |
+
intro h
|
| 970 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h)
|
| 971 |
+
· intro q
|
| 972 |
+
fin_cases q
|
| 973 |
+
· exact by
|
| 974 |
+
intro h
|
| 975 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 2] [1] ∧ LexLE [1] [1])) h)
|
| 976 |
+
|
| 977 |
+
private theorem k9t5_cover46 : ∀ P ∈ pathPatterns 1 0 [1, 2, 1], HasCheckedCertificate 9 5 ([[1, 2, 1]] ++ P) := by
|
| 978 |
+
apply pathPatterns_forall_step
|
| 979 |
+
exact by
|
| 980 |
+
intro h
|
| 981 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 2, 1] [] ∧ LexLE [] [])) h)
|
| 982 |
+
|
| 983 |
+
private theorem k9t5_cover47 : ∀ P ∈ pathPatterns 2 0 [1, 3], HasCheckedCertificate 9 5 ([[1, 3]] ++ P) := by
|
| 984 |
+
apply pathPatterns_forall_step
|
| 985 |
+
exact by
|
| 986 |
+
constructor
|
| 987 |
+
· exact by
|
| 988 |
+
intro h
|
| 989 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 3] [] ∧ LexLE [] [])) h)
|
| 990 |
+
· intro q
|
| 991 |
+
exact Fin.elim0 q
|
| 992 |
+
|
| 993 |
+
private theorem k9t5_cover49 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 9 5 ([[2], [2]] ++ P) := by
|
| 994 |
+
apply pathPatterns_forall_step
|
| 995 |
+
exact by
|
| 996 |
+
intro h
|
| 997 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 998 |
+
|
| 999 |
+
private theorem k9t5_cover48 : ∀ P ∈ pathPatterns 3 2 [2], HasCheckedCertificate 9 5 ([[2]] ++ P) := by
|
| 1000 |
+
apply pathPatterns_forall_step
|
| 1001 |
+
exact by
|
| 1002 |
+
constructor
|
| 1003 |
+
· exact by
|
| 1004 |
+
intro h
|
| 1005 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 1006 |
+
· intro q
|
| 1007 |
+
fin_cases q
|
| 1008 |
+
· exact by
|
| 1009 |
+
constructor
|
| 1010 |
+
· exact by
|
| 1011 |
+
intro h
|
| 1012 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h)
|
| 1013 |
+
· intro q
|
| 1014 |
+
fin_cases q
|
| 1015 |
+
· exact by
|
| 1016 |
+
intro h
|
| 1017 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [1, 1] ∧ LexLE [1, 1] [1, 1])) h)
|
| 1018 |
+
· exact by
|
| 1019 |
+
constructor
|
| 1020 |
+
· exact by
|
| 1021 |
+
intro _
|
| 1022 |
+
exact k9t5_cover49
|
| 1023 |
+
· intro q
|
| 1024 |
+
exact Fin.elim0 q
|
| 1025 |
+
|
| 1026 |
+
private theorem k9t5_cover50 : ∀ P ∈ pathPatterns 2 0 [2, 2], HasCheckedCertificate 9 5 ([[2, 2]] ++ P) := by
|
| 1027 |
+
apply pathPatterns_forall_step
|
| 1028 |
+
exact by
|
| 1029 |
+
constructor
|
| 1030 |
+
· exact by
|
| 1031 |
+
intro h
|
| 1032 |
+
exact False.elim ((by decide : ¬ (LexLE [2, 2] [] ∧ LexLE [] [])) h)
|
| 1033 |
+
· intro q
|
| 1034 |
+
exact Fin.elim0 q
|
| 1035 |
+
|
| 1036 |
+
private theorem k9t5_cover51 : ∀ P ∈ pathPatterns 3 1 [3], HasCheckedCertificate 9 5 ([[3]] ++ P) := by
|
| 1037 |
+
apply pathPatterns_forall_step
|
| 1038 |
+
exact by
|
| 1039 |
+
constructor
|
| 1040 |
+
· exact by
|
| 1041 |
+
intro h
|
| 1042 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 1043 |
+
· intro q
|
| 1044 |
+
fin_cases q
|
| 1045 |
+
· exact by
|
| 1046 |
+
constructor
|
| 1047 |
+
· exact by
|
| 1048 |
+
intro h
|
| 1049 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [1] ∧ LexLE [1] [1])) h)
|
| 1050 |
+
· intro q
|
| 1051 |
+
exact Fin.elim0 q
|
| 1052 |
+
|
| 1053 |
+
private theorem k9t5_cover52 : ∀ P ∈ pathPatterns 3 0 [4], HasCheckedCertificate 9 5 ([[4]] ++ P) := by
|
| 1054 |
+
apply pathPatterns_forall_step
|
| 1055 |
+
exact by
|
| 1056 |
+
constructor
|
| 1057 |
+
· exact by
|
| 1058 |
+
intro h
|
| 1059 |
+
exact False.elim ((by decide : ¬ (LexLE [4] [] ∧ LexLE [] [])) h)
|
| 1060 |
+
· intro q
|
| 1061 |
+
exact Fin.elim0 q
|
| 1062 |
+
|
| 1063 |
+
private theorem k9t5_cover1 : ∀ P ∈ pathPatterns 5 4 [], HasCheckedCertificate 9 5 ([] ++ P) := by
|
| 1064 |
+
apply pathPatterns_forall_step
|
| 1065 |
+
exact by
|
| 1066 |
+
constructor
|
| 1067 |
+
· exact by
|
| 1068 |
+
intro _
|
| 1069 |
+
exact k9t5_cover2
|
| 1070 |
+
· intro q
|
| 1071 |
+
fin_cases q
|
| 1072 |
+
· exact by
|
| 1073 |
+
constructor
|
| 1074 |
+
· exact by
|
| 1075 |
+
intro _
|
| 1076 |
+
exact k9t5_cover34
|
| 1077 |
+
· intro q
|
| 1078 |
+
fin_cases q
|
| 1079 |
+
· exact by
|
| 1080 |
+
constructor
|
| 1081 |
+
· exact by
|
| 1082 |
+
intro _
|
| 1083 |
+
exact k9t5_cover40
|
| 1084 |
+
· intro q
|
| 1085 |
+
fin_cases q
|
| 1086 |
+
· exact by
|
| 1087 |
+
constructor
|
| 1088 |
+
· exact by
|
| 1089 |
+
intro _
|
| 1090 |
+
exact k9t5_cover42
|
| 1091 |
+
· intro q
|
| 1092 |
+
fin_cases q
|
| 1093 |
+
· exact by
|
| 1094 |
+
intro _
|
| 1095 |
+
exact k9t5_cover43
|
| 1096 |
+
· exact by
|
| 1097 |
+
constructor
|
| 1098 |
+
· exact by
|
| 1099 |
+
intro _
|
| 1100 |
+
exact k9t5_cover44
|
| 1101 |
+
· intro q
|
| 1102 |
+
exact Fin.elim0 q
|
| 1103 |
+
· exact by
|
| 1104 |
+
constructor
|
| 1105 |
+
· exact by
|
| 1106 |
+
intro _
|
| 1107 |
+
exact k9t5_cover45
|
| 1108 |
+
· intro q
|
| 1109 |
+
fin_cases q
|
| 1110 |
+
· exact by
|
| 1111 |
+
constructor
|
| 1112 |
+
· exact by
|
| 1113 |
+
intro _
|
| 1114 |
+
exact k9t5_cover46
|
| 1115 |
+
· intro q
|
| 1116 |
+
exact Fin.elim0 q
|
| 1117 |
+
· exact by
|
| 1118 |
+
constructor
|
| 1119 |
+
· exact by
|
| 1120 |
+
intro _
|
| 1121 |
+
exact k9t5_cover47
|
| 1122 |
+
· intro q
|
| 1123 |
+
exact Fin.elim0 q
|
| 1124 |
+
· exact by
|
| 1125 |
+
constructor
|
| 1126 |
+
· exact by
|
| 1127 |
+
intro _
|
| 1128 |
+
exact k9t5_cover48
|
| 1129 |
+
· intro q
|
| 1130 |
+
fin_cases q
|
| 1131 |
+
· exact by
|
| 1132 |
+
constructor
|
| 1133 |
+
· exact by
|
| 1134 |
+
intro h
|
| 1135 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 1136 |
+
· intro q
|
| 1137 |
+
fin_cases q
|
| 1138 |
+
· exact by
|
| 1139 |
+
constructor
|
| 1140 |
+
· exact by
|
| 1141 |
+
intro h
|
| 1142 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1, 1] ∧ LexLE [2, 1, 1] [1, 1, 2])) h)
|
| 1143 |
+
· intro q
|
| 1144 |
+
exact Fin.elim0 q
|
| 1145 |
+
· exact by
|
| 1146 |
+
constructor
|
| 1147 |
+
· exact by
|
| 1148 |
+
intro _
|
| 1149 |
+
exact k9t5_cover50
|
| 1150 |
+
· intro q
|
| 1151 |
+
exact Fin.elim0 q
|
| 1152 |
+
· exact by
|
| 1153 |
+
constructor
|
| 1154 |
+
· exact by
|
| 1155 |
+
intro _
|
| 1156 |
+
exact k9t5_cover51
|
| 1157 |
+
· intro q
|
| 1158 |
+
fin_cases q
|
| 1159 |
+
· exact by
|
| 1160 |
+
constructor
|
| 1161 |
+
· exact by
|
| 1162 |
+
intro h
|
| 1163 |
+
exact False.elim ((by decide : ¬ (LexLE [] [3, 1] ∧ LexLE [3, 1] [1, 3])) h)
|
| 1164 |
+
· intro q
|
| 1165 |
+
exact Fin.elim0 q
|
| 1166 |
+
· exact by
|
| 1167 |
+
constructor
|
| 1168 |
+
· exact by
|
| 1169 |
+
intro _
|
| 1170 |
+
exact k9t5_cover52
|
| 1171 |
+
· intro q
|
| 1172 |
+
exact Fin.elim0 q
|
| 1173 |
+
|
| 1174 |
+
theorem coverage_k9_t5 :
|
| 1175 |
+
∀ P ∈ pathPatterns 5 4, HasCheckedCertificate 9 5 P :=
|
| 1176 |
+
k9t5_cover1
|
| 1177 |
+
|
| 1178 |
+
private theorem k9t6_cover7 : ∀ P ∈ pathPatterns 0 3 [], HasCheckedCertificate 9 6 ([[], [], [], [], [], []] ++ P) := by
|
| 1179 |
+
apply pathPatterns_forall_zero
|
| 1180 |
+
exact ⟨_, Certificates.k9t6p0, Certificates.k9t6p0_check⟩
|
| 1181 |
+
|
| 1182 |
+
private theorem k9t6_cover6 : ∀ P ∈ pathPatterns 1 3 [], HasCheckedCertificate 9 6 ([[], [], [], [], []] ++ P) := by
|
| 1183 |
+
apply pathPatterns_forall_step
|
| 1184 |
+
exact by
|
| 1185 |
+
intro _
|
| 1186 |
+
exact k9t6_cover7
|
| 1187 |
+
|
| 1188 |
+
private theorem k9t6_cover8 : ∀ P ∈ pathPatterns 0 2 [1], HasCheckedCertificate 9 6 ([[], [], [], [], [1]] ++ P) := by
|
| 1189 |
+
apply pathPatterns_forall_zero
|
| 1190 |
+
exact ⟨_, Certificates.k9t6p1, Certificates.k9t6p1_check⟩
|
| 1191 |
+
|
| 1192 |
+
private theorem k9t6_cover9 : ∀ P ∈ pathPatterns 0 1 [2], HasCheckedCertificate 9 6 ([[], [], [], [], [2]] ++ P) := by
|
| 1193 |
+
apply pathPatterns_forall_zero
|
| 1194 |
+
exact ⟨_, Certificates.k9t6p2, Certificates.k9t6p2_check⟩
|
| 1195 |
+
|
| 1196 |
+
private theorem k9t6_cover10 : ∀ P ∈ pathPatterns 0 0 [3], HasCheckedCertificate 9 6 ([[], [], [], [], [3]] ++ P) := by
|
| 1197 |
+
apply pathPatterns_forall_zero
|
| 1198 |
+
exact ⟨_, Certificates.k9t6p3, Certificates.k9t6p3_check⟩
|
| 1199 |
+
|
| 1200 |
+
private theorem k9t6_cover5 : ∀ P ∈ pathPatterns 2 3 [], HasCheckedCertificate 9 6 ([[], [], [], []] ++ P) := by
|
| 1201 |
+
apply pathPatterns_forall_step
|
| 1202 |
+
exact by
|
| 1203 |
+
constructor
|
| 1204 |
+
· exact by
|
| 1205 |
+
intro _
|
| 1206 |
+
exact k9t6_cover6
|
| 1207 |
+
· intro q
|
| 1208 |
+
fin_cases q
|
| 1209 |
+
· exact by
|
| 1210 |
+
intro _
|
| 1211 |
+
exact k9t6_cover8
|
| 1212 |
+
· exact by
|
| 1213 |
+
intro _
|
| 1214 |
+
exact k9t6_cover9
|
| 1215 |
+
· exact by
|
| 1216 |
+
intro _
|
| 1217 |
+
exact k9t6_cover10
|
| 1218 |
+
|
| 1219 |
+
private theorem k9t6_cover11 : ∀ P ∈ pathPatterns 1 2 [1], HasCheckedCertificate 9 6 ([[], [], [], [1]] ++ P) := by
|
| 1220 |
+
apply pathPatterns_forall_step
|
| 1221 |
+
exact by
|
| 1222 |
+
intro h
|
| 1223 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 1224 |
+
|
| 1225 |
+
private theorem k9t6_cover12 : ∀ P ∈ pathPatterns 0 1 [1, 1], HasCheckedCertificate 9 6 ([[], [], [], [1, 1]] ++ P) := by
|
| 1226 |
+
apply pathPatterns_forall_zero
|
| 1227 |
+
exact ⟨_, Certificates.k9t6p4, Certificates.k9t6p4_check⟩
|
| 1228 |
+
|
| 1229 |
+
private theorem k9t6_cover13 : ∀ P ∈ pathPatterns 0 0 [1, 2], HasCheckedCertificate 9 6 ([[], [], [], [1, 2]] ++ P) := by
|
| 1230 |
+
apply pathPatterns_forall_zero
|
| 1231 |
+
exact ⟨_, Certificates.k9t6p5, Certificates.k9t6p5_check⟩
|
| 1232 |
+
|
| 1233 |
+
private theorem k9t6_cover14 : ∀ P ∈ pathPatterns 1 1 [2], HasCheckedCertificate 9 6 ([[], [], [], [2]] ++ P) := by
|
| 1234 |
+
apply pathPatterns_forall_step
|
| 1235 |
+
exact by
|
| 1236 |
+
intro h
|
| 1237 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 1238 |
+
|
| 1239 |
+
private theorem k9t6_cover15 : ∀ P ∈ pathPatterns 1 0 [3], HasCheckedCertificate 9 6 ([[], [], [], [3]] ++ P) := by
|
| 1240 |
+
apply pathPatterns_forall_step
|
| 1241 |
+
exact by
|
| 1242 |
+
intro h
|
| 1243 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 1244 |
+
|
| 1245 |
+
private theorem k9t6_cover4 : ∀ P ∈ pathPatterns 3 3 [], HasCheckedCertificate 9 6 ([[], [], []] ++ P) := by
|
| 1246 |
+
apply pathPatterns_forall_step
|
| 1247 |
+
exact by
|
| 1248 |
+
constructor
|
| 1249 |
+
· exact by
|
| 1250 |
+
intro _
|
| 1251 |
+
exact k9t6_cover5
|
| 1252 |
+
· intro q
|
| 1253 |
+
fin_cases q
|
| 1254 |
+
· exact by
|
| 1255 |
+
constructor
|
| 1256 |
+
· exact by
|
| 1257 |
+
intro _
|
| 1258 |
+
exact k9t6_cover11
|
| 1259 |
+
· intro q
|
| 1260 |
+
fin_cases q
|
| 1261 |
+
· exact by
|
| 1262 |
+
intro _
|
| 1263 |
+
exact k9t6_cover12
|
| 1264 |
+
· exact by
|
| 1265 |
+
intro _
|
| 1266 |
+
exact k9t6_cover13
|
| 1267 |
+
· exact by
|
| 1268 |
+
constructor
|
| 1269 |
+
· exact by
|
| 1270 |
+
intro _
|
| 1271 |
+
exact k9t6_cover14
|
| 1272 |
+
· intro q
|
| 1273 |
+
fin_cases q
|
| 1274 |
+
· exact by
|
| 1275 |
+
intro h
|
| 1276 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 1277 |
+
· exact by
|
| 1278 |
+
constructor
|
| 1279 |
+
· exact by
|
| 1280 |
+
intro _
|
| 1281 |
+
exact k9t6_cover15
|
| 1282 |
+
· intro q
|
| 1283 |
+
exact Fin.elim0 q
|
| 1284 |
+
|
| 1285 |
+
private theorem k9t6_cover17 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 9 6 ([[], [], [1], [1]] ++ P) := by
|
| 1286 |
+
apply pathPatterns_forall_zero
|
| 1287 |
+
exact ⟨_, Certificates.k9t6p6, Certificates.k9t6p6_check⟩
|
| 1288 |
+
|
| 1289 |
+
private theorem k9t6_cover18 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 9 6 ([[], [], [1], [2]] ++ P) := by
|
| 1290 |
+
apply pathPatterns_forall_zero
|
| 1291 |
+
exact ⟨_, Certificates.k9t6p7, Certificates.k9t6p7_check⟩
|
| 1292 |
+
|
| 1293 |
+
private theorem k9t6_cover16 : ∀ P ∈ pathPatterns 2 2 [1], HasCheckedCertificate 9 6 ([[], [], [1]] ++ P) := by
|
| 1294 |
+
apply pathPatterns_forall_step
|
| 1295 |
+
exact by
|
| 1296 |
+
constructor
|
| 1297 |
+
· exact by
|
| 1298 |
+
intro h
|
| 1299 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 1300 |
+
· intro q
|
| 1301 |
+
fin_cases q
|
| 1302 |
+
· exact by
|
| 1303 |
+
intro _
|
| 1304 |
+
exact k9t6_cover17
|
| 1305 |
+
· exact by
|
| 1306 |
+
intro _
|
| 1307 |
+
exact k9t6_cover18
|
| 1308 |
+
|
| 1309 |
+
private theorem k9t6_cover19 : ∀ P ∈ pathPatterns 1 1 [1, 1], HasCheckedCertificate 9 6 ([[], [], [1, 1]] ++ P) := by
|
| 1310 |
+
apply pathPatterns_forall_step
|
| 1311 |
+
exact by
|
| 1312 |
+
intro h
|
| 1313 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 1314 |
+
|
| 1315 |
+
private theorem k9t6_cover20 : ∀ P ∈ pathPatterns 0 0 [1, 1, 1], HasCheckedCertificate 9 6 ([[], [], [1, 1, 1]] ++ P) := by
|
| 1316 |
+
apply pathPatterns_forall_zero
|
| 1317 |
+
exact ⟨_, Certificates.k9t6p8, Certificates.k9t6p8_check⟩
|
| 1318 |
+
|
| 1319 |
+
private theorem k9t6_cover21 : ∀ P ∈ pathPatterns 1 0 [1, 2], HasCheckedCertificate 9 6 ([[], [], [1, 2]] ++ P) := by
|
| 1320 |
+
apply pathPatterns_forall_step
|
| 1321 |
+
exact by
|
| 1322 |
+
intro h
|
| 1323 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h)
|
| 1324 |
+
|
| 1325 |
+
private theorem k9t6_cover22 : ∀ P ∈ pathPatterns 2 1 [2], HasCheckedCertificate 9 6 ([[], [], [2]] ++ P) := by
|
| 1326 |
+
apply pathPatterns_forall_step
|
| 1327 |
+
exact by
|
| 1328 |
+
constructor
|
| 1329 |
+
· exact by
|
| 1330 |
+
intro h
|
| 1331 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 1332 |
+
· intro q
|
| 1333 |
+
fin_cases q
|
| 1334 |
+
· exact by
|
| 1335 |
+
intro h
|
| 1336 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h)
|
| 1337 |
+
|
| 1338 |
+
private theorem k9t6_cover23 : ∀ P ∈ pathPatterns 2 0 [3], HasCheckedCertificate 9 6 ([[], [], [3]] ++ P) := by
|
| 1339 |
+
apply pathPatterns_forall_step
|
| 1340 |
+
exact by
|
| 1341 |
+
constructor
|
| 1342 |
+
· exact by
|
| 1343 |
+
intro h
|
| 1344 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 1345 |
+
· intro q
|
| 1346 |
+
exact Fin.elim0 q
|
| 1347 |
+
|
| 1348 |
+
private theorem k9t6_cover3 : ∀ P ∈ pathPatterns 4 3 [], HasCheckedCertificate 9 6 ([[], []] ++ P) := by
|
| 1349 |
+
apply pathPatterns_forall_step
|
| 1350 |
+
exact by
|
| 1351 |
+
constructor
|
| 1352 |
+
· exact by
|
| 1353 |
+
intro _
|
| 1354 |
+
exact k9t6_cover4
|
| 1355 |
+
· intro q
|
| 1356 |
+
fin_cases q
|
| 1357 |
+
· exact by
|
| 1358 |
+
constructor
|
| 1359 |
+
· exact by
|
| 1360 |
+
intro _
|
| 1361 |
+
exact k9t6_cover16
|
| 1362 |
+
· intro q
|
| 1363 |
+
fin_cases q
|
| 1364 |
+
· exact by
|
| 1365 |
+
constructor
|
| 1366 |
+
· exact by
|
| 1367 |
+
intro _
|
| 1368 |
+
exact k9t6_cover19
|
| 1369 |
+
· intro q
|
| 1370 |
+
fin_cases q
|
| 1371 |
+
· exact by
|
| 1372 |
+
intro _
|
| 1373 |
+
exact k9t6_cover20
|
| 1374 |
+
· exact by
|
| 1375 |
+
constructor
|
| 1376 |
+
· exact by
|
| 1377 |
+
intro _
|
| 1378 |
+
exact k9t6_cover21
|
| 1379 |
+
· intro q
|
| 1380 |
+
exact Fin.elim0 q
|
| 1381 |
+
· exact by
|
| 1382 |
+
constructor
|
| 1383 |
+
· exact by
|
| 1384 |
+
intro _
|
| 1385 |
+
exact k9t6_cover22
|
| 1386 |
+
· intro q
|
| 1387 |
+
fin_cases q
|
| 1388 |
+
· exact by
|
| 1389 |
+
constructor
|
| 1390 |
+
· exact by
|
| 1391 |
+
intro h
|
| 1392 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 1393 |
+
· intro q
|
| 1394 |
+
exact Fin.elim0 q
|
| 1395 |
+
· exact by
|
| 1396 |
+
constructor
|
| 1397 |
+
· exact by
|
| 1398 |
+
intro _
|
| 1399 |
+
exact k9t6_cover23
|
| 1400 |
+
· intro q
|
| 1401 |
+
exact Fin.elim0 q
|
| 1402 |
+
|
| 1403 |
+
private theorem k9t6_cover25 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 9 6 ([[], [1], [1]] ++ P) := by
|
| 1404 |
+
apply pathPatterns_forall_step
|
| 1405 |
+
exact by
|
| 1406 |
+
intro h
|
| 1407 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 1408 |
+
|
| 1409 |
+
private theorem k9t6_cover26 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 9 6 ([[], [1], [1, 1]] ++ P) := by
|
| 1410 |
+
apply pathPatterns_forall_zero
|
| 1411 |
+
exact ⟨_, Certificates.k9t6p9, Certificates.k9t6p9_check⟩
|
| 1412 |
+
|
| 1413 |
+
private theorem k9t6_cover27 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 9 6 ([[], [1], [2]] ++ P) := by
|
| 1414 |
+
apply pathPatterns_forall_step
|
| 1415 |
+
exact by
|
| 1416 |
+
intro h
|
| 1417 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 1418 |
+
|
| 1419 |
+
private theorem k9t6_cover24 : ∀ P ∈ pathPatterns 3 2 [1], HasCheckedCertificate 9 6 ([[], [1]] ++ P) := by
|
| 1420 |
+
apply pathPatterns_forall_step
|
| 1421 |
+
exact by
|
| 1422 |
+
constructor
|
| 1423 |
+
· exact by
|
| 1424 |
+
intro h
|
| 1425 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 1426 |
+
· intro q
|
| 1427 |
+
fin_cases q
|
| 1428 |
+
· exact by
|
| 1429 |
+
constructor
|
| 1430 |
+
· exact by
|
| 1431 |
+
intro _
|
| 1432 |
+
exact k9t6_cover25
|
| 1433 |
+
· intro q
|
| 1434 |
+
fin_cases q
|
| 1435 |
+
· exact by
|
| 1436 |
+
intro _
|
| 1437 |
+
exact k9t6_cover26
|
| 1438 |
+
· exact by
|
| 1439 |
+
constructor
|
| 1440 |
+
· exact by
|
| 1441 |
+
intro _
|
| 1442 |
+
exact k9t6_cover27
|
| 1443 |
+
· intro q
|
| 1444 |
+
exact Fin.elim0 q
|
| 1445 |
+
|
| 1446 |
+
private theorem k9t6_cover28 : ∀ P ∈ pathPatterns 2 1 [1, 1], HasCheckedCertificate 9 6 ([[], [1, 1]] ++ P) := by
|
| 1447 |
+
apply pathPatterns_forall_step
|
| 1448 |
+
exact by
|
| 1449 |
+
constructor
|
| 1450 |
+
· exact by
|
| 1451 |
+
intro h
|
| 1452 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 1453 |
+
· intro q
|
| 1454 |
+
fin_cases q
|
| 1455 |
+
· exact by
|
| 1456 |
+
intro h
|
| 1457 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h)
|
| 1458 |
+
|
| 1459 |
+
private theorem k9t6_cover29 : ∀ P ∈ pathPatterns 1 0 [1, 1, 1], HasCheckedCertificate 9 6 ([[], [1, 1, 1]] ++ P) := by
|
| 1460 |
+
apply pathPatterns_forall_step
|
| 1461 |
+
exact by
|
| 1462 |
+
intro h
|
| 1463 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h)
|
| 1464 |
+
|
| 1465 |
+
private theorem k9t6_cover30 : ∀ P ∈ pathPatterns 2 0 [1, 2], HasCheckedCertificate 9 6 ([[], [1, 2]] ++ P) := by
|
| 1466 |
+
apply pathPatterns_forall_step
|
| 1467 |
+
exact by
|
| 1468 |
+
constructor
|
| 1469 |
+
· exact by
|
| 1470 |
+
intro h
|
| 1471 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h)
|
| 1472 |
+
· intro q
|
| 1473 |
+
exact Fin.elim0 q
|
| 1474 |
+
|
| 1475 |
+
private theorem k9t6_cover31 : ∀ P ∈ pathPatterns 3 1 [2], HasCheckedCertificate 9 6 ([[], [2]] ++ P) := by
|
| 1476 |
+
apply pathPatterns_forall_step
|
| 1477 |
+
exact by
|
| 1478 |
+
constructor
|
| 1479 |
+
· exact by
|
| 1480 |
+
intro h
|
| 1481 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 1482 |
+
· intro q
|
| 1483 |
+
fin_cases q
|
| 1484 |
+
· exact by
|
| 1485 |
+
constructor
|
| 1486 |
+
· exact by
|
| 1487 |
+
intro h
|
| 1488 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h)
|
| 1489 |
+
· intro q
|
| 1490 |
+
exact Fin.elim0 q
|
| 1491 |
+
|
| 1492 |
+
private theorem k9t6_cover32 : ∀ P ∈ pathPatterns 3 0 [3], HasCheckedCertificate 9 6 ([[], [3]] ++ P) := by
|
| 1493 |
+
apply pathPatterns_forall_step
|
| 1494 |
+
exact by
|
| 1495 |
+
constructor
|
| 1496 |
+
· exact by
|
| 1497 |
+
intro h
|
| 1498 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 1499 |
+
· intro q
|
| 1500 |
+
exact Fin.elim0 q
|
| 1501 |
+
|
| 1502 |
+
private theorem k9t6_cover2 : ∀ P ∈ pathPatterns 5 3 [], HasCheckedCertificate 9 6 ([[]] ++ P) := by
|
| 1503 |
+
apply pathPatterns_forall_step
|
| 1504 |
+
exact by
|
| 1505 |
+
constructor
|
| 1506 |
+
· exact by
|
| 1507 |
+
intro _
|
| 1508 |
+
exact k9t6_cover3
|
| 1509 |
+
· intro q
|
| 1510 |
+
fin_cases q
|
| 1511 |
+
· exact by
|
| 1512 |
+
constructor
|
| 1513 |
+
· exact by
|
| 1514 |
+
intro _
|
| 1515 |
+
exact k9t6_cover24
|
| 1516 |
+
· intro q
|
| 1517 |
+
fin_cases q
|
| 1518 |
+
· exact by
|
| 1519 |
+
constructor
|
| 1520 |
+
· exact by
|
| 1521 |
+
intro _
|
| 1522 |
+
exact k9t6_cover28
|
| 1523 |
+
· intro q
|
| 1524 |
+
fin_cases q
|
| 1525 |
+
· exact by
|
| 1526 |
+
constructor
|
| 1527 |
+
· exact by
|
| 1528 |
+
intro _
|
| 1529 |
+
exact k9t6_cover29
|
| 1530 |
+
· intro q
|
| 1531 |
+
exact Fin.elim0 q
|
| 1532 |
+
· exact by
|
| 1533 |
+
constructor
|
| 1534 |
+
· exact by
|
| 1535 |
+
intro _
|
| 1536 |
+
exact k9t6_cover30
|
| 1537 |
+
· intro q
|
| 1538 |
+
exact Fin.elim0 q
|
| 1539 |
+
· exact by
|
| 1540 |
+
constructor
|
| 1541 |
+
· exact by
|
| 1542 |
+
intro _
|
| 1543 |
+
exact k9t6_cover31
|
| 1544 |
+
· intro q
|
| 1545 |
+
fin_cases q
|
| 1546 |
+
· exact by
|
| 1547 |
+
constructor
|
| 1548 |
+
· exact by
|
| 1549 |
+
intro h
|
| 1550 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 1551 |
+
· intro q
|
| 1552 |
+
exact Fin.elim0 q
|
| 1553 |
+
· exact by
|
| 1554 |
+
constructor
|
| 1555 |
+
· exact by
|
| 1556 |
+
intro _
|
| 1557 |
+
exact k9t6_cover32
|
| 1558 |
+
· intro q
|
| 1559 |
+
exact Fin.elim0 q
|
| 1560 |
+
|
| 1561 |
+
private theorem k9t6_cover35 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 9 6 ([[1], [1], [1]] ++ P) := by
|
| 1562 |
+
apply pathPatterns_forall_zero
|
| 1563 |
+
exact ⟨_, Certificates.k9t6p10, Certificates.k9t6p10_check⟩
|
| 1564 |
+
|
| 1565 |
+
private theorem k9t6_cover34 : ∀ P ∈ pathPatterns 2 1 [1], HasCheckedCertificate 9 6 ([[1], [1]] ++ P) := by
|
| 1566 |
+
apply pathPatterns_forall_step
|
| 1567 |
+
exact by
|
| 1568 |
+
constructor
|
| 1569 |
+
· exact by
|
| 1570 |
+
intro h
|
| 1571 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 1572 |
+
· intro q
|
| 1573 |
+
fin_cases q
|
| 1574 |
+
· exact by
|
| 1575 |
+
intro _
|
| 1576 |
+
exact k9t6_cover35
|
| 1577 |
+
|
| 1578 |
+
private theorem k9t6_cover36 : ∀ P ∈ pathPatterns 1 0 [1, 1], HasCheckedCertificate 9 6 ([[1], [1, 1]] ++ P) := by
|
| 1579 |
+
apply pathPatterns_forall_step
|
| 1580 |
+
exact by
|
| 1581 |
+
intro h
|
| 1582 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 1583 |
+
|
| 1584 |
+
private theorem k9t6_cover37 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 9 6 ([[1], [2]] ++ P) := by
|
| 1585 |
+
apply pathPatterns_forall_step
|
| 1586 |
+
exact by
|
| 1587 |
+
constructor
|
| 1588 |
+
· exact by
|
| 1589 |
+
intro h
|
| 1590 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 1591 |
+
· intro q
|
| 1592 |
+
exact Fin.elim0 q
|
| 1593 |
+
|
| 1594 |
+
private theorem k9t6_cover33 : ∀ P ∈ pathPatterns 4 2 [1], HasCheckedCertificate 9 6 ([[1]] ++ P) := by
|
| 1595 |
+
apply pathPatterns_forall_step
|
| 1596 |
+
exact by
|
| 1597 |
+
constructor
|
| 1598 |
+
· exact by
|
| 1599 |
+
intro h
|
| 1600 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 1601 |
+
· intro q
|
| 1602 |
+
fin_cases q
|
| 1603 |
+
· exact by
|
| 1604 |
+
constructor
|
| 1605 |
+
· exact by
|
| 1606 |
+
intro _
|
| 1607 |
+
exact k9t6_cover34
|
| 1608 |
+
· intro q
|
| 1609 |
+
fin_cases q
|
| 1610 |
+
· exact by
|
| 1611 |
+
constructor
|
| 1612 |
+
· exact by
|
| 1613 |
+
intro _
|
| 1614 |
+
exact k9t6_cover36
|
| 1615 |
+
· intro q
|
| 1616 |
+
exact Fin.elim0 q
|
| 1617 |
+
· exact by
|
| 1618 |
+
constructor
|
| 1619 |
+
· exact by
|
| 1620 |
+
intro _
|
| 1621 |
+
exact k9t6_cover37
|
| 1622 |
+
· intro q
|
| 1623 |
+
exact Fin.elim0 q
|
| 1624 |
+
|
| 1625 |
+
private theorem k9t6_cover38 : ∀ P ∈ pathPatterns 3 1 [1, 1], HasCheckedCertificate 9 6 ([[1, 1]] ++ P) := by
|
| 1626 |
+
apply pathPatterns_forall_step
|
| 1627 |
+
exact by
|
| 1628 |
+
constructor
|
| 1629 |
+
· exact by
|
| 1630 |
+
intro h
|
| 1631 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 1632 |
+
· intro q
|
| 1633 |
+
fin_cases q
|
| 1634 |
+
· exact by
|
| 1635 |
+
constructor
|
| 1636 |
+
· exact by
|
| 1637 |
+
intro h
|
| 1638 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [1] ∧ LexLE [1] [1])) h)
|
| 1639 |
+
· intro q
|
| 1640 |
+
exact Fin.elim0 q
|
| 1641 |
+
|
| 1642 |
+
private theorem k9t6_cover39 : ∀ P ∈ pathPatterns 2 0 [1, 1, 1], HasCheckedCertificate 9 6 ([[1, 1, 1]] ++ P) := by
|
| 1643 |
+
apply pathPatterns_forall_step
|
| 1644 |
+
exact by
|
| 1645 |
+
constructor
|
| 1646 |
+
· exact by
|
| 1647 |
+
intro h
|
| 1648 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1, 1] [] ∧ LexLE [] [])) h)
|
| 1649 |
+
· intro q
|
| 1650 |
+
exact Fin.elim0 q
|
| 1651 |
+
|
| 1652 |
+
private theorem k9t6_cover40 : ∀ P ∈ pathPatterns 3 0 [1, 2], HasCheckedCertificate 9 6 ([[1, 2]] ++ P) := by
|
| 1653 |
+
apply pathPatterns_forall_step
|
| 1654 |
+
exact by
|
| 1655 |
+
constructor
|
| 1656 |
+
· exact by
|
| 1657 |
+
intro h
|
| 1658 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 2] [] ∧ LexLE [] [])) h)
|
| 1659 |
+
· intro q
|
| 1660 |
+
exact Fin.elim0 q
|
| 1661 |
+
|
| 1662 |
+
private theorem k9t6_cover41 : ∀ P ∈ pathPatterns 4 1 [2], HasCheckedCertificate 9 6 ([[2]] ++ P) := by
|
| 1663 |
+
apply pathPatterns_forall_step
|
| 1664 |
+
exact by
|
| 1665 |
+
constructor
|
| 1666 |
+
· exact by
|
| 1667 |
+
intro h
|
| 1668 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 1669 |
+
· intro q
|
| 1670 |
+
fin_cases q
|
| 1671 |
+
· exact by
|
| 1672 |
+
constructor
|
| 1673 |
+
· exact by
|
| 1674 |
+
intro h
|
| 1675 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [1] ∧ LexLE [1] [1])) h)
|
| 1676 |
+
· intro q
|
| 1677 |
+
exact Fin.elim0 q
|
| 1678 |
+
|
| 1679 |
+
private theorem k9t6_cover42 : ∀ P ∈ pathPatterns 4 0 [3], HasCheckedCertificate 9 6 ([[3]] ++ P) := by
|
| 1680 |
+
apply pathPatterns_forall_step
|
| 1681 |
+
exact by
|
| 1682 |
+
constructor
|
| 1683 |
+
· exact by
|
| 1684 |
+
intro h
|
| 1685 |
+
exact False.elim ((by decide : ¬ (LexLE [3] [] ∧ LexLE [] [])) h)
|
| 1686 |
+
· intro q
|
| 1687 |
+
exact Fin.elim0 q
|
| 1688 |
+
|
| 1689 |
+
private theorem k9t6_cover1 : ∀ P ∈ pathPatterns 6 3 [], HasCheckedCertificate 9 6 ([] ++ P) := by
|
| 1690 |
+
apply pathPatterns_forall_step
|
| 1691 |
+
exact by
|
| 1692 |
+
constructor
|
| 1693 |
+
· exact by
|
| 1694 |
+
intro _
|
| 1695 |
+
exact k9t6_cover2
|
| 1696 |
+
· intro q
|
| 1697 |
+
fin_cases q
|
| 1698 |
+
· exact by
|
| 1699 |
+
constructor
|
| 1700 |
+
· exact by
|
| 1701 |
+
intro _
|
| 1702 |
+
exact k9t6_cover33
|
| 1703 |
+
· intro q
|
| 1704 |
+
fin_cases q
|
| 1705 |
+
· exact by
|
| 1706 |
+
constructor
|
| 1707 |
+
· exact by
|
| 1708 |
+
intro _
|
| 1709 |
+
exact k9t6_cover38
|
| 1710 |
+
· intro q
|
| 1711 |
+
fin_cases q
|
| 1712 |
+
· exact by
|
| 1713 |
+
constructor
|
| 1714 |
+
· exact by
|
| 1715 |
+
intro _
|
| 1716 |
+
exact k9t6_cover39
|
| 1717 |
+
· intro q
|
| 1718 |
+
exact Fin.elim0 q
|
| 1719 |
+
· exact by
|
| 1720 |
+
constructor
|
| 1721 |
+
· exact by
|
| 1722 |
+
intro _
|
| 1723 |
+
exact k9t6_cover40
|
| 1724 |
+
· intro q
|
| 1725 |
+
exact Fin.elim0 q
|
| 1726 |
+
· exact by
|
| 1727 |
+
constructor
|
| 1728 |
+
· exact by
|
| 1729 |
+
intro _
|
| 1730 |
+
exact k9t6_cover41
|
| 1731 |
+
· intro q
|
| 1732 |
+
fin_cases q
|
| 1733 |
+
· exact by
|
| 1734 |
+
constructor
|
| 1735 |
+
· exact by
|
| 1736 |
+
intro h
|
| 1737 |
+
exact False.elim ((by decide : ¬ (LexLE [] [2, 1] ∧ LexLE [2, 1] [1, 2])) h)
|
| 1738 |
+
· intro q
|
| 1739 |
+
exact Fin.elim0 q
|
| 1740 |
+
· exact by
|
| 1741 |
+
constructor
|
| 1742 |
+
· exact by
|
| 1743 |
+
intro _
|
| 1744 |
+
exact k9t6_cover42
|
| 1745 |
+
· intro q
|
| 1746 |
+
exact Fin.elim0 q
|
| 1747 |
+
|
| 1748 |
+
theorem coverage_k9_t6 :
|
| 1749 |
+
∀ P ∈ pathPatterns 6 3, HasCheckedCertificate 9 6 P :=
|
| 1750 |
+
k9t6_cover1
|
| 1751 |
+
|
| 1752 |
+
private theorem k9t7_cover8 : ∀ P ∈ pathPatterns 0 2 [], HasCheckedCertificate 9 7 ([[], [], [], [], [], [], []] ++ P) := by
|
| 1753 |
+
apply pathPatterns_forall_zero
|
| 1754 |
+
exact ⟨_, Certificates.k9t7p0, Certificates.k9t7p0_check⟩
|
| 1755 |
+
|
| 1756 |
+
private theorem k9t7_cover7 : ∀ P ∈ pathPatterns 1 2 [], HasCheckedCertificate 9 7 ([[], [], [], [], [], []] ++ P) := by
|
| 1757 |
+
apply pathPatterns_forall_step
|
| 1758 |
+
exact by
|
| 1759 |
+
intro _
|
| 1760 |
+
exact k9t7_cover8
|
| 1761 |
+
|
| 1762 |
+
private theorem k9t7_cover9 : ∀ P ∈ pathPatterns 0 1 [1], HasCheckedCertificate 9 7 ([[], [], [], [], [], [1]] ++ P) := by
|
| 1763 |
+
apply pathPatterns_forall_zero
|
| 1764 |
+
exact ⟨_, Certificates.k9t7p1, Certificates.k9t7p1_check⟩
|
| 1765 |
+
|
| 1766 |
+
private theorem k9t7_cover10 : ∀ P ∈ pathPatterns 0 0 [2], HasCheckedCertificate 9 7 ([[], [], [], [], [], [2]] ++ P) := by
|
| 1767 |
+
apply pathPatterns_forall_zero
|
| 1768 |
+
exact ⟨_, Certificates.k9t7p2, Certificates.k9t7p2_check⟩
|
| 1769 |
+
|
| 1770 |
+
private theorem k9t7_cover6 : ∀ P ∈ pathPatterns 2 2 [], HasCheckedCertificate 9 7 ([[], [], [], [], []] ++ P) := by
|
| 1771 |
+
apply pathPatterns_forall_step
|
| 1772 |
+
exact by
|
| 1773 |
+
constructor
|
| 1774 |
+
· exact by
|
| 1775 |
+
intro _
|
| 1776 |
+
exact k9t7_cover7
|
| 1777 |
+
· intro q
|
| 1778 |
+
fin_cases q
|
| 1779 |
+
· exact by
|
| 1780 |
+
intro _
|
| 1781 |
+
exact k9t7_cover9
|
| 1782 |
+
· exact by
|
| 1783 |
+
intro _
|
| 1784 |
+
exact k9t7_cover10
|
| 1785 |
+
|
| 1786 |
+
private theorem k9t7_cover11 : ∀ P ∈ pathPatterns 1 1 [1], HasCheckedCertificate 9 7 ([[], [], [], [], [1]] ++ P) := by
|
| 1787 |
+
apply pathPatterns_forall_step
|
| 1788 |
+
exact by
|
| 1789 |
+
intro h
|
| 1790 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 1791 |
+
|
| 1792 |
+
private theorem k9t7_cover12 : ∀ P ∈ pathPatterns 0 0 [1, 1], HasCheckedCertificate 9 7 ([[], [], [], [], [1, 1]] ++ P) := by
|
| 1793 |
+
apply pathPatterns_forall_zero
|
| 1794 |
+
exact ⟨_, Certificates.k9t7p3, Certificates.k9t7p3_check⟩
|
| 1795 |
+
|
| 1796 |
+
private theorem k9t7_cover13 : ∀ P ∈ pathPatterns 1 0 [2], HasCheckedCertificate 9 7 ([[], [], [], [], [2]] ++ P) := by
|
| 1797 |
+
apply pathPatterns_forall_step
|
| 1798 |
+
exact by
|
| 1799 |
+
intro h
|
| 1800 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 1801 |
+
|
| 1802 |
+
private theorem k9t7_cover5 : ∀ P ∈ pathPatterns 3 2 [], HasCheckedCertificate 9 7 ([[], [], [], []] ++ P) := by
|
| 1803 |
+
apply pathPatterns_forall_step
|
| 1804 |
+
exact by
|
| 1805 |
+
constructor
|
| 1806 |
+
· exact by
|
| 1807 |
+
intro _
|
| 1808 |
+
exact k9t7_cover6
|
| 1809 |
+
· intro q
|
| 1810 |
+
fin_cases q
|
| 1811 |
+
· exact by
|
| 1812 |
+
constructor
|
| 1813 |
+
· exact by
|
| 1814 |
+
intro _
|
| 1815 |
+
exact k9t7_cover11
|
| 1816 |
+
· intro q
|
| 1817 |
+
fin_cases q
|
| 1818 |
+
· exact by
|
| 1819 |
+
intro _
|
| 1820 |
+
exact k9t7_cover12
|
| 1821 |
+
· exact by
|
| 1822 |
+
constructor
|
| 1823 |
+
· exact by
|
| 1824 |
+
intro _
|
| 1825 |
+
exact k9t7_cover13
|
| 1826 |
+
· intro q
|
| 1827 |
+
exact Fin.elim0 q
|
| 1828 |
+
|
| 1829 |
+
private theorem k9t7_cover15 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 9 7 ([[], [], [], [1], [1]] ++ P) := by
|
| 1830 |
+
apply pathPatterns_forall_zero
|
| 1831 |
+
exact ⟨_, Certificates.k9t7p4, Certificates.k9t7p4_check⟩
|
| 1832 |
+
|
| 1833 |
+
private theorem k9t7_cover14 : ∀ P ∈ pathPatterns 2 1 [1], HasCheckedCertificate 9 7 ([[], [], [], [1]] ++ P) := by
|
| 1834 |
+
apply pathPatterns_forall_step
|
| 1835 |
+
exact by
|
| 1836 |
+
constructor
|
| 1837 |
+
· exact by
|
| 1838 |
+
intro h
|
| 1839 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 1840 |
+
· intro q
|
| 1841 |
+
fin_cases q
|
| 1842 |
+
· exact by
|
| 1843 |
+
intro _
|
| 1844 |
+
exact k9t7_cover15
|
| 1845 |
+
|
| 1846 |
+
private theorem k9t7_cover16 : ∀ P ∈ pathPatterns 1 0 [1, 1], HasCheckedCertificate 9 7 ([[], [], [], [1, 1]] ++ P) := by
|
| 1847 |
+
apply pathPatterns_forall_step
|
| 1848 |
+
exact by
|
| 1849 |
+
intro h
|
| 1850 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 1851 |
+
|
| 1852 |
+
private theorem k9t7_cover17 : ∀ P ∈ pathPatterns 2 0 [2], HasCheckedCertificate 9 7 ([[], [], [], [2]] ++ P) := by
|
| 1853 |
+
apply pathPatterns_forall_step
|
| 1854 |
+
exact by
|
| 1855 |
+
constructor
|
| 1856 |
+
· exact by
|
| 1857 |
+
intro h
|
| 1858 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 1859 |
+
· intro q
|
| 1860 |
+
exact Fin.elim0 q
|
| 1861 |
+
|
| 1862 |
+
private theorem k9t7_cover4 : ∀ P ∈ pathPatterns 4 2 [], HasCheckedCertificate 9 7 ([[], [], []] ++ P) := by
|
| 1863 |
+
apply pathPatterns_forall_step
|
| 1864 |
+
exact by
|
| 1865 |
+
constructor
|
| 1866 |
+
· exact by
|
| 1867 |
+
intro _
|
| 1868 |
+
exact k9t7_cover5
|
| 1869 |
+
· intro q
|
| 1870 |
+
fin_cases q
|
| 1871 |
+
· exact by
|
| 1872 |
+
constructor
|
| 1873 |
+
· exact by
|
| 1874 |
+
intro _
|
| 1875 |
+
exact k9t7_cover14
|
| 1876 |
+
· intro q
|
| 1877 |
+
fin_cases q
|
| 1878 |
+
· exact by
|
| 1879 |
+
constructor
|
| 1880 |
+
· exact by
|
| 1881 |
+
intro _
|
| 1882 |
+
exact k9t7_cover16
|
| 1883 |
+
· intro q
|
| 1884 |
+
exact Fin.elim0 q
|
| 1885 |
+
· exact by
|
| 1886 |
+
constructor
|
| 1887 |
+
· exact by
|
| 1888 |
+
intro _
|
| 1889 |
+
exact k9t7_cover17
|
| 1890 |
+
· intro q
|
| 1891 |
+
exact Fin.elim0 q
|
| 1892 |
+
|
| 1893 |
+
private theorem k9t7_cover19 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 9 7 ([[], [], [1], [1]] ++ P) := by
|
| 1894 |
+
apply pathPatterns_forall_step
|
| 1895 |
+
exact by
|
| 1896 |
+
intro h
|
| 1897 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 1898 |
+
|
| 1899 |
+
private theorem k9t7_cover18 : ∀ P ∈ pathPatterns 3 1 [1], HasCheckedCertificate 9 7 ([[], [], [1]] ++ P) := by
|
| 1900 |
+
apply pathPatterns_forall_step
|
| 1901 |
+
exact by
|
| 1902 |
+
constructor
|
| 1903 |
+
· exact by
|
| 1904 |
+
intro h
|
| 1905 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 1906 |
+
· intro q
|
| 1907 |
+
fin_cases q
|
| 1908 |
+
· exact by
|
| 1909 |
+
constructor
|
| 1910 |
+
· exact by
|
| 1911 |
+
intro _
|
| 1912 |
+
exact k9t7_cover19
|
| 1913 |
+
· intro q
|
| 1914 |
+
exact Fin.elim0 q
|
| 1915 |
+
|
| 1916 |
+
private theorem k9t7_cover20 : ∀ P ∈ pathPatterns 2 0 [1, 1], HasCheckedCertificate 9 7 ([[], [], [1, 1]] ++ P) := by
|
| 1917 |
+
apply pathPatterns_forall_step
|
| 1918 |
+
exact by
|
| 1919 |
+
constructor
|
| 1920 |
+
· exact by
|
| 1921 |
+
intro h
|
| 1922 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 1923 |
+
· intro q
|
| 1924 |
+
exact Fin.elim0 q
|
| 1925 |
+
|
| 1926 |
+
private theorem k9t7_cover21 : ∀ P ∈ pathPatterns 3 0 [2], HasCheckedCertificate 9 7 ([[], [], [2]] ++ P) := by
|
| 1927 |
+
apply pathPatterns_forall_step
|
| 1928 |
+
exact by
|
| 1929 |
+
constructor
|
| 1930 |
+
· exact by
|
| 1931 |
+
intro h
|
| 1932 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 1933 |
+
· intro q
|
| 1934 |
+
exact Fin.elim0 q
|
| 1935 |
+
|
| 1936 |
+
private theorem k9t7_cover3 : ∀ P ∈ pathPatterns 5 2 [], HasCheckedCertificate 9 7 ([[], []] ++ P) := by
|
| 1937 |
+
apply pathPatterns_forall_step
|
| 1938 |
+
exact by
|
| 1939 |
+
constructor
|
| 1940 |
+
· exact by
|
| 1941 |
+
intro _
|
| 1942 |
+
exact k9t7_cover4
|
| 1943 |
+
· intro q
|
| 1944 |
+
fin_cases q
|
| 1945 |
+
· exact by
|
| 1946 |
+
constructor
|
| 1947 |
+
· exact by
|
| 1948 |
+
intro _
|
| 1949 |
+
exact k9t7_cover18
|
| 1950 |
+
· intro q
|
| 1951 |
+
fin_cases q
|
| 1952 |
+
· exact by
|
| 1953 |
+
constructor
|
| 1954 |
+
· exact by
|
| 1955 |
+
intro _
|
| 1956 |
+
exact k9t7_cover20
|
| 1957 |
+
· intro q
|
| 1958 |
+
exact Fin.elim0 q
|
| 1959 |
+
· exact by
|
| 1960 |
+
constructor
|
| 1961 |
+
· exact by
|
| 1962 |
+
intro _
|
| 1963 |
+
exact k9t7_cover21
|
| 1964 |
+
· intro q
|
| 1965 |
+
exact Fin.elim0 q
|
| 1966 |
+
|
| 1967 |
+
private theorem k9t7_cover23 : ∀ P ∈ pathPatterns 2 0 [1], HasCheckedCertificate 9 7 ([[], [1], [1]] ++ P) := by
|
| 1968 |
+
apply pathPatterns_forall_step
|
| 1969 |
+
exact by
|
| 1970 |
+
constructor
|
| 1971 |
+
· exact by
|
| 1972 |
+
intro h
|
| 1973 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 1974 |
+
· intro q
|
| 1975 |
+
exact Fin.elim0 q
|
| 1976 |
+
|
| 1977 |
+
private theorem k9t7_cover22 : ∀ P ∈ pathPatterns 4 1 [1], HasCheckedCertificate 9 7 ([[], [1]] ++ P) := by
|
| 1978 |
+
apply pathPatterns_forall_step
|
| 1979 |
+
exact by
|
| 1980 |
+
constructor
|
| 1981 |
+
· exact by
|
| 1982 |
+
intro h
|
| 1983 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 1984 |
+
· intro q
|
| 1985 |
+
fin_cases q
|
| 1986 |
+
· exact by
|
| 1987 |
+
constructor
|
| 1988 |
+
· exact by
|
| 1989 |
+
intro _
|
| 1990 |
+
exact k9t7_cover23
|
| 1991 |
+
· intro q
|
| 1992 |
+
exact Fin.elim0 q
|
| 1993 |
+
|
| 1994 |
+
private theorem k9t7_cover24 : ∀ P ∈ pathPatterns 3 0 [1, 1], HasCheckedCertificate 9 7 ([[], [1, 1]] ++ P) := by
|
| 1995 |
+
apply pathPatterns_forall_step
|
| 1996 |
+
exact by
|
| 1997 |
+
constructor
|
| 1998 |
+
· exact by
|
| 1999 |
+
intro h
|
| 2000 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 2001 |
+
· intro q
|
| 2002 |
+
exact Fin.elim0 q
|
| 2003 |
+
|
| 2004 |
+
private theorem k9t7_cover25 : ∀ P ∈ pathPatterns 4 0 [2], HasCheckedCertificate 9 7 ([[], [2]] ++ P) := by
|
| 2005 |
+
apply pathPatterns_forall_step
|
| 2006 |
+
exact by
|
| 2007 |
+
constructor
|
| 2008 |
+
· exact by
|
| 2009 |
+
intro h
|
| 2010 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 2011 |
+
· intro q
|
| 2012 |
+
exact Fin.elim0 q
|
| 2013 |
+
|
| 2014 |
+
private theorem k9t7_cover2 : ∀ P ∈ pathPatterns 6 2 [], HasCheckedCertificate 9 7 ([[]] ++ P) := by
|
| 2015 |
+
apply pathPatterns_forall_step
|
| 2016 |
+
exact by
|
| 2017 |
+
constructor
|
| 2018 |
+
· exact by
|
| 2019 |
+
intro _
|
| 2020 |
+
exact k9t7_cover3
|
| 2021 |
+
· intro q
|
| 2022 |
+
fin_cases q
|
| 2023 |
+
· exact by
|
| 2024 |
+
constructor
|
| 2025 |
+
· exact by
|
| 2026 |
+
intro _
|
| 2027 |
+
exact k9t7_cover22
|
| 2028 |
+
· intro q
|
| 2029 |
+
fin_cases q
|
| 2030 |
+
· exact by
|
| 2031 |
+
constructor
|
| 2032 |
+
· exact by
|
| 2033 |
+
intro _
|
| 2034 |
+
exact k9t7_cover24
|
| 2035 |
+
· intro q
|
| 2036 |
+
exact Fin.elim0 q
|
| 2037 |
+
· exact by
|
| 2038 |
+
constructor
|
| 2039 |
+
· exact by
|
| 2040 |
+
intro _
|
| 2041 |
+
exact k9t7_cover25
|
| 2042 |
+
· intro q
|
| 2043 |
+
exact Fin.elim0 q
|
| 2044 |
+
|
| 2045 |
+
private theorem k9t7_cover27 : ∀ P ∈ pathPatterns 3 0 [1], HasCheckedCertificate 9 7 ([[1], [1]] ++ P) := by
|
| 2046 |
+
apply pathPatterns_forall_step
|
| 2047 |
+
exact by
|
| 2048 |
+
constructor
|
| 2049 |
+
· exact by
|
| 2050 |
+
intro h
|
| 2051 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 2052 |
+
· intro q
|
| 2053 |
+
exact Fin.elim0 q
|
| 2054 |
+
|
| 2055 |
+
private theorem k9t7_cover26 : ∀ P ∈ pathPatterns 5 1 [1], HasCheckedCertificate 9 7 ([[1]] ++ P) := by
|
| 2056 |
+
apply pathPatterns_forall_step
|
| 2057 |
+
exact by
|
| 2058 |
+
constructor
|
| 2059 |
+
· exact by
|
| 2060 |
+
intro h
|
| 2061 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 2062 |
+
· intro q
|
| 2063 |
+
fin_cases q
|
| 2064 |
+
· exact by
|
| 2065 |
+
constructor
|
| 2066 |
+
· exact by
|
| 2067 |
+
intro _
|
| 2068 |
+
exact k9t7_cover27
|
| 2069 |
+
· intro q
|
| 2070 |
+
exact Fin.elim0 q
|
| 2071 |
+
|
| 2072 |
+
private theorem k9t7_cover28 : ∀ P ∈ pathPatterns 4 0 [1, 1], HasCheckedCertificate 9 7 ([[1, 1]] ++ P) := by
|
| 2073 |
+
apply pathPatterns_forall_step
|
| 2074 |
+
exact by
|
| 2075 |
+
constructor
|
| 2076 |
+
· exact by
|
| 2077 |
+
intro h
|
| 2078 |
+
exact False.elim ((by decide : ¬ (LexLE [1, 1] [] ∧ LexLE [] [])) h)
|
| 2079 |
+
· intro q
|
| 2080 |
+
exact Fin.elim0 q
|
| 2081 |
+
|
| 2082 |
+
private theorem k9t7_cover29 : ∀ P ∈ pathPatterns 5 0 [2], HasCheckedCertificate 9 7 ([[2]] ++ P) := by
|
| 2083 |
+
apply pathPatterns_forall_step
|
| 2084 |
+
exact by
|
| 2085 |
+
constructor
|
| 2086 |
+
· exact by
|
| 2087 |
+
intro h
|
| 2088 |
+
exact False.elim ((by decide : ¬ (LexLE [2] [] ∧ LexLE [] [])) h)
|
| 2089 |
+
· intro q
|
| 2090 |
+
exact Fin.elim0 q
|
| 2091 |
+
|
| 2092 |
+
private theorem k9t7_cover1 : ∀ P ∈ pathPatterns 7 2 [], HasCheckedCertificate 9 7 ([] ++ P) := by
|
| 2093 |
+
apply pathPatterns_forall_step
|
| 2094 |
+
exact by
|
| 2095 |
+
constructor
|
| 2096 |
+
· exact by
|
| 2097 |
+
intro _
|
| 2098 |
+
exact k9t7_cover2
|
| 2099 |
+
· intro q
|
| 2100 |
+
fin_cases q
|
| 2101 |
+
· exact by
|
| 2102 |
+
constructor
|
| 2103 |
+
· exact by
|
| 2104 |
+
intro _
|
| 2105 |
+
exact k9t7_cover26
|
| 2106 |
+
· intro q
|
| 2107 |
+
fin_cases q
|
| 2108 |
+
· exact by
|
| 2109 |
+
constructor
|
| 2110 |
+
· exact by
|
| 2111 |
+
intro _
|
| 2112 |
+
exact k9t7_cover28
|
| 2113 |
+
· intro q
|
| 2114 |
+
exact Fin.elim0 q
|
| 2115 |
+
· exact by
|
| 2116 |
+
constructor
|
| 2117 |
+
· exact by
|
| 2118 |
+
intro _
|
| 2119 |
+
exact k9t7_cover29
|
| 2120 |
+
· intro q
|
| 2121 |
+
exact Fin.elim0 q
|
| 2122 |
+
|
| 2123 |
+
theorem coverage_k9_t7 :
|
| 2124 |
+
∀ P ∈ pathPatterns 7 2, HasCheckedCertificate 9 7 P :=
|
| 2125 |
+
k9t7_cover1
|
| 2126 |
+
|
| 2127 |
+
private theorem k9t8_cover9 : ∀ P ∈ pathPatterns 0 1 [], HasCheckedCertificate 9 8 ([[], [], [], [], [], [], [], []] ++ P) := by
|
| 2128 |
+
apply pathPatterns_forall_zero
|
| 2129 |
+
exact ⟨_, Certificates.k9t8p0, Certificates.k9t8p0_check⟩
|
| 2130 |
+
|
| 2131 |
+
private theorem k9t8_cover8 : ∀ P ∈ pathPatterns 1 1 [], HasCheckedCertificate 9 8 ([[], [], [], [], [], [], []] ++ P) := by
|
| 2132 |
+
apply pathPatterns_forall_step
|
| 2133 |
+
exact by
|
| 2134 |
+
intro _
|
| 2135 |
+
exact k9t8_cover9
|
| 2136 |
+
|
| 2137 |
+
private theorem k9t8_cover10 : ∀ P ∈ pathPatterns 0 0 [1], HasCheckedCertificate 9 8 ([[], [], [], [], [], [], [1]] ++ P) := by
|
| 2138 |
+
apply pathPatterns_forall_zero
|
| 2139 |
+
exact ⟨_, Certificates.k9t8p1, Certificates.k9t8p1_check⟩
|
| 2140 |
+
|
| 2141 |
+
private theorem k9t8_cover7 : ∀ P ∈ pathPatterns 2 1 [], HasCheckedCertificate 9 8 ([[], [], [], [], [], []] ++ P) := by
|
| 2142 |
+
apply pathPatterns_forall_step
|
| 2143 |
+
exact by
|
| 2144 |
+
constructor
|
| 2145 |
+
· exact by
|
| 2146 |
+
intro _
|
| 2147 |
+
exact k9t8_cover8
|
| 2148 |
+
· intro q
|
| 2149 |
+
fin_cases q
|
| 2150 |
+
· exact by
|
| 2151 |
+
intro _
|
| 2152 |
+
exact k9t8_cover10
|
| 2153 |
+
|
| 2154 |
+
private theorem k9t8_cover11 : ∀ P ∈ pathPatterns 1 0 [1], HasCheckedCertificate 9 8 ([[], [], [], [], [], [1]] ++ P) := by
|
| 2155 |
+
apply pathPatterns_forall_step
|
| 2156 |
+
exact by
|
| 2157 |
+
intro h
|
| 2158 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 2159 |
+
|
| 2160 |
+
private theorem k9t8_cover6 : ∀ P ∈ pathPatterns 3 1 [], HasCheckedCertificate 9 8 ([[], [], [], [], []] ++ P) := by
|
| 2161 |
+
apply pathPatterns_forall_step
|
| 2162 |
+
exact by
|
| 2163 |
+
constructor
|
| 2164 |
+
· exact by
|
| 2165 |
+
intro _
|
| 2166 |
+
exact k9t8_cover7
|
| 2167 |
+
· intro q
|
| 2168 |
+
fin_cases q
|
| 2169 |
+
· exact by
|
| 2170 |
+
constructor
|
| 2171 |
+
· exact by
|
| 2172 |
+
intro _
|
| 2173 |
+
exact k9t8_cover11
|
| 2174 |
+
· intro q
|
| 2175 |
+
exact Fin.elim0 q
|
| 2176 |
+
|
| 2177 |
+
private theorem k9t8_cover12 : ∀ P ∈ pathPatterns 2 0 [1], HasCheckedCertificate 9 8 ([[], [], [], [], [1]] ++ P) := by
|
| 2178 |
+
apply pathPatterns_forall_step
|
| 2179 |
+
exact by
|
| 2180 |
+
constructor
|
| 2181 |
+
· exact by
|
| 2182 |
+
intro h
|
| 2183 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 2184 |
+
· intro q
|
| 2185 |
+
exact Fin.elim0 q
|
| 2186 |
+
|
| 2187 |
+
private theorem k9t8_cover5 : ∀ P ∈ pathPatterns 4 1 [], HasCheckedCertificate 9 8 ([[], [], [], []] ++ P) := by
|
| 2188 |
+
apply pathPatterns_forall_step
|
| 2189 |
+
exact by
|
| 2190 |
+
constructor
|
| 2191 |
+
· exact by
|
| 2192 |
+
intro _
|
| 2193 |
+
exact k9t8_cover6
|
| 2194 |
+
· intro q
|
| 2195 |
+
fin_cases q
|
| 2196 |
+
· exact by
|
| 2197 |
+
constructor
|
| 2198 |
+
· exact by
|
| 2199 |
+
intro _
|
| 2200 |
+
exact k9t8_cover12
|
| 2201 |
+
· intro q
|
| 2202 |
+
exact Fin.elim0 q
|
| 2203 |
+
|
| 2204 |
+
private theorem k9t8_cover13 : ∀ P ∈ pathPatterns 3 0 [1], HasCheckedCertificate 9 8 ([[], [], [], [1]] ++ P) := by
|
| 2205 |
+
apply pathPatterns_forall_step
|
| 2206 |
+
exact by
|
| 2207 |
+
constructor
|
| 2208 |
+
· exact by
|
| 2209 |
+
intro h
|
| 2210 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 2211 |
+
· intro q
|
| 2212 |
+
exact Fin.elim0 q
|
| 2213 |
+
|
| 2214 |
+
private theorem k9t8_cover4 : ∀ P ∈ pathPatterns 5 1 [], HasCheckedCertificate 9 8 ([[], [], []] ++ P) := by
|
| 2215 |
+
apply pathPatterns_forall_step
|
| 2216 |
+
exact by
|
| 2217 |
+
constructor
|
| 2218 |
+
· exact by
|
| 2219 |
+
intro _
|
| 2220 |
+
exact k9t8_cover5
|
| 2221 |
+
· intro q
|
| 2222 |
+
fin_cases q
|
| 2223 |
+
· exact by
|
| 2224 |
+
constructor
|
| 2225 |
+
· exact by
|
| 2226 |
+
intro _
|
| 2227 |
+
exact k9t8_cover13
|
| 2228 |
+
· intro q
|
| 2229 |
+
exact Fin.elim0 q
|
| 2230 |
+
|
| 2231 |
+
private theorem k9t8_cover14 : ∀ P ∈ pathPatterns 4 0 [1], HasCheckedCertificate 9 8 ([[], [], [1]] ++ P) := by
|
| 2232 |
+
apply pathPatterns_forall_step
|
| 2233 |
+
exact by
|
| 2234 |
+
constructor
|
| 2235 |
+
· exact by
|
| 2236 |
+
intro h
|
| 2237 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 2238 |
+
· intro q
|
| 2239 |
+
exact Fin.elim0 q
|
| 2240 |
+
|
| 2241 |
+
private theorem k9t8_cover3 : ∀ P ∈ pathPatterns 6 1 [], HasCheckedCertificate 9 8 ([[], []] ++ P) := by
|
| 2242 |
+
apply pathPatterns_forall_step
|
| 2243 |
+
exact by
|
| 2244 |
+
constructor
|
| 2245 |
+
· exact by
|
| 2246 |
+
intro _
|
| 2247 |
+
exact k9t8_cover4
|
| 2248 |
+
· intro q
|
| 2249 |
+
fin_cases q
|
| 2250 |
+
· exact by
|
| 2251 |
+
constructor
|
| 2252 |
+
· exact by
|
| 2253 |
+
intro _
|
| 2254 |
+
exact k9t8_cover14
|
| 2255 |
+
· intro q
|
| 2256 |
+
exact Fin.elim0 q
|
| 2257 |
+
|
| 2258 |
+
private theorem k9t8_cover15 : ∀ P ∈ pathPatterns 5 0 [1], HasCheckedCertificate 9 8 ([[], [1]] ++ P) := by
|
| 2259 |
+
apply pathPatterns_forall_step
|
| 2260 |
+
exact by
|
| 2261 |
+
constructor
|
| 2262 |
+
· exact by
|
| 2263 |
+
intro h
|
| 2264 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 2265 |
+
· intro q
|
| 2266 |
+
exact Fin.elim0 q
|
| 2267 |
+
|
| 2268 |
+
private theorem k9t8_cover2 : ∀ P ∈ pathPatterns 7 1 [], HasCheckedCertificate 9 8 ([[]] ++ P) := by
|
| 2269 |
+
apply pathPatterns_forall_step
|
| 2270 |
+
exact by
|
| 2271 |
+
constructor
|
| 2272 |
+
· exact by
|
| 2273 |
+
intro _
|
| 2274 |
+
exact k9t8_cover3
|
| 2275 |
+
· intro q
|
| 2276 |
+
fin_cases q
|
| 2277 |
+
· exact by
|
| 2278 |
+
constructor
|
| 2279 |
+
· exact by
|
| 2280 |
+
intro _
|
| 2281 |
+
exact k9t8_cover15
|
| 2282 |
+
· intro q
|
| 2283 |
+
exact Fin.elim0 q
|
| 2284 |
+
|
| 2285 |
+
private theorem k9t8_cover16 : ∀ P ∈ pathPatterns 6 0 [1], HasCheckedCertificate 9 8 ([[1]] ++ P) := by
|
| 2286 |
+
apply pathPatterns_forall_step
|
| 2287 |
+
exact by
|
| 2288 |
+
constructor
|
| 2289 |
+
· exact by
|
| 2290 |
+
intro h
|
| 2291 |
+
exact False.elim ((by decide : ¬ (LexLE [1] [] ∧ LexLE [] [])) h)
|
| 2292 |
+
· intro q
|
| 2293 |
+
exact Fin.elim0 q
|
| 2294 |
+
|
| 2295 |
+
private theorem k9t8_cover1 : ∀ P ∈ pathPatterns 8 1 [], HasCheckedCertificate 9 8 ([] ++ P) := by
|
| 2296 |
+
apply pathPatterns_forall_step
|
| 2297 |
+
exact by
|
| 2298 |
+
constructor
|
| 2299 |
+
· exact by
|
| 2300 |
+
intro _
|
| 2301 |
+
exact k9t8_cover2
|
| 2302 |
+
· intro q
|
| 2303 |
+
fin_cases q
|
| 2304 |
+
· exact by
|
| 2305 |
+
constructor
|
| 2306 |
+
· exact by
|
| 2307 |
+
intro _
|
| 2308 |
+
exact k9t8_cover16
|
| 2309 |
+
· intro q
|
| 2310 |
+
exact Fin.elim0 q
|
| 2311 |
+
|
| 2312 |
+
theorem coverage_k9_t8 :
|
| 2313 |
+
∀ P ∈ pathPatterns 8 1, HasCheckedCertificate 9 8 P :=
|
| 2314 |
+
k9t8_cover1
|
| 2315 |
+
|
| 2316 |
+
end CycleClique.Construction.CertifiedCoverage
|
| 2317 |
+
|
| 2318 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/CycleTwoPaths.lean
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.LongestPaths
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-! Closing two internally disjoint indexed paths into their exact cycle. -/
|
| 6 |
+
|
| 7 |
+
namespace CycleClique.Construction
|
| 8 |
+
private def twoPathLabel {V : Type*} {a b : ℕ} (_hb : 2 ≤ b)
|
| 9 |
+
(f : Fin (a + 1) → V) (g : Fin (b + 1) → V) (i : Fin (a + b)) : V :=
|
| 10 |
+
if hi : i.val ≤ a then f ⟨i.val, by omega⟩ else g ⟨i.val - a, by have := i.isLt; omega⟩
|
| 11 |
+
|
| 12 |
+
private theorem twoPathLabel_left {V : Type*} {a b : ℕ} (hb : 2 ≤ b)
|
| 13 |
+
(f : Fin (a + 1) → V) (g : Fin (b + 1) → V) {i : Fin (a + b)}
|
| 14 |
+
(hi : i.val ≤ a) : twoPathLabel hb f g i = f ⟨i.val, by omega⟩ := by
|
| 15 |
+
simp only [twoPathLabel, dite_eq_left hi]
|
| 16 |
+
|
| 17 |
+
private theorem twoPathLabel_right {V : Type*} {a b : ℕ} (hb : 2 ≤ b)
|
| 18 |
+
(f : Fin (a + 1) → V) (g : Fin (b + 1) → V) {i : Fin (a + b)}
|
| 19 |
+
(hi : a < i.val) : twoPathLabel hb f g i = g ⟨i.val - a, by have := i.isLt; omega⟩ := by
|
| 20 |
+
simp only [twoPathLabel, dite_eq_right (by omega : ¬ i.val ≤ a)]
|
| 21 |
+
|
| 22 |
+
theorem cycle_of_two_indexed_paths {V : Type*} {H : SimpleGraph V} {a b : ℕ}
|
| 23 |
+
(hb : 2 ≤ b) (f : Fin (a + 1) → V) (g : Fin (b + 1) → V)
|
| 24 |
+
(hf : IsIndexedPath H f) (hg : IsIndexedPath H g)
|
| 25 |
+
(hstart : g 0 = f (Fin.last a)) (hend : g (Fin.last b) = f 0)
|
| 26 |
+
(hdisjoint : ∀ i : Fin (b + 1), 0 < i.val → i.val < b →
|
| 27 |
+
∀ j : Fin (a + 1), f j ≠ g i) : HasCycle H (a + b) := by
|
| 28 |
+
let : NeZero b := ⟨by omega⟩
|
| 29 |
+
refine ⟨twoPathLabel hb f g, ?_, ?_⟩
|
| 30 |
+
· intro i j hij
|
| 31 |
+
apply Fin.ext
|
| 32 |
+
by_cases hi : i.val ≤ a
|
| 33 |
+
· by_cases hj : j.val ≤ a
|
| 34 |
+
· rw [twoPathLabel_left hb f g hi, twoPathLabel_left hb f g hj] at hij
|
| 35 |
+
exact congrArg (fun x : Fin (a + 1) => x.val) (hf.1 hij)
|
| 36 |
+
· rw [twoPathLabel_left hb f g hi, twoPathLabel_right hb f g (by omega)] at hij
|
| 37 |
+
exact False.elim (hdisjoint ⟨j.val - a, by have := j.isLt; omega⟩
|
| 38 |
+
(by dsimp; omega) (by dsimp; have := j.isLt; omega) _ hij)
|
| 39 |
+
· by_cases hj : j.val ≤ a
|
| 40 |
+
· rw [twoPathLabel_right hb f g (by omega), twoPathLabel_left hb f g hj] at hij
|
| 41 |
+
exact False.elim (hdisjoint ⟨i.val - a, by have := i.isLt; omega⟩
|
| 42 |
+
(by dsimp; omega) (by dsimp; have := i.isLt; omega) _ hij.symm)
|
| 43 |
+
· rw [twoPathLabel_right hb f g (by omega), twoPathLabel_right hb f g (by omega)] at hij
|
| 44 |
+
have hval := congrArg Fin.val (hg.1 hij)
|
| 45 |
+
dsimp at hval
|
| 46 |
+
omega
|
| 47 |
+
· intro i
|
| 48 |
+
by_cases hlast : i.val + 1 = a + b
|
| 49 |
+
· have hn : (cycleNext i).val = 0 := by simp [cycleNext, hlast]
|
| 50 |
+
have hleft : twoPathLabel hb f g i = g ⟨b - 1, by omega⟩ := by
|
| 51 |
+
rw [twoPathLabel_right hb f g (by omega)]
|
| 52 |
+
congr 1
|
| 53 |
+
apply Fin.ext
|
| 54 |
+
dsimp
|
| 55 |
+
omega
|
| 56 |
+
have hright : twoPathLabel hb f g (cycleNext i) = f 0 := by
|
| 57 |
+
rw [twoPathLabel_left hb f g (by omega)]
|
| 58 |
+
congr 1
|
| 59 |
+
apply Fin.ext
|
| 60 |
+
simpa only [Fin.val_zero] using hn
|
| 61 |
+
rw [hleft, hright, ← hend]
|
| 62 |
+
have h := hg.2 ⟨b - 1, by omega⟩
|
| 63 |
+
have hi : (⟨b - 1, by omega⟩ : Fin b).succ = Fin.last b := by
|
| 64 |
+
apply Fin.ext
|
| 65 |
+
change b - 1 + 1 = b
|
| 66 |
+
omega
|
| 67 |
+
rw [hi] at h
|
| 68 |
+
exact h
|
| 69 |
+
· have hn : (cycleNext i).val = i.val + 1 := Nat.mod_eq_of_lt (by have := i.isLt; omega)
|
| 70 |
+
by_cases hbefore : i.val < a
|
| 71 |
+
· let p : Fin a := ⟨i.val, hbefore⟩
|
| 72 |
+
have hleft : twoPathLabel hb f g i = f p.castSucc := by
|
| 73 |
+
rw [twoPathLabel_left hb f g (by omega)]
|
| 74 |
+
rfl
|
| 75 |
+
have hright : twoPathLabel hb f g (cycleNext i) = f p.succ := by
|
| 76 |
+
rw [twoPathLabel_left hb f g (by omega)]
|
| 77 |
+
congr 1
|
| 78 |
+
exact Fin.ext hn
|
| 79 |
+
rw [hleft, hright]
|
| 80 |
+
exact hf.2 p
|
| 81 |
+
· by_cases heq : i.val = a
|
| 82 |
+
· have hleft : twoPathLabel hb f g i = f (Fin.last a) := by
|
| 83 |
+
rw [twoPathLabel_left hb f g (by omega)]
|
| 84 |
+
congr 1
|
| 85 |
+
exact Fin.ext heq
|
| 86 |
+
have hright : twoPathLabel hb f g (cycleNext i) = g (Fin.succ (0 : Fin b)) := by
|
| 87 |
+
rw [twoPathLabel_right hb f g (by omega)]
|
| 88 |
+
congr 1
|
| 89 |
+
apply Fin.ext
|
| 90 |
+
simp only [Fin.val_succ, Fin.val_zero]
|
| 91 |
+
omega
|
| 92 |
+
rw [hleft, hright, ← hstart]
|
| 93 |
+
exact hg.2 0
|
| 94 |
+
· let p : Fin b := ⟨i.val - a, by have := i.isLt; omega⟩
|
| 95 |
+
have hleft : twoPathLabel hb f g i = g p.castSucc := by
|
| 96 |
+
rw [twoPathLabel_right hb f g (by omega)]
|
| 97 |
+
rfl
|
| 98 |
+
have hright : twoPathLabel hb f g (cycleNext i) = g p.succ := by
|
| 99 |
+
rw [twoPathLabel_right hb f g (by omega)]
|
| 100 |
+
congr 1
|
| 101 |
+
apply Fin.ext
|
| 102 |
+
dsimp [p]
|
| 103 |
+
omega
|
| 104 |
+
rw [hleft, hright]
|
| 105 |
+
exact hg.2 p
|
| 106 |
+
|
| 107 |
+
end CycleClique.Construction
|
| 108 |
+
|
| 109 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/Definitions.lean
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib.Combinatorics.SimpleGraph.Clique
|
| 2 |
+
import Mathlib.Data.Fintype.EquivFin
|
| 3 |
+
import Mathlib.Tactic
|
| 4 |
+
|
| 5 |
+
namespace OAI
|
| 6 |
+
|
| 7 |
+
/-!
|
| 8 |
+
# Exact cycle–clique Ramsey statements
|
| 9 |
+
|
| 10 |
+
The red edges are the edges of `G`; a blue clique is an independent set
|
| 11 |
+
in `G`. The cycle is a non-induced copy on exactly `m` distinct vertices.
|
| 12 |
+
For the main theorem all cycle lengths are at least three.
|
| 13 |
+
-/
|
| 14 |
+
|
| 15 |
+
namespace CycleClique.Construction
|
| 16 |
+
variable {V W : Type*}
|
| 17 |
+
|
| 18 |
+
/-- Cyclic successor, defined also for the empty index type. -/
|
| 19 |
+
def cycleNext {m : ℕ} (i : Fin m) : Fin m :=
|
| 20 |
+
⟨(i.val + 1) % m, Nat.mod_lt _ (lt_of_le_of_lt (Nat.zero_le _) i.isLt)⟩
|
| 21 |
+
|
| 22 |
+
/-- An injectively labelled cycle, including its closing edge. -/
|
| 23 |
+
def HasCycle (G : SimpleGraph V) (m : ℕ) : Prop :=
|
| 24 |
+
∃ f : Fin m → V, Function.Injective f ∧ ∀ i, G.Adj (f i) (f (cycleNext i))
|
| 25 |
+
|
| 26 |
+
/-- An independent set of exactly `n` vertices. -/
|
| 27 |
+
def HasIndependent (G : SimpleGraph V) (n : ℕ) : Prop :=
|
| 28 |
+
∃ f : Fin n → V, Function.Injective f ∧ ∀ i j, ¬ G.Adj (f i) (f j)
|
| 29 |
+
|
| 30 |
+
/-- The red-cycle/blue-clique property at order `N`. -/
|
| 31 |
+
def RamseyProperty (m n N : ℕ) : Prop :=
|
| 32 |
+
∀ G : SimpleGraph (Fin N), HasCycle G m ∨ HasIndependent G n
|
| 33 |
+
|
| 34 |
+
/-- Specifying the least forcing order avoids an existence convention for `sInf`. -/
|
| 35 |
+
def IsRamseyNumber (m n N : ℕ) : Prop :=
|
| 36 |
+
RamseyProperty m n N ∧ ∀ M < N, ¬ RamseyProperty m n M
|
| 37 |
+
|
| 38 |
+
theorem HasCycle.map {G : SimpleGraph V} {H : SimpleGraph W} {m : ℕ}
|
| 39 |
+
(h : HasCycle G m) (f : V → W) (hf : Function.Injective f)
|
| 40 |
+
(hadj : ∀ {x y}, G.Adj x y → H.Adj (f x) (f y)) : HasCycle H m := by
|
| 41 |
+
obtain ⟨c, hc, he⟩ := h
|
| 42 |
+
exact ⟨f ∘ c, hf.comp hc, fun i => hadj (he i)⟩
|
| 43 |
+
|
| 44 |
+
theorem HasIndependent.map {G : SimpleGraph V} {H : SimpleGraph W} {n : ℕ}
|
| 45 |
+
(h : HasIndependent G n) (f : V → W) (hf : Function.Injective f)
|
| 46 |
+
(hadj : ∀ {x y}, H.Adj (f x) (f y) → G.Adj x y) : HasIndependent H n := by
|
| 47 |
+
obtain ⟨c, hc, he⟩ := h
|
| 48 |
+
exact ⟨f ∘ c, hf.comp hc, fun i j h => he i j (hadj h)⟩
|
| 49 |
+
|
| 50 |
+
theorem HasIndependent.card_le [Fintype V] {G : SimpleGraph V} {n : ℕ}
|
| 51 |
+
(h : HasIndependent G n) : n ≤ Fintype.card V := by
|
| 52 |
+
obtain ⟨f, hf, _⟩ := h
|
| 53 |
+
simpa using Fintype.card_le_of_injective f hf
|
| 54 |
+
|
| 55 |
+
theorem HasCycle.card_le [Fintype V] {G : SimpleGraph V} {m : ℕ}
|
| 56 |
+
(h : HasCycle G m) : m ≤ Fintype.card V := by
|
| 57 |
+
obtain ⟨f, hf, _⟩ := h
|
| 58 |
+
simpa using Fintype.card_le_of_injective f hf
|
| 59 |
+
|
| 60 |
+
end CycleClique.Construction
|
| 61 |
+
|
| 62 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DeletedComponent.lean
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.LongestPaths
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-! Components after deleting the two common neighbours' endpoints. -/
|
| 6 |
+
|
| 7 |
+
namespace CycleClique.Construction
|
| 8 |
+
/-- A neighbour of a vertex in a component after deleting `y,z` is
|
| 9 |
+
either one of these two vertices or a neighbour in that component. -/
|
| 10 |
+
theorem deleted_component_neighbor_cover {V : Type*} {H : SimpleGraph V} {y z : V}
|
| 11 |
+
(C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent)
|
| 12 |
+
(u : C) {v : V} (h : H.Adj u.val.val v) :
|
| 13 |
+
v = y ∨ v = z ∨ ∃ w : C, C.toSimpleGraph.Adj u w ∧ w.val.val = v := by
|
| 14 |
+
by_cases hy : v = y
|
| 15 |
+
· exact Or.inl hy
|
| 16 |
+
by_cases hz : v = z
|
| 17 |
+
· exact Or.inr (Or.inl hz)
|
| 18 |
+
let w : {v : V | v ≠ y ∧ v ≠ z} := ⟨v, hy, hz⟩
|
| 19 |
+
have hadj : (H.induce {v | v ≠ y ∧ v ≠ z}).Adj u.val w := h
|
| 20 |
+
have hw := C.mem_supp_of_adj_mem_supp u.property hadj
|
| 21 |
+
exact Or.inr (Or.inr ⟨⟨w, hw⟩, hadj, rfl⟩)
|
| 22 |
+
|
| 23 |
+
theorem deleted_component_degree_loss {V : Type*} [Fintype V]
|
| 24 |
+
{H : SimpleGraph V} {y z : V}
|
| 25 |
+
(C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent) (u : C) :
|
| 26 |
+
(H.neighborSet u.val.val).ncard ≤ (C.toSimpleGraph.neighborSet u).ncard + 2 := by
|
| 27 |
+
classical
|
| 28 |
+
let f : C → V := fun v => v.val.val
|
| 29 |
+
have hf : Function.Injective f := by
|
| 30 |
+
intro a b h
|
| 31 |
+
apply Subtype.ext
|
| 32 |
+
exact Subtype.ext h
|
| 33 |
+
let N : Finset V := (C.toSimpleGraph.neighborFinset u).map ⟨f, hf⟩
|
| 34 |
+
have hsub : H.neighborFinset u.val.val ⊆ N ∪ {y, z} := by
|
| 35 |
+
intro v hv
|
| 36 |
+
have hadj := (H.mem_neighborFinset u.val.val v).mp hv
|
| 37 |
+
rcases deleted_component_neighbor_cover C u hadj with rfl | rfl | ⟨w, hw, rfl⟩
|
| 38 |
+
· simp
|
| 39 |
+
· simp
|
| 40 |
+
· exact Finset.mem_union_left _ (Finset.mem_map.mpr
|
| 41 |
+
⟨w, (C.toSimpleGraph.mem_neighborFinset u w).mpr hw, rfl⟩)
|
| 42 |
+
have hcard := (Finset.card_le_card hsub).trans (Finset.card_union_le N {y, z})
|
| 43 |
+
have hpair : ({y, z} : Finset V).card ≤ 2 := Finset.card_le_two
|
| 44 |
+
have hN : N.card = (C.toSimpleGraph.neighborFinset u).card := Finset.card_map _
|
| 45 |
+
rw [hN] at hcard
|
| 46 |
+
have hdegree : (H.neighborFinset u.val.val).card ≤
|
| 47 |
+
(C.toSimpleGraph.neighborFinset u).card + 2 := by omega
|
| 48 |
+
simpa only [SimpleGraph.card_neighborFinset_eq_degree,
|
| 49 |
+
SimpleGraph.ncard_neighborSet] using hdegree
|
| 50 |
+
|
| 51 |
+
theorem deleted_component_min_degree {V : Type*} [Fintype V]
|
| 52 |
+
{H : SimpleGraph V} {y z : V} {s : ℕ}
|
| 53 |
+
(hdegree : ∀ v, s ≤ (H.neighborSet v).ncard)
|
| 54 |
+
(C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent) :
|
| 55 |
+
∀ u : C, s - 2 ≤ (C.toSimpleGraph.neighborSet u).ncard := by
|
| 56 |
+
intro u
|
| 57 |
+
have h := deleted_component_degree_loss C u
|
| 58 |
+
have h' := hdegree u.val.val
|
| 59 |
+
omega
|
| 60 |
+
|
| 61 |
+
theorem deleted_component_cliqueNum_le {V : Type*} [Fintype V]
|
| 62 |
+
{H : SimpleGraph V} {y z : V}
|
| 63 |
+
(C : (H.induce {v | v ≠ y ∧ v ≠ z}).ConnectedComponent) :
|
| 64 |
+
C.toSimpleGraph.cliqueNum ≤ H.cliqueNum := by
|
| 65 |
+
exact ((H.induce {v | v ≠ y ∧ v ≠ z}).cliqueNum_induce_le C.supp).trans
|
| 66 |
+
(H.cliqueNum_induce_le _)
|
| 67 |
+
|
| 68 |
+
end CycleClique.Construction
|
| 69 |
+
|
| 70 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DeletionOrder.lean
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.ComponentVertices
|
| 2 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.EndpointAttachment
|
| 3 |
+
|
| 4 |
+
namespace OAI
|
| 5 |
+
|
| 6 |
+
/-! A component of the two-vertex deletion is not a clique and has order at least `2s-2`. -/
|
| 7 |
+
|
| 8 |
+
namespace CycleClique.Construction
|
| 9 |
+
theorem not_clique_of_two_deleted_neighborhoods {V : Type*} [Fintype V]
|
| 10 |
+
{H : SimpleGraph V} {U : Finset V} {y z : V} {s : ℕ}
|
| 11 |
+
(hU : U.Nonempty) (hy : y ∉ U) (hno : H.cliqueNum < s)
|
| 12 |
+
(hdegree : ∀ u ∈ U, s ≤ (H.neighborSet u).ncard)
|
| 13 |
+
(hcover : ∀ u ∈ U, ∀ v, H.Adj u v → v ∈ U ∨ v = y ∨ v = z) :
|
| 14 |
+
¬ H.IsClique (U : Set V) := by
|
| 15 |
+
classical
|
| 16 |
+
intro hclique
|
| 17 |
+
have hUbound := hclique.card_le_cliqueNum
|
| 18 |
+
have hcover' : ∀ u ∈ U, ∀ v, H.Adj u v → v ∈ (U.erase u) ∪ {y, z} := by
|
| 19 |
+
intro u hu v huv
|
| 20 |
+
rcases hcover u hu v huv with hv | rfl | rfl
|
| 21 |
+
· exact Finset.mem_union_left _ (Finset.mem_erase.mpr ⟨huv.ne.symm, hv⟩)
|
| 22 |
+
· simp
|
| 23 |
+
· simp
|
| 24 |
+
have hcard : ∀ u ∈ U, ((U.erase u) ∪ {y, z}).card ≤ U.card + 1 := by
|
| 25 |
+
intro u hu
|
| 26 |
+
have hc := Finset.card_union_le (U.erase u) {y, z}
|
| 27 |
+
have he := Finset.card_erase_add_one hu
|
| 28 |
+
have hp : ({y, z} : Finset V).card ≤ 2 := Finset.card_le_two
|
| 29 |
+
omega
|
| 30 |
+
obtain ⟨u, hu⟩ := hU
|
| 31 |
+
have hbound := degree_le_of_neighbor_cover (hcover' u hu)
|
| 32 |
+
have hc := hcard u hu
|
| 33 |
+
have hd := hdegree u hu
|
| 34 |
+
have hsize : U.card + 1 = s := by omega
|
| 35 |
+
have hadj : ∀ v ∈ U, H.Adj y v := by
|
| 36 |
+
intro v hv
|
| 37 |
+
apply SimpleGraph.Adj.symm
|
| 38 |
+
apply degree_cover_forces_neighbor (hcover' v hv)
|
| 39 |
+
(show ((U.erase v) ∪ {y, z}).card ≤ (H.neighborSet v).ncard from
|
| 40 |
+
(hcard v hv).trans (hsize.le.trans (hdegree v hv)))
|
| 41 |
+
simp
|
| 42 |
+
have hlarge := clique_extension_size hclique hy hadj
|
| 43 |
+
omega
|
| 44 |
+
|
| 45 |
+
theorem two_deleted_component_order {V : Type*} [Fintype V] [DecidableEq V]
|
| 46 |
+
{H : SimpleGraph V} {U : Finset V} {y z : V} {s : ℕ}
|
| 47 |
+
(hnotclique : ¬ H.IsClique (U : Set V))
|
| 48 |
+
(hcover : ∀ u ∈ U, ∀ v, H.Adj u v → v ∈ U ∨ v = y ∨ v = z)
|
| 49 |
+
(hexpand : ∀ a b, a ≠ b → ¬ H.Adj a b →
|
| 50 |
+
2 * s ≤ (closedNeighborhood H {a, b}).card) :
|
| 51 |
+
2 * s - 2 ≤ U.card := by
|
| 52 |
+
classical
|
| 53 |
+
have hex : ∃ a ∈ U, ∃ b ∈ U, a ≠ b ∧ ¬ H.Adj a b := by
|
| 54 |
+
by_contra hn
|
| 55 |
+
apply hnotclique
|
| 56 |
+
intro a ha b hb hab
|
| 57 |
+
by_contra hnab
|
| 58 |
+
exact hn ⟨a, ha, b, hb, hab, hnab⟩
|
| 59 |
+
obtain ⟨a, ha, b, hb, hab, hnot⟩ := hex
|
| 60 |
+
have hsub : closedNeighborhood H {a, b} ⊆ U ∪ {y, z} := by
|
| 61 |
+
intro v hv
|
| 62 |
+
rcases mem_closedNeighborhood.mp hv with hv | ⟨w, hw, hwv⟩
|
| 63 |
+
· simp only [Finset.mem_insert, Finset.mem_singleton] at hv
|
| 64 |
+
rcases hv with rfl | rfl
|
| 65 |
+
· exact Finset.mem_union_left _ ha
|
| 66 |
+
· exact Finset.mem_union_left _ hb
|
| 67 |
+
· have hwU : w ∈ U := by
|
| 68 |
+
simp only [Finset.mem_insert, Finset.mem_singleton] at hw
|
| 69 |
+
rcases hw with rfl | rfl
|
| 70 |
+
· exact ha
|
| 71 |
+
· exact hb
|
| 72 |
+
rcases hcover w hwU v hwv with hv | rfl | rfl
|
| 73 |
+
· exact Finset.mem_union_left _ hv
|
| 74 |
+
· simp
|
| 75 |
+
· simp
|
| 76 |
+
have hc := (Finset.card_le_card hsub).trans (Finset.card_union_le U {y, z})
|
| 77 |
+
have hp : ({y, z} : Finset V).card ≤ 2 := Finset.card_le_two
|
| 78 |
+
have hlow := hexpand a b hab hnot
|
| 79 |
+
omega
|
| 80 |
+
|
| 81 |
+
end CycleClique.Construction
|
| 82 |
+
|
| 83 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DenseLayers.lean
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.LayerSums
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-!
|
| 6 |
+
# A dense distance layer
|
| 7 |
+
|
| 8 |
+
The parity-union expansion and the numerical growth contradiction force
|
| 9 |
+
a dense layer among the first `s` layers. The even case is weakly dense;
|
| 10 |
+
the odd case is strictly dense, as in Proposition `clq:layer-interface`.
|
| 11 |
+
-/
|
| 12 |
+
|
| 13 |
+
namespace CycleClique.Construction
|
| 14 |
+
theorem exists_dense_distance_layer_even {V : Type*} [Fintype V]
|
| 15 |
+
{G : SimpleGraph V} {s : ℕ} (hs : 1 ≤ s)
|
| 16 |
+
(hInd : IndependenceBound G (2 * s))
|
| 17 |
+
(hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty →
|
| 18 |
+
2 * s * I.card + 1 ≤ (closedNeighborhood G I).card) (root : V) :
|
| 19 |
+
∃ i, 1 ≤ i ∧ i ≤ s ∧ (distanceLayer G root i).Nonempty ∧
|
| 20 |
+
s * (G.induce (distanceLayer G root i : Set V)).indepNum ≤
|
| 21 |
+
(distanceLayer G root i).card := by
|
| 22 |
+
classical
|
| 23 |
+
let α := fun j => (G.induce (distanceLayer G root j : Set V)).indepNum
|
| 24 |
+
let p := alternatingSum α
|
| 25 |
+
have hzero : α 0 = 1 := distanceLayer_zero_indepNum G root
|
| 26 |
+
have hpzero : p 0 = 1 := by simpa [p] using hzero
|
| 27 |
+
have hpbound : p s ≤ 2 * s := by
|
| 28 |
+
simpa [p, α, alternatingSum, parityIndices] using
|
| 29 |
+
parity_layer_independence_bound hInd root s
|
| 30 |
+
have hone := distanceLayer_one_nonempty (by omega : 1 ≤ 2 * s) hexpand root
|
| 31 |
+
by_contra hn
|
| 32 |
+
have hsmall : ∀ j, 1 ≤ j → j ≤ s → (distanceLayer G root j).Nonempty →
|
| 33 |
+
(distanceLayer G root j).card < s * α j := by
|
| 34 |
+
intro j hj hjs hne
|
| 35 |
+
by_contra h
|
| 36 |
+
exact hn ⟨j, hj, hjs, hne, (show s * α j ≤ (distanceLayer G root j).card by omega)⟩
|
| 37 |
+
apply even_layer_growth_contradiction hs p hpzero hpbound
|
| 38 |
+
intro i his
|
| 39 |
+
have hle : ∀ j ∈ Finset.range (i + 1),
|
| 40 |
+
(distanceLayer G root (j + 1)).card ≤ s * α (j + 1) := by
|
| 41 |
+
intro j hj
|
| 42 |
+
by_cases hne : (distanceLayer G root (j + 1)).Nonempty
|
| 43 |
+
· exact (hsmall (j + 1) (by omega) (by have := Finset.mem_range.mp hj; omega) hne).le
|
| 44 |
+
· rw [Finset.not_nonempty_iff_eq_empty.mp hne, Finset.card_empty]
|
| 45 |
+
exact Nat.zero_le _
|
| 46 |
+
have hsum := Finset.sum_lt_sum hle
|
| 47 |
+
(show ∃ j ∈ Finset.range (i + 1),
|
| 48 |
+
(distanceLayer G root (j + 1)).card < s * α (j + 1) from
|
| 49 |
+
⟨0, Finset.mem_range.mpr (by omega), by
|
| 50 |
+
simpa using hsmall 1 (by omega) (by omega) hone⟩)
|
| 51 |
+
have hpartition := alternatingSum_shifted_partition α hzero (i := i + 1) (by omega)
|
| 52 |
+
simp only [Nat.add_sub_cancel] at hpartition
|
| 53 |
+
rw [← Finset.mul_sum, hpartition] at hsum
|
| 54 |
+
have hexp := distanceLayer_order_sum (by omega : 1 ≤ 2 * s) hexpand root
|
| 55 |
+
(i := i + 1) (by omega)
|
| 56 |
+
simp only [Nat.add_sub_cancel] at hexp
|
| 57 |
+
exact lt_of_le_of_lt hexp hsum
|
| 58 |
+
|
| 59 |
+
theorem exists_dense_distance_layer_odd {V : Type*} [Fintype V]
|
| 60 |
+
{G : SimpleGraph V} {s : ℕ} (hs : 2 ≤ s)
|
| 61 |
+
(hInd : IndependenceBound G (2 * s + 1))
|
| 62 |
+
(hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty →
|
| 63 |
+
(2 * s + 1) * I.card + 1 ≤ (closedNeighborhood G I).card) (root : V) :
|
| 64 |
+
∃ i, 1 ≤ i ∧ i ≤ s ∧ (distanceLayer G root i).Nonempty ∧
|
| 65 |
+
s * (G.induce (distanceLayer G root i : Set V)).indepNum <
|
| 66 |
+
(distanceLayer G root i).card := by
|
| 67 |
+
classical
|
| 68 |
+
let α := fun j => (G.induce (distanceLayer G root j : Set V)).indepNum
|
| 69 |
+
let p := alternatingSum α
|
| 70 |
+
have hzero : α 0 = 1 := distanceLayer_zero_indepNum G root
|
| 71 |
+
have hpzero : p 0 = 1 := by simpa [p] using hzero
|
| 72 |
+
have hpbound : p s ≤ 2 * s + 1 := by
|
| 73 |
+
simpa [p, α, alternatingSum, parityIndices] using
|
| 74 |
+
parity_layer_independence_bound hInd root s
|
| 75 |
+
by_contra hn
|
| 76 |
+
have hsmall : ∀ j, 1 ≤ j → j ≤ s → (distanceLayer G root j).Nonempty →
|
| 77 |
+
(distanceLayer G root j).card ≤ s * α j := by
|
| 78 |
+
intro j hj hjs hne
|
| 79 |
+
by_contra h
|
| 80 |
+
exact hn ⟨j, hj, hjs, hne, (show s * α j < (distanceLayer G root j).card by omega)⟩
|
| 81 |
+
apply odd_layer_growth_contradiction hs p hpzero hpbound
|
| 82 |
+
intro i his
|
| 83 |
+
have hle : ∀ j ∈ Finset.range (i + 1),
|
| 84 |
+
(distanceLayer G root (j + 1)).card ≤ s * α (j + 1) := by
|
| 85 |
+
intro j hj
|
| 86 |
+
by_cases hne : (distanceLayer G root (j + 1)).Nonempty
|
| 87 |
+
· exact hsmall (j + 1) (by omega) (by have := Finset.mem_range.mp hj; omega) hne
|
| 88 |
+
· rw [Finset.not_nonempty_iff_eq_empty.mp hne, Finset.card_empty]
|
| 89 |
+
exact Nat.zero_le _
|
| 90 |
+
have hsum := Finset.sum_le_sum hle
|
| 91 |
+
have hpartition := alternatingSum_shifted_partition α hzero (i := i + 1) (by omega)
|
| 92 |
+
simp only [Nat.add_sub_cancel] at hpartition
|
| 93 |
+
rw [← Finset.mul_sum, hpartition] at hsum
|
| 94 |
+
have hexp := distanceLayer_order_sum (by omega : 1 ≤ 2 * s + 1) hexpand root
|
| 95 |
+
(i := i + 1) (by omega)
|
| 96 |
+
simp only [Nat.add_sub_cancel] at hexp
|
| 97 |
+
exact hexp.trans hsum
|
| 98 |
+
|
| 99 |
+
end CycleClique.Construction
|
| 100 |
+
|
| 101 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DenseSubgraph.lean
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.DenseLayers
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-!
|
| 6 |
+
# The dense layer interface
|
| 7 |
+
|
| 8 |
+
This assembles the minimum-order choice, connectivity, nonbipartiteness,
|
| 9 |
+
minimum degree, and independent-pair expansion. These are exactly the
|
| 10 |
+
properties used in the path argument in manuscript Section 3.
|
| 11 |
+
-/
|
| 12 |
+
|
| 13 |
+
namespace CycleClique.Construction
|
| 14 |
+
theorem independent_pair_finset {V : Type*} [DecidableEq V] {G : SimpleGraph V} {x y : V}
|
| 15 |
+
(hxy : ¬ G.Adj x y) : G.IsIndepSet (({x, y} : Finset V) : Set V) := by
|
| 16 |
+
classical
|
| 17 |
+
intro a ha b hb hne hadj
|
| 18 |
+
simp only [Finset.mem_coe, Finset.mem_insert, Finset.mem_singleton] at ha hb
|
| 19 |
+
rcases ha with rfl | rfl <;> rcases hb with rfl | rfl
|
| 20 |
+
· exact hne rfl
|
| 21 |
+
· exact hxy hadj
|
| 22 |
+
· exact hxy hadj.symm
|
| 23 |
+
· exact hne rfl
|
| 24 |
+
|
| 25 |
+
theorem complete_of_indepNum_le_one {V : Type*} [Fintype V]
|
| 26 |
+
{G : SimpleGraph V} (hα : G.indepNum ≤ 1) : G = ⊤ := by
|
| 27 |
+
classical
|
| 28 |
+
apply SimpleGraph.isClique_univ.mp
|
| 29 |
+
intro x _ y _ hxy
|
| 30 |
+
by_contra hn
|
| 31 |
+
have h := (independent_pair_finset hn).card_le_indepNum
|
| 32 |
+
simp only [Finset.card_pair hxy] at h
|
| 33 |
+
omega
|
| 34 |
+
|
| 35 |
+
theorem dense_indepNum_two {V : Type*} [Fintype V] [Nonempty V]
|
| 36 |
+
{G : SimpleGraph V} {s : ℕ}
|
| 37 |
+
(hclique : G.cliqueNum < s) (hdense : s * G.indepNum ≤ Fintype.card V) :
|
| 38 |
+
2 ≤ G.indepNum := by
|
| 39 |
+
classical
|
| 40 |
+
have hpos := indepNum_pos_of_nonempty G
|
| 41 |
+
by_contra hn
|
| 42 |
+
have htop := complete_of_indepNum_le_one (G := G) (by omega)
|
| 43 |
+
have hfull : G.IsClique ((Finset.univ : Finset V) : Set V) := by rw [htop]; simp
|
| 44 |
+
have hc := hfull.card_le_cliqueNum
|
| 45 |
+
simp only [Finset.card_univ] at hc
|
| 46 |
+
have hmul := Nat.mul_le_mul_left s hpos
|
| 47 |
+
simp only [Nat.mul_one] at hmul
|
| 48 |
+
omega
|
| 49 |
+
|
| 50 |
+
/-- Full even-parameter layer interface. -/
|
| 51 |
+
theorem dense_layer_interface_even {V : Type*} [Fintype V] [DecidableEq V]
|
| 52 |
+
{G : SimpleGraph V} {s : ℕ} (hs : 4 ≤ s)
|
| 53 |
+
(hclique : G.cliqueNum < s) (hInd : IndependenceBound G (2 * s))
|
| 54 |
+
(hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty →
|
| 55 |
+
2 * s * I.card + 1 ≤ (closedNeighborhood G I).card) (root : V) :
|
| 56 |
+
∃ i, 1 ≤ i ∧ i ≤ s ∧ ∃ Y : Finset V,
|
| 57 |
+
Y ⊆ distanceLayer G root i ∧ Y.Nonempty ∧
|
| 58 |
+
(G.induce (Y : Set V)).Connected ∧
|
| 59 |
+
¬ (G.induce (Y : Set V)).IsBipartite ∧ 2 * s ≤ Y.card ∧
|
| 60 |
+
(∀ v : Y, s ≤ ((G.induce (Y : Set V)).neighborSet v).ncard) ∧
|
| 61 |
+
(∀ u v : Y, u ≠ v → ¬ G.Adj u.val v.val →
|
| 62 |
+
2 * s ≤ (closedNeighborhood (G.induce (Y : Set V)) {u, v}).card) := by
|
| 63 |
+
classical
|
| 64 |
+
obtain ⟨i, hi, his, hD, hdense⟩ := exists_dense_distance_layer_even
|
| 65 |
+
(by omega) hInd hexpand root
|
| 66 |
+
obtain ⟨Y, hYD, hYne, hYdense, hYmin⟩ := exists_minimal_dense_even _ hD hdense
|
| 67 |
+
let : Nonempty Y := hYne.to_subtype
|
| 68 |
+
let H := G.induce (Y : Set V)
|
| 69 |
+
have hcard : Fintype.card Y = Y.card := Fintype.card_coe _
|
| 70 |
+
have hdense' : s * H.indepNum ≤ Fintype.card Y := by simpa [hcard] using hYdense
|
| 71 |
+
have hmin : ∀ Z : Finset Y, Z.Nonempty → Z.card < Fintype.card Y →
|
| 72 |
+
Z.card < s * (H.induce (Z : Set Y)).indepNum := by
|
| 73 |
+
simpa only [hcard] using hYmin
|
| 74 |
+
have hconn := minimal_dense_connected_even hdense' hmin
|
| 75 |
+
have hnonbip := dense_nonbipartite (by omega) hdense'
|
| 76 |
+
have hHclique : H.cliqueNum < s := (G.cliqueNum_induce_le _).trans_lt hclique
|
| 77 |
+
have hα := dense_indepNum_two hHclique hdense'
|
| 78 |
+
have horder : 2 * s ≤ Fintype.card Y := by nlinarith
|
| 79 |
+
have hdegree : ∀ v : Y, s ≤ (H.neighborSet v).ncard := by
|
| 80 |
+
apply dense_expansion_degree (by omega) horder
|
| 81 |
+
intro v hv
|
| 82 |
+
have h := (minimal_dense_expansion_even hdense' hmin {v} (by simp) (by simp)).2 hv
|
| 83 |
+
simpa using h
|
| 84 |
+
have hpair : ∀ u v : Y, u ≠ v → ¬ G.Adj u.val v.val →
|
| 85 |
+
2 * s ≤ (closedNeighborhood H {u, v}).card := by
|
| 86 |
+
intro u v huv hnot
|
| 87 |
+
have h := (minimal_dense_expansion_even hdense' hmin {u, v}
|
| 88 |
+
(independent_pair_finset hnot) (by simp)).1
|
| 89 |
+
simpa only [Finset.card_pair huv, Nat.mul_comm s 2] using h
|
| 90 |
+
refine ⟨i, hi, his, Y, hYD, hYne, hconn, hnonbip, ?_, hdegree, hpair⟩
|
| 91 |
+
simpa only [hcard] using horder
|
| 92 |
+
|
| 93 |
+
/-- Full odd-parameter layer interface. -/
|
| 94 |
+
theorem dense_layer_interface_odd {V : Type*} [Fintype V] [DecidableEq V]
|
| 95 |
+
{G : SimpleGraph V} {s : ℕ} (hs : 4 ≤ s)
|
| 96 |
+
(hclique : G.cliqueNum < s) (hInd : IndependenceBound G (2 * s + 1))
|
| 97 |
+
(hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty →
|
| 98 |
+
(2 * s + 1) * I.card + 1 ≤ (closedNeighborhood G I).card) (root : V) :
|
| 99 |
+
∃ i, 1 ≤ i ∧ i ≤ s ∧ ∃ Y : Finset V,
|
| 100 |
+
Y ⊆ distanceLayer G root i ∧ Y.Nonempty ∧
|
| 101 |
+
(G.induce (Y : Set V)).Connected ∧
|
| 102 |
+
¬ (G.induce (Y : Set V)).IsBipartite ∧ 2 * s + 1 ≤ Y.card ∧
|
| 103 |
+
(∀ v : Y, s ≤ ((G.induce (Y : Set V)).neighborSet v).ncard) ∧
|
| 104 |
+
(∀ u v : Y, u ≠ v → ¬ G.Adj u.val v.val →
|
| 105 |
+
2 * s ≤ (closedNeighborhood (G.induce (Y : Set V)) {u, v}).card) := by
|
| 106 |
+
classical
|
| 107 |
+
obtain ⟨i, hi, his, hD, hdense⟩ := exists_dense_distance_layer_odd
|
| 108 |
+
(by omega) hInd hexpand root
|
| 109 |
+
obtain ⟨Y, hYD, hYne, hYdense, hYmin⟩ := exists_minimal_dense_odd _ hD hdense
|
| 110 |
+
let : Nonempty Y := hYne.to_subtype
|
| 111 |
+
let H := G.induce (Y : Set V)
|
| 112 |
+
have hcard : Fintype.card Y = Y.card := Fintype.card_coe _
|
| 113 |
+
have hdense' : s * H.indepNum < Fintype.card Y := by simpa [hcard] using hYdense
|
| 114 |
+
have hmin : ∀ Z : Finset Y, Z.Nonempty → Z.card < Fintype.card Y →
|
| 115 |
+
Z.card ≤ s * (H.induce (Z : Set Y)).indepNum := by
|
| 116 |
+
simpa only [hcard] using hYmin
|
| 117 |
+
have hconn := minimal_dense_connected_odd hdense' hmin
|
| 118 |
+
have hnonbip := dense_nonbipartite (by omega) hdense'.le
|
| 119 |
+
have hHclique : H.cliqueNum < s := (G.cliqueNum_induce_le _).trans_lt hclique
|
| 120 |
+
have hα := dense_indepNum_two hHclique hdense'.le
|
| 121 |
+
have horder : 2 * s + 1 ≤ Fintype.card Y := by nlinarith
|
| 122 |
+
have hdegree : ∀ v : Y, s ≤ (H.neighborSet v).ncard := by
|
| 123 |
+
apply dense_expansion_degree (by omega) (by omega)
|
| 124 |
+
intro v _
|
| 125 |
+
have h := minimal_dense_expansion_odd hdense' hmin {v} (by simp) (by simp)
|
| 126 |
+
simpa using h
|
| 127 |
+
have hpair : ∀ u v : Y, u ≠ v → ¬ G.Adj u.val v.val →
|
| 128 |
+
2 * s ≤ (closedNeighborhood H {u, v}).card := by
|
| 129 |
+
intro u v huv hnot
|
| 130 |
+
have h := minimal_dense_expansion_odd hdense' hmin {u, v}
|
| 131 |
+
(independent_pair_finset hnot) (by simp)
|
| 132 |
+
simp only [Finset.card_pair huv, Nat.mul_comm s 2] at h
|
| 133 |
+
omega
|
| 134 |
+
refine ⟨i, hi, his, Y, hYD, hYne, hconn, hnonbip, ?_, hdegree, hpair⟩
|
| 135 |
+
simpa only [hcard] using horder
|
| 136 |
+
|
| 137 |
+
end CycleClique.Construction
|
| 138 |
+
|
| 139 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/DistanceLayers.lean
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.LayerSelection
|
| 2 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.IndependentPacking
|
| 3 |
+
import Mathlib.Combinatorics.SimpleGraph.Metric
|
| 4 |
+
|
| 5 |
+
namespace OAI
|
| 6 |
+
|
| 7 |
+
/-!
|
| 8 |
+
# Distance layers and independent parity unions
|
| 9 |
+
|
| 10 |
+
Distance layers are restricted to the root's connected component.
|
| 11 |
+
Vertices in different layers of the same parity are anticomplete, so
|
| 12 |
+
maximum independent sets chosen there can be combined.
|
| 13 |
+
-/
|
| 14 |
+
|
| 15 |
+
namespace CycleClique.Construction
|
| 16 |
+
noncomputable def independentOn {V : Type*} [Fintype V]
|
| 17 |
+
(G : SimpleGraph V) (D : Finset V) : Finset V := by
|
| 18 |
+
classical
|
| 19 |
+
exact (Classical.choose (G.induce (D : Set V)).exists_isNIndepSet_indepNum).map
|
| 20 |
+
⟨Subtype.val, Subtype.val_injective⟩
|
| 21 |
+
|
| 22 |
+
theorem independentOn_subset {V : Type*} [Fintype V]
|
| 23 |
+
(G : SimpleGraph V) (D : Finset V) : independentOn G D ⊆ D := by
|
| 24 |
+
classical
|
| 25 |
+
intro x hx
|
| 26 |
+
obtain ⟨i, _, rfl⟩ := Finset.mem_map.mp hx
|
| 27 |
+
exact i.property
|
| 28 |
+
|
| 29 |
+
theorem independentOn_independent {V : Type*} [Fintype V]
|
| 30 |
+
(G : SimpleGraph V) (D : Finset V) : G.IsIndepSet (independentOn G D : Set V) := by
|
| 31 |
+
classical
|
| 32 |
+
intro x hx y hy hxy h
|
| 33 |
+
obtain ⟨i, hi, rfl⟩ := Finset.mem_map.mp hx
|
| 34 |
+
obtain ⟨j, hj, rfl⟩ := Finset.mem_map.mp hy
|
| 35 |
+
exact (Classical.choose_spec (G.induce (D : Set V)).exists_isNIndepSet_indepNum).isIndepSet
|
| 36 |
+
hi hj (fun h => hxy (congrArg Subtype.val h)) h
|
| 37 |
+
|
| 38 |
+
theorem independentOn_card {V : Type*} [Fintype V]
|
| 39 |
+
(G : SimpleGraph V) (D : Finset V) :
|
| 40 |
+
(independentOn G D).card = (G.induce (D : Set V)).indepNum := by
|
| 41 |
+
classical
|
| 42 |
+
rw [independentOn, Finset.card_map]
|
| 43 |
+
exact (Classical.choose_spec (G.induce (D : Set V)).exists_isNIndepSet_indepNum).card_eq
|
| 44 |
+
|
| 45 |
+
/-- The exact-distance layer within the root component. -/
|
| 46 |
+
noncomputable def distanceLayer {V : Type*} [Fintype V]
|
| 47 |
+
(G : SimpleGraph V) (root : V) (j : ℕ) : Finset V := by
|
| 48 |
+
classical
|
| 49 |
+
exact Finset.univ.filter fun v => G.Reachable root v ∧ G.dist root v = j
|
| 50 |
+
|
| 51 |
+
@[simp] theorem mem_distanceLayer {V : Type*} [Fintype V]
|
| 52 |
+
{G : SimpleGraph V} {root v : V} {j : ℕ} :
|
| 53 |
+
v ∈ distanceLayer G root j ↔ G.Reachable root v ∧ G.dist root v = j := by
|
| 54 |
+
classical
|
| 55 |
+
simp [distanceLayer]
|
| 56 |
+
|
| 57 |
+
theorem distanceLayer_zero {V : Type*} [Fintype V] (G : SimpleGraph V) (root : V) :
|
| 58 |
+
distanceLayer G root 0 = {root} := by
|
| 59 |
+
classical
|
| 60 |
+
ext v
|
| 61 |
+
simp only [mem_distanceLayer, Finset.mem_singleton]
|
| 62 |
+
constructor
|
| 63 |
+
· rintro ⟨hr, hd⟩
|
| 64 |
+
rcases G.dist_eq_zero_iff_eq_or_not_reachable.mp hd with h | h
|
| 65 |
+
· exact h.symm
|
| 66 |
+
· exact False.elim (h hr)
|
| 67 |
+
· rintro rfl
|
| 68 |
+
simp
|
| 69 |
+
|
| 70 |
+
theorem distanceLayers_disjoint {V : Type*} [Fintype V]
|
| 71 |
+
(G : SimpleGraph V) (root : V) {i j : ℕ} (hij : i ≠ j) :
|
| 72 |
+
Disjoint (distanceLayer G root i) (distanceLayer G root j) := by
|
| 73 |
+
classical
|
| 74 |
+
apply Finset.disjoint_left.mpr
|
| 75 |
+
intro v hv hi
|
| 76 |
+
exact hij ((mem_distanceLayer.mp hv).2.symm.trans (mem_distanceLayer.mp hi).2)
|
| 77 |
+
|
| 78 |
+
/-- Distinct layers of one parity have no edges between them. -/
|
| 79 |
+
theorem same_parity_layers_anticomplete {V : Type*} [Fintype V]
|
| 80 |
+
{G : SimpleGraph V} {root : V} {i j : ℕ} (hij : i ≠ j) (hparity : i % 2 = j % 2)
|
| 81 |
+
{x y : V} (hx : x ∈ distanceLayer G root i) (hy : y ∈ distanceLayer G root j) :
|
| 82 |
+
¬ G.Adj x y := by
|
| 83 |
+
intro h
|
| 84 |
+
have hdiff := h.diff_dist_adj (u := root)
|
| 85 |
+
rw [(mem_distanceLayer.mp hx).2, (mem_distanceLayer.mp hy).2] at hdiff
|
| 86 |
+
omega
|
| 87 |
+
|
| 88 |
+
/-- Neighbours of a vertex in layer `i` belong to one of the first
|
| 89 |
+
`i + 2` layers. -/
|
| 90 |
+
theorem distanceLayer_neighbor_le {V : Type*} [Fintype V]
|
| 91 |
+
{G : SimpleGraph V} {root x y : V} {i : ℕ}
|
| 92 |
+
(hx : x ∈ distanceLayer G root i) (hxy : G.Adj x y) :
|
| 93 |
+
∃ j ≤ i + 1, y ∈ distanceLayer G root j := by
|
| 94 |
+
have hx' := mem_distanceLayer.mp hx
|
| 95 |
+
refine ⟨G.dist root y, ?_, mem_distanceLayer.mpr ⟨hx'.1.trans hxy.reachable, rfl⟩⟩
|
| 96 |
+
have hdiff := hxy.diff_dist_adj (u := root)
|
| 97 |
+
rw [hx'.2] at hdiff
|
| 98 |
+
omega
|
| 99 |
+
|
| 100 |
+
/-- Alternating maximum-independent-set sums are at most the ambient
|
| 101 |
+
independence bound. -/
|
| 102 |
+
theorem parity_layer_independence_bound {V : Type*} [Fintype V]
|
| 103 |
+
{G : SimpleGraph V} {k : ℕ} (hbound : IndependenceBound G k) (root : V) (i : ℕ) :
|
| 104 |
+
∑ j ∈ (Finset.range (i + 1)).filter (fun j => j % 2 = i % 2),
|
| 105 |
+
(G.induce (distanceLayer G root j : Set V)).indepNum ≤ k := by
|
| 106 |
+
classical
|
| 107 |
+
let F := (Finset.range (i + 1)).filter (fun j => j % 2 = i % 2)
|
| 108 |
+
let I := fun j => independentOn G (distanceLayer G root j)
|
| 109 |
+
have hind : ∀ j ∈ F, G.IsIndepSet (I j : Set V) := fun j _ => independentOn_independent _ _
|
| 110 |
+
have hdis : (F : Set ℕ).PairwiseDisjoint I := by
|
| 111 |
+
intro j _ l _ hjl
|
| 112 |
+
exact (distanceLayers_disjoint G root hjl).mono
|
| 113 |
+
(independentOn_subset _ _) (independentOn_subset _ _)
|
| 114 |
+
have hanti : ∀ j ∈ F, ∀ l ∈ F, j ≠ l → ∀ x ∈ I j, ∀ y ∈ I l, ¬ G.Adj x y := by
|
| 115 |
+
intro j hj l hl hjl x hx y hy
|
| 116 |
+
apply same_parity_layers_anticomplete hjl
|
| 117 |
+
(((Finset.mem_filter.mp hj).2).trans (Finset.mem_filter.mp hl).2.symm)
|
| 118 |
+
· exact independentOn_subset _ _ hx
|
| 119 |
+
· exact independentOn_subset _ _ hy
|
| 120 |
+
have h := independent_packing hbound F I hind hdis hanti
|
| 121 |
+
simpa only [I, independentOn_card] using h
|
| 122 |
+
|
| 123 |
+
end CycleClique.Construction
|
| 124 |
+
|
| 125 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointAllowedAttachment.lean
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.EndpointFullAttachment
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-! Attachment conclusions restricted to neighbours in the longest path's vertex set. -/
|
| 6 |
+
|
| 7 |
+
namespace CycleClique.Construction
|
| 8 |
+
theorem endpoint_attachment_vertex_of_prefix_preserved {V : Type*} [Fintype V]
|
| 9 |
+
{H : SimpleGraph V} {x w v : V} {W : Finset V} {r : ℕ}
|
| 10 |
+
{f g : Fin (r + 1) → V} (hf : IsSpanningPath H x W f) (t : Fin r)
|
| 11 |
+
(hfinal : ∀ i : Fin (r + 1), f i ∈ pathEnds H x W r ↔ t.val < i.val)
|
| 12 |
+
(hg : IsSpanningPath H x W g) (hglast : g (Fin.last r) = w)
|
| 13 |
+
(hfix : ∀ j : Fin (r + 1), j.val ≤ t.val → g j = f j)
|
| 14 |
+
(hvW : v ∈ W) (hwv : H.Adj w v) :
|
| 15 |
+
v ∈ pathEnds H x W r ∨ v = f t.castSucc := by
|
| 16 |
+
by_cases hv : v ∈ pathEnds H x W r
|
| 17 |
+
· exact Or.inl hv
|
| 18 |
+
· right
|
| 19 |
+
have hvW' : v ∈ (W : Set V) := hvW
|
| 20 |
+
rw [← hf.2.2.2] at hvW'
|
| 21 |
+
obtain ⟨j, hjv⟩ := hvW'
|
| 22 |
+
have hjbefore : j.val ≤ t.val := by
|
| 23 |
+
by_contra hn
|
| 24 |
+
exact hv (hjv ▸ (hfinal j).mpr (by omega))
|
| 25 |
+
by_cases heq : j.val = t.val
|
| 26 |
+
· have hj : j = t.castSucc := Fin.ext heq
|
| 27 |
+
exact hjv.symm.trans (congrArg f hj)
|
| 28 |
+
· let p : Fin r := ⟨j.val, by have := t.isLt; omega⟩
|
| 29 |
+
have hgp : g p.castSucc = v := (hfix p.castSucc (by dsimp [p]; omega)).trans
|
| 30 |
+
((congrArg f (Fin.ext rfl)).trans hjv)
|
| 31 |
+
have hrot := successor_mem_pathEnds hg p (by rw [hglast, hgp]; exact hwv)
|
| 32 |
+
rw [hfix p.succ (by dsimp [p]; omega)] at hrot
|
| 33 |
+
have hbound := (hfinal p.succ).mp hrot
|
| 34 |
+
dsimp [p] at hbound
|
| 35 |
+
omega
|
| 36 |
+
|
| 37 |
+
theorem partial_endpoint_attachment_in_W {V : Type*} [Fintype V]
|
| 38 |
+
{H : SimpleGraph V} {x w v : V} {W : Finset V} {r : ℕ}
|
| 39 |
+
{f : Fin (r + 1) → V} (hf : IsSpanningPath H x W f) (t : Fin r)
|
| 40 |
+
(hfinal : ∀ i : Fin (r + 1), f i ∈ pathEnds H x W r ↔ t.val < i.val)
|
| 41 |
+
(hclique : H.IsClique (pathEnds H x W r : Set V))
|
| 42 |
+
(hw : w ∈ pathEnds H x W r) (hne : w ≠ f t.succ)
|
| 43 |
+
(hvW : v ∈ W) (hwv : H.Adj w v) :
|
| 44 |
+
v ∈ pathEnds H x W r ∨ v = f t.castSucc := by
|
| 45 |
+
have hwW : w ∈ (W : Set V) := pathEnds_subset H x W r hw
|
| 46 |
+
rw [← hf.2.2.2] at hwW
|
| 47 |
+
obtain ⟨i, hiw⟩ := hwW
|
| 48 |
+
have hitail : t.val < i.val := (hfinal i).mp (hiw ▸ hw)
|
| 49 |
+
have hi : t.val + 1 < i.val := by
|
| 50 |
+
have hneq : i ≠ t.succ := fun h => hne (hiw.symm.trans (congrArg f h))
|
| 51 |
+
have hval : i.val ≠ t.val + 1 := fun h => hneq (Fin.ext h)
|
| 52 |
+
omega
|
| 53 |
+
obtain ⟨g, hg, hlast, hfix⟩ := spanningPath_swap_tail hf t hfinal hclique i hi
|
| 54 |
+
apply endpoint_attachment_vertex_of_prefix_preserved hf t hfinal hg (hlast.trans hiw)
|
| 55 |
+
(fun j hj => hfix j (by omega)) hvW hwv
|
| 56 |
+
|
| 57 |
+
theorem full_endpoint_attachment_in_W {V : Type*} [Fintype V]
|
| 58 |
+
{H : SimpleGraph V} {x w v : V} {W : Finset V} {r : ℕ}
|
| 59 |
+
{f : Fin (r + 1) → V} (hf : IsSpanningPath H x W f) (t : Fin r)
|
| 60 |
+
(hfinal : ∀ i : Fin (r + 1), f i ∈ pathEnds H x W r ↔ t.val < i.val)
|
| 61 |
+
(hclique : H.IsClique (pathEnds H x W r : Set V))
|
| 62 |
+
(hsecond : ∃ w ∈ pathEnds H x W r,
|
| 63 |
+
w ≠ f t.succ ∧ H.Adj (f t.castSucc) w)
|
| 64 |
+
(hw : w ∈ pathEnds H x W r) (hvW : v ∈ W) (hwv : H.Adj w v) :
|
| 65 |
+
v ∈ pathEnds H x W r ∨ v = f t.castSucc := by
|
| 66 |
+
by_cases heq : w = f t.succ
|
| 67 |
+
· subst w
|
| 68 |
+
obtain ⟨w₁, hw₁, hne, hadj⟩ := hsecond
|
| 69 |
+
obtain ⟨g, hg, hlast, hfix⟩ := spanningPath_first_tail_last hf t hfinal hclique hw₁ hne hadj
|
| 70 |
+
exact endpoint_attachment_vertex_of_prefix_preserved hf t hfinal hg hlast hfix hvW hwv
|
| 71 |
+
· exact partial_endpoint_attachment_in_W hf t hfinal hclique hw heq hvW hwv
|
| 72 |
+
|
| 73 |
+
end CycleClique.Construction
|
| 74 |
+
|
| 75 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointAttachment.lean
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.EndpointTail
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-! The degree calculations forcing a second attachment and a common neighbour. -/
|
| 6 |
+
|
| 7 |
+
namespace CycleClique.Construction
|
| 8 |
+
theorem degree_le_of_neighbor_cover {V : Type*} [Fintype V]
|
| 9 |
+
{H : SimpleGraph V} {v : V} {S : Finset V}
|
| 10 |
+
(hcover : ∀ w, H.Adj v w → w ∈ S) : (H.neighborSet v).ncard ≤ S.card := by
|
| 11 |
+
classical
|
| 12 |
+
have hsub : H.neighborFinset v ⊆ S := fun w hw =>
|
| 13 |
+
hcover w ((H.mem_neighborFinset v w).mp hw)
|
| 14 |
+
simpa only [SimpleGraph.ncard_neighborSet,
|
| 15 |
+
SimpleGraph.card_neighborFinset_eq_degree] using Finset.card_le_card hsub
|
| 16 |
+
|
| 17 |
+
theorem degree_cover_forces_neighbor {V : Type*} [Fintype V]
|
| 18 |
+
{H : SimpleGraph V} {v w : V} {S : Finset V}
|
| 19 |
+
(hcover : ∀ a, H.Adj v a → a ∈ S)
|
| 20 |
+
(hdegree : S.card ≤ (H.neighborSet v).ncard) (hw : w ∈ S) : H.Adj v w := by
|
| 21 |
+
classical
|
| 22 |
+
have hsub : H.neighborFinset v ⊆ S := fun a ha =>
|
| 23 |
+
hcover a ((H.mem_neighborFinset v a).mp ha)
|
| 24 |
+
have hcard : S.card ≤ (H.neighborFinset v).card := by
|
| 25 |
+
simpa only [SimpleGraph.ncard_neighborSet,
|
| 26 |
+
SimpleGraph.card_neighborFinset_eq_degree] using hdegree
|
| 27 |
+
have heq := Finset.eq_of_subset_of_card_le hsub hcard
|
| 28 |
+
exact (H.mem_neighborFinset v w).mp (heq.symm ▸ hw)
|
| 29 |
+
|
| 30 |
+
theorem clique_extension_size {V : Type*} [Fintype V] [DecidableEq V]
|
| 31 |
+
{H : SimpleGraph V} {E : Finset V} {u : V}
|
| 32 |
+
(hclique : H.IsClique (E : Set V)) (hu : u ∉ E)
|
| 33 |
+
(hadj : ∀ w ∈ E, H.Adj u w) : E.card + 1 ≤ H.cliqueNum := by
|
| 34 |
+
have hQ : H.IsClique ((insert u E : Finset V) : Set V) := by
|
| 35 |
+
rw [Finset.coe_insert]
|
| 36 |
+
exact hclique.insert (fun w hw _ => hadj w hw)
|
| 37 |
+
have h := hQ.card_le_cliqueNum
|
| 38 |
+
simpa only [Finset.card_insert_of_notMem hu] using h
|
| 39 |
+
|
| 40 |
+
private theorem erased_pair_cover_card {V : Type*} [DecidableEq V]
|
| 41 |
+
{E : Finset V} {w y z : V} (hw : w ∈ E) :
|
| 42 |
+
((E.erase w) ∪ {y, z}).card ≤ E.card + 1 := by
|
| 43 |
+
have h := Finset.card_union_le (E.erase w) {y, z}
|
| 44 |
+
have he := Finset.card_erase_add_one hw
|
| 45 |
+
have hp : ({y, z} : Finset V).card ≤ 2 := Finset.card_le_two
|
| 46 |
+
omega
|
| 47 |
+
|
| 48 |
+
/-- The attachment vertex has a second neighbour in the endpoint
|
| 49 |
+
clique; this is the two-case degree calculation in the manuscript. -/
|
| 50 |
+
theorem endpoint_second_attachment {V : Type*} [Fintype V] [DecidableEq V]
|
| 51 |
+
{H : SimpleGraph V} {E : Finset V} {u w₀ y z : V} {s : ℕ}
|
| 52 |
+
(hs : 4 ≤ s) (hsize : s - 2 ≤ E.card ∧ E.card ≤ s - 1)
|
| 53 |
+
(hclique : H.IsClique (E : Set V)) (hno : H.cliqueNum < s)
|
| 54 |
+
(hy : y ∉ E) (hz : z ∉ E) (hw₀ : w₀ ∈ E)
|
| 55 |
+
(hdegree : ∀ w ∈ E, s ≤ (H.neighborSet w).ncard)
|
| 56 |
+
(hpartial : ∀ w ∈ E, w ≠ w₀ → ∀ v, H.Adj w v →
|
| 57 |
+
v ∈ (E.erase w) ∪ {u, y, z})
|
| 58 |
+
(hzero : ¬ H.Adj w₀ y → ¬ H.Adj w₀ z → (H.neighborSet w₀).ncard ≤ E.card) :
|
| 59 |
+
∃ w ∈ E, w ≠ w₀ ∧ H.Adj u w := by
|
| 60 |
+
classical
|
| 61 |
+
by_contra hn
|
| 62 |
+
have hnotu : ∀ w ∈ E, w ≠ w₀ → ¬ H.Adj w u := by
|
| 63 |
+
intro w hw hne hwu
|
| 64 |
+
exact hn ⟨w, hw, hne, hwu.symm⟩
|
| 65 |
+
have hcover : ∀ w ∈ E, w ≠ w₀ → ∀ v, H.Adj w v →
|
| 66 |
+
v ∈ (E.erase w) ∪ {y, z} := by
|
| 67 |
+
intro w hw hne v hwv
|
| 68 |
+
rcases Finset.mem_union.mp (hpartial w hw hne v hwv) with hv | hv
|
| 69 |
+
· exact Finset.mem_union_left _ hv
|
| 70 |
+
· simp only [Finset.mem_insert, Finset.mem_singleton] at hv
|
| 71 |
+
rcases hv with rfl | rfl | rfl
|
| 72 |
+
· exact False.elim (hnotu w hw hne hwv)
|
| 73 |
+
· simp
|
| 74 |
+
· simp
|
| 75 |
+
by_cases hsmall : E.card = s - 2
|
| 76 |
+
· obtain ⟨w, hw, hne⟩ := Finset.exists_mem_ne (by omega : 1 < E.card) w₀
|
| 77 |
+
have hbound := degree_le_of_neighbor_cover (hcover w hw hne)
|
| 78 |
+
have hcard := erased_pair_cover_card (y := y) (z := z) hw
|
| 79 |
+
have hlow := hdegree w hw
|
| 80 |
+
omega
|
| 81 |
+
· have hlarge : E.card = s - 1 := by omega
|
| 82 |
+
have hboth : ∀ w ∈ E, w ≠ w₀ → H.Adj w y ∧ H.Adj w z := by
|
| 83 |
+
intro w hw hne
|
| 84 |
+
have hc := erased_pair_cover_card (y := y) (z := z) hw
|
| 85 |
+
have hd := hdegree w hw
|
| 86 |
+
have hforce : ∀ a ∈ (E.erase w) ∪ {y, z}, H.Adj w a := fun a ha =>
|
| 87 |
+
degree_cover_forces_neighbor (hcover w hw hne)
|
| 88 |
+
(show ((E.erase w) ∪ {y, z}).card ≤ (H.neighborSet w).ncard by omega) ha
|
| 89 |
+
exact ⟨hforce y (by simp), hforce z (by simp)⟩
|
| 90 |
+
have hsome : H.Adj w₀ y ∨ H.Adj w₀ z := by
|
| 91 |
+
by_contra hn
|
| 92 |
+
have hny : ¬ H.Adj w₀ y := fun h => hn (Or.inl h)
|
| 93 |
+
have hnz : ¬ H.Adj w₀ z := fun h => hn (Or.inr h)
|
| 94 |
+
have h := hzero hny hnz
|
| 95 |
+
have h' := hdegree w₀ hw₀
|
| 96 |
+
omega
|
| 97 |
+
rcases hsome with hwy | hwz
|
| 98 |
+
· have hadj : ∀ w ∈ E, H.Adj y w := by
|
| 99 |
+
intro w hw
|
| 100 |
+
by_cases heq : w = w₀
|
| 101 |
+
· subst w; exact hwy.symm
|
| 102 |
+
· exact (hboth w hw heq).1.symm
|
| 103 |
+
have h := clique_extension_size hclique hy hadj
|
| 104 |
+
omega
|
| 105 |
+
· have hadj : ∀ w ∈ E, H.Adj z w := by
|
| 106 |
+
intro w hw
|
| 107 |
+
by_cases heq : w = w₀
|
| 108 |
+
· subst w; exact hwz.symm
|
| 109 |
+
· exact (hboth w hw heq).2.symm
|
| 110 |
+
have h := clique_extension_size hclique hz hadj
|
| 111 |
+
omega
|
| 112 |
+
|
| 113 |
+
/-- Once all endpoints attach only through `u`, one endpoint sees both
|
| 114 |
+
deleted vertices. -/
|
| 115 |
+
theorem endpoint_common_deleted_neighbor {V : Type*} [Fintype V] [DecidableEq V]
|
| 116 |
+
{H : SimpleGraph V} {E : Finset V} {u y z : V} {s : ℕ}
|
| 117 |
+
(hs : 4 ≤ s) (hsize : s - 2 ≤ E.card ∧ E.card ≤ s - 1)
|
| 118 |
+
(hclique : H.IsClique (E : Set V)) (hno : H.cliqueNum < s) (hu : u ∉ E)
|
| 119 |
+
(hdegree : ∀ w ∈ E, s ≤ (H.neighborSet w).ncard)
|
| 120 |
+
(hcover : ∀ w ∈ E, ∀ v, H.Adj w v → v ∈ (E.erase w) ∪ {u, y, z}) :
|
| 121 |
+
∃ w ∈ E, H.Adj w y ∧ H.Adj w z := by
|
| 122 |
+
classical
|
| 123 |
+
by_cases hsmall : E.card = s - 2
|
| 124 |
+
· obtain ⟨w, hw⟩ := Finset.card_pos.mp (by omega : 0 < E.card)
|
| 125 |
+
have hc := Finset.card_union_le (E.erase w) {u, y, z}
|
| 126 |
+
have he := Finset.card_erase_add_one hw
|
| 127 |
+
have ht : ({u, y, z} : Finset V).card ≤ 3 := Finset.card_le_three
|
| 128 |
+
have hd := hdegree w hw
|
| 129 |
+
have hforce : ∀ a ∈ (E.erase w) ∪ {u, y, z}, H.Adj w a := fun a ha =>
|
| 130 |
+
degree_cover_forces_neighbor (hcover w hw)
|
| 131 |
+
(show ((E.erase w) ∪ {u, y, z}).card ≤ (H.neighborSet w).ncard by omega) ha
|
| 132 |
+
exact ⟨w, hw, hforce y (by simp), hforce z (by simp)⟩
|
| 133 |
+
· have hlarge : E.card = s - 1 := by omega
|
| 134 |
+
by_contra hn
|
| 135 |
+
have hadju : ∀ w ∈ E, H.Adj u w := by
|
| 136 |
+
intro w hw
|
| 137 |
+
by_contra hnu
|
| 138 |
+
have hnotu : ¬ H.Adj w u := fun h => hnu h.symm
|
| 139 |
+
have hpair : ¬ H.Adj w y ∨ ¬ H.Adj w z := by
|
| 140 |
+
by_cases hwy : H.Adj w y
|
| 141 |
+
· exact Or.inr (fun hwz => hn ⟨w, hw, hwy, hwz⟩)
|
| 142 |
+
· exact Or.inl hwy
|
| 143 |
+
have hbound : (H.neighborSet w).ncard ≤ E.card := by
|
| 144 |
+
rcases hpair with hny | hnz
|
| 145 |
+
· have hsub : ∀ v, H.Adj w v → v ∈ insert z (E.erase w) := by
|
| 146 |
+
intro v hwv
|
| 147 |
+
rcases Finset.mem_union.mp (hcover w hw v hwv) with hv | hv
|
| 148 |
+
· exact Finset.mem_insert_of_mem hv
|
| 149 |
+
· simp only [Finset.mem_insert, Finset.mem_singleton] at hv
|
| 150 |
+
rcases hv with rfl | rfl | rfl
|
| 151 |
+
· exact False.elim (hnotu hwv)
|
| 152 |
+
· exact False.elim (hny hwv)
|
| 153 |
+
· simp
|
| 154 |
+
have h := degree_le_of_neighbor_cover hsub
|
| 155 |
+
have hc := Finset.card_insert_le z (E.erase w)
|
| 156 |
+
have he := Finset.card_erase_add_one hw
|
| 157 |
+
omega
|
| 158 |
+
· have hsub : ∀ v, H.Adj w v → v ∈ insert y (E.erase w) := by
|
| 159 |
+
intro v hwv
|
| 160 |
+
rcases Finset.mem_union.mp (hcover w hw v hwv) with hv | hv
|
| 161 |
+
· exact Finset.mem_insert_of_mem hv
|
| 162 |
+
· simp only [Finset.mem_insert, Finset.mem_singleton] at hv
|
| 163 |
+
rcases hv with rfl | rfl | rfl
|
| 164 |
+
· exact False.elim (hnotu hwv)
|
| 165 |
+
· simp
|
| 166 |
+
· exact False.elim (hnz hwv)
|
| 167 |
+
have h := degree_le_of_neighbor_cover hsub
|
| 168 |
+
have hc := Finset.card_insert_le y (E.erase w)
|
| 169 |
+
have he := Finset.card_erase_add_one hw
|
| 170 |
+
omega
|
| 171 |
+
have hlow := hdegree w hw
|
| 172 |
+
omega
|
| 173 |
+
have h := clique_extension_size hclique hu hadju
|
| 174 |
+
omega
|
| 175 |
+
|
| 176 |
+
end CycleClique.Construction
|
| 177 |
+
|
| 178 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointDegreeCover.lean
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.RestrictedLongest
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-! Degree bounds when two deleted vertices are the only neighbours outside the longest path. -/
|
| 6 |
+
|
| 7 |
+
namespace CycleClique.Construction
|
| 8 |
+
theorem endpoint_neighbor_card_le {V : Type*} [Fintype V]
|
| 9 |
+
{H : SimpleGraph V} {x e : V} {W S : Finset V} {r : ℕ}
|
| 10 |
+
(he : e ∈ pathEnds H x W r)
|
| 11 |
+
(hS : ∀ v ∈ S, H.Adj e v ∧ v ∈ W) : S.card ≤ (pathEnds H x W r).card := by
|
| 12 |
+
classical
|
| 13 |
+
obtain ⟨f, hf, hlast⟩ := mem_pathEnds.mp he
|
| 14 |
+
have hex : ∀ v : S, ∃ i : Fin r, f i.castSucc = v.val := by
|
| 15 |
+
intro v
|
| 16 |
+
obtain ⟨hadj, hvW⟩ := hS v.val v.property
|
| 17 |
+
have hv : v.val ∈ Set.range f := by rw [hf.2.2.2]; exact hvW
|
| 18 |
+
obtain ⟨j, hj⟩ := hv
|
| 19 |
+
have hjlt : j.val < r := by
|
| 20 |
+
have hneq : j ≠ Fin.last r := by
|
| 21 |
+
intro heq
|
| 22 |
+
subst j
|
| 23 |
+
exact hadj.ne (hlast.symm.trans hj)
|
| 24 |
+
have hval : j.val ≠ r := fun h => hneq (Fin.ext h)
|
| 25 |
+
omega
|
| 26 |
+
exact ⟨⟨j.val, hjlt⟩, by simpa using hj⟩
|
| 27 |
+
let pivot : S → Fin r := fun v => Classical.choose (hex v)
|
| 28 |
+
have hpivot : ∀ v : S, f (pivot v).castSucc = v.val := fun v => Classical.choose_spec (hex v)
|
| 29 |
+
let suc : S → pathEnds H x W r := fun v =>
|
| 30 |
+
⟨f (pivot v).succ, successor_mem_pathEnds hf (pivot v) (by
|
| 31 |
+
rw [hlast, hpivot]
|
| 32 |
+
exact (hS v.val v.property).1)⟩
|
| 33 |
+
have hinj : Function.Injective suc := by
|
| 34 |
+
intro a b hab
|
| 35 |
+
have hfin := hf.1 (congrArg Subtype.val hab)
|
| 36 |
+
have hp : pivot a = pivot b := Fin.succ_injective r hfin
|
| 37 |
+
apply Subtype.ext
|
| 38 |
+
rw [← hpivot a, ← hpivot b, hp]
|
| 39 |
+
simpa only [Fintype.card_coe] using Fintype.card_le_of_injective suc hinj
|
| 40 |
+
|
| 41 |
+
theorem endpoint_degree_le_card_add_two {V : Type*} [Fintype V]
|
| 42 |
+
{H : SimpleGraph V} {x e y z : V} {W : Finset V} {r : ℕ}
|
| 43 |
+
(he : e ∈ pathEnds H x W r)
|
| 44 |
+
(hcover : ∀ v, H.Adj e v → v ∈ W ∨ v = y ∨ v = z) :
|
| 45 |
+
(H.neighborSet e).ncard ≤ (pathEnds H x W r).card + 2 := by
|
| 46 |
+
classical
|
| 47 |
+
let S := (H.neighborFinset e).filter fun v => v ∈ W
|
| 48 |
+
have hS : ∀ v ∈ S, H.Adj e v ∧ v ∈ W := by
|
| 49 |
+
intro v hv
|
| 50 |
+
exact ⟨(H.mem_neighborFinset e v).mp (Finset.mem_filter.mp hv).1,
|
| 51 |
+
(Finset.mem_filter.mp hv).2⟩
|
| 52 |
+
have hSbound := endpoint_neighbor_card_le he hS
|
| 53 |
+
have hsub : H.neighborFinset e ⊆ S ∪ {y, z} := by
|
| 54 |
+
intro v hv
|
| 55 |
+
rcases hcover v ((H.mem_neighborFinset e v).mp hv) with hvW | rfl | rfl
|
| 56 |
+
· exact Finset.mem_union_left _ (Finset.mem_filter.mpr ⟨hv, hvW⟩)
|
| 57 |
+
· simp
|
| 58 |
+
· simp
|
| 59 |
+
have hcard := (Finset.card_le_card hsub).trans (Finset.card_union_le S {y, z})
|
| 60 |
+
have hp : ({y, z} : Finset V).card ≤ 2 := Finset.card_le_two
|
| 61 |
+
have hdegree : (H.neighborFinset e).card ≤ (pathEnds H x W r).card + 2 := by omega
|
| 62 |
+
simpa only [SimpleGraph.card_neighborFinset_eq_degree,
|
| 63 |
+
SimpleGraph.ncard_neighborSet] using hdegree
|
| 64 |
+
|
| 65 |
+
end CycleClique.Construction
|
| 66 |
+
|
| 67 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointFullAttachment.lean
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.EndpointAttachment
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-! Rotating from a second attachment extends the prefix exclusion to every endpoint. -/
|
| 6 |
+
|
| 7 |
+
namespace CycleClique.Construction
|
| 8 |
+
theorem spanningPath_first_tail_last {V : Type*} [Fintype V]
|
| 9 |
+
{G : SimpleGraph V} {x : V} {W : Finset V} {r : ℕ}
|
| 10 |
+
{f : Fin (r + 1) → V} (hf : IsSpanningPath G x W f) (t : Fin r)
|
| 11 |
+
(hfinal : ∀ i : Fin (r + 1), f i ∈ pathEnds G x W r ↔ t.val < i.val)
|
| 12 |
+
(hclique : G.IsClique (pathEnds G x W r : Set V))
|
| 13 |
+
{w : V} (hw : w ∈ pathEnds G x W r) (hne : w ≠ f t.succ)
|
| 14 |
+
(hadj : G.Adj (f t.castSucc) w) :
|
| 15 |
+
∃ g : Fin (r + 1) → V, IsSpanningPath G x W g ∧
|
| 16 |
+
g (Fin.last r) = f t.succ ∧
|
| 17 |
+
∀ j : Fin (r + 1), j.val ≤ t.val → g j = f j := by
|
| 18 |
+
have hwW : w ∈ (W : Set V) := pathEnds_subset G x W r hw
|
| 19 |
+
rw [← hf.2.2.2] at hwW
|
| 20 |
+
obtain ⟨i, hiw⟩ := hwW
|
| 21 |
+
have hitail : t.val < i.val := (hfinal i).mp (hiw ▸ hw)
|
| 22 |
+
have hi : t.val + 1 < i.val := by
|
| 23 |
+
have hneq : i ≠ t.succ := fun h => hne (hiw.symm.trans (congrArg f h))
|
| 24 |
+
have hval : i.val ≠ t.val + 1 := fun h => hneq (Fin.ext h)
|
| 25 |
+
omega
|
| 26 |
+
obtain ⟨g, hg, hglast, hgfix⟩ := spanningPath_swap_tail hf t hfinal hclique i hi
|
| 27 |
+
have hrot := rotate_path g hg.1 hg.2.1 t (by
|
| 28 |
+
rw [hglast, hiw, hgfix t.castSucc (by simp)]
|
| 29 |
+
exact hadj.symm)
|
| 30 |
+
refine ⟨g ∘ rotationIndex t, ⟨hrot.1, hrot.2.1,
|
| 31 |
+
hrot.2.2.1.trans hg.2.2.1, hrot.2.2.2.2.trans hg.2.2.2⟩,
|
| 32 |
+
hrot.2.2.2.1.trans (hgfix t.succ (by simp)), ?_⟩
|
| 33 |
+
intro j hj
|
| 34 |
+
have hidx : rotationIndex t j = j := by
|
| 35 |
+
apply Fin.ext
|
| 36 |
+
dsimp [rotationIndex]
|
| 37 |
+
split_ifs
|
| 38 |
+
omega
|
| 39 |
+
change g (rotationIndex t j) = f j
|
| 40 |
+
rw [hidx]
|
| 41 |
+
exact hgfix j (by omega)
|
| 42 |
+
|
| 43 |
+
theorem endpoint_attachment_of_prefix_preserved {V : Type*} [Fintype V]
|
| 44 |
+
{G : SimpleGraph V} {x w : V} {W : Finset V} {r : ℕ}
|
| 45 |
+
{f g : Fin (r + 1) → V} (hf : IsSpanningPath G x W f) (t : Fin r)
|
| 46 |
+
(hfinal : ∀ i : Fin (r + 1), f i ∈ pathEnds G x W r ↔ t.val < i.val)
|
| 47 |
+
(hg : IsSpanningPath G x W g) (hglast : g (Fin.last r) = w)
|
| 48 |
+
(hfix : ∀ j : Fin (r + 1), j.val ≤ t.val → g j = f j)
|
| 49 |
+
(hneighbors : ∀ v, G.Adj w v → v ∈ W) :
|
| 50 |
+
∀ v, G.Adj w v → v ∈ pathEnds G x W r ∨ v = f t.castSucc := by
|
| 51 |
+
intro v hwv
|
| 52 |
+
by_cases hv : v ∈ pathEnds G x W r
|
| 53 |
+
· exact Or.inl hv
|
| 54 |
+
· right
|
| 55 |
+
have hvW : v ∈ (W : Set V) := hneighbors v hwv
|
| 56 |
+
rw [← hf.2.2.2] at hvW
|
| 57 |
+
obtain ⟨j, hjv⟩ := hvW
|
| 58 |
+
have hjbefore : j.val ≤ t.val := by
|
| 59 |
+
by_contra hn
|
| 60 |
+
exact hv (hjv ▸ (hfinal j).mpr (by omega))
|
| 61 |
+
by_cases heq : j.val = t.val
|
| 62 |
+
· have hj : j = t.castSucc := Fin.ext heq
|
| 63 |
+
exact hjv.symm.trans (congrArg f hj)
|
| 64 |
+
· let p : Fin r := ⟨j.val, by have := t.isLt; omega⟩
|
| 65 |
+
have hgp : g p.castSucc = v := (hfix p.castSucc (by dsimp [p]; omega)).trans
|
| 66 |
+
((congrArg f (Fin.ext rfl)).trans hjv)
|
| 67 |
+
have hrot := successor_mem_pathEnds hg p (by rw [hglast, hgp]; exact hwv)
|
| 68 |
+
rw [hfix p.succ (by dsimp [p]; omega)] at hrot
|
| 69 |
+
have hbound := (hfinal p.succ).mp hrot
|
| 70 |
+
dsimp [p] at hbound
|
| 71 |
+
omega
|
| 72 |
+
|
| 73 |
+
/-- Every endpoint has no neighbour outside the endpoint clique other
|
| 74 |
+
than the one attachment vertex. -/
|
| 75 |
+
theorem full_endpoint_attachment {V : Type*} [Fintype V]
|
| 76 |
+
{G : SimpleGraph V} {x : V} {W : Finset V} {r : ℕ}
|
| 77 |
+
{f : Fin (r + 1) → V} (hf : IsSpanningPath G x W f) (t : Fin r)
|
| 78 |
+
(hfinal : ∀ i : Fin (r + 1), f i ∈ pathEnds G x W r ↔ t.val < i.val)
|
| 79 |
+
(hclique : G.IsClique (pathEnds G x W r : Set V))
|
| 80 |
+
(hneighbors : ∀ e ∈ pathEnds G x W r, ∀ v, G.Adj e v → v ∈ W)
|
| 81 |
+
(hsecond : ∃ w ∈ pathEnds G x W r,
|
| 82 |
+
w ≠ f t.succ ∧ G.Adj (f t.castSucc) w) :
|
| 83 |
+
∀ w ∈ pathEnds G x W r, ∀ v, G.Adj w v →
|
| 84 |
+
v ∈ pathEnds G x W r ∨ v = f t.castSucc := by
|
| 85 |
+
intro w hw
|
| 86 |
+
by_cases heq : w = f t.succ
|
| 87 |
+
· subst w
|
| 88 |
+
obtain ⟨w₁, hw₁, hne, hadj⟩ := hsecond
|
| 89 |
+
obtain ⟨g, hg, hlast, hfix⟩ := spanningPath_first_tail_last hf t hfinal hclique hw₁ hne hadj
|
| 90 |
+
exact endpoint_attachment_of_prefix_preserved hf t hfinal hg hlast hfix
|
| 91 |
+
(hneighbors _ hw)
|
| 92 |
+
· exact partial_endpoint_attachment hf t hfinal hclique hneighbors w hw heq
|
| 93 |
+
|
| 94 |
+
end CycleClique.Construction
|
| 95 |
+
|
| 96 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointStructure.lean
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.EndpointDegreeCover
|
| 2 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.EndpointAllowedAttachment
|
| 3 |
+
|
| 4 |
+
namespace OAI
|
| 5 |
+
|
| 6 |
+
/-! Assembling the endpoint clique and its single attachment. -/
|
| 7 |
+
|
| 8 |
+
namespace CycleClique.Construction
|
| 9 |
+
theorem endpoint_structure {V : Type*} [Fintype V] [DecidableEq V]
|
| 10 |
+
{H : SimpleGraph V} {U W : Finset V} {x y z : V} {r s : ℕ}
|
| 11 |
+
(hs : 4 ≤ s) (hno : H.cliqueNum < s)
|
| 12 |
+
(hdegree : ∀ v, s ≤ (H.neighborSet v).ncard)
|
| 13 |
+
(hexpand : ∀ a b, a ≠ b → ¬ H.Adj a b →
|
| 14 |
+
2 * s ≤ (closedNeighborhood H {a, b}).card)
|
| 15 |
+
(hyU : y ∉ U) (hzU : z ∉ U) (hWU : W ⊆ U)
|
| 16 |
+
(hcover : ∀ u ∈ U, ∀ v, H.Adj u v → v ∈ U ∨ v = y ∨ v = z)
|
| 17 |
+
{f : Fin (r + 1) → V} (hf : IsSpanningPath H x W f)
|
| 18 |
+
(hcard : W.card = r + 1) (hshort : W.card + 2 < 2 * s)
|
| 19 |
+
(hmax : ∀ q (g : Fin (q + 1) → V), IsIndexedPath H g → g 0 = x →
|
| 20 |
+
(∀ i, g i ∈ U) → q ≤ r) :
|
| 21 |
+
let E := pathEnds H x W r
|
| 22 |
+
H.IsClique (E : Set V) ∧ s - 2 ≤ E.card ∧ E.card ≤ s - 1 ∧
|
| 23 |
+
∃ u ∈ U, u ∉ E ∧
|
| 24 |
+
(∃ a ∈ E, ∃ b ∈ E, a ≠ b ∧ H.Adj a u ∧ H.Adj b u) ∧
|
| 25 |
+
(∀ e ∈ E, ∀ v, H.Adj e v → v ∈ E ∨ v = u ∨ v = y ∨ v = z) ∧
|
| 26 |
+
∃ w ∈ E, H.Adj w y ∧ H.Adj w z := by
|
| 27 |
+
classical
|
| 28 |
+
let E := pathEnds H x W r
|
| 29 |
+
have hEW : E ⊆ W := pathEnds_subset H x W r
|
| 30 |
+
have hEU : E ⊆ U := hEW.trans hWU
|
| 31 |
+
have hyE : y ∉ E := fun hy => hyU (hEU hy)
|
| 32 |
+
have hzE : z ∉ E := fun hz => hzU (hEU hz)
|
| 33 |
+
have he : f (Fin.last r) ∈ E := mem_pathEnds.mpr ⟨f, hf, rfl⟩
|
| 34 |
+
have hcoverE : ∀ e ∈ E, ∀ v, H.Adj e v → v ∈ W ∨ v = y ∨ v = z :=
|
| 35 |
+
restricted_endpoint_neighbor_cover hWU hcover hmax
|
| 36 |
+
have hclique : H.IsClique (E : Set V) := by
|
| 37 |
+
apply clique_of_endpoint_neighbor_cover (s := s) hEW
|
| 38 |
+
(Z := {y, z})
|
| 39 |
+
· intro e he v hev
|
| 40 |
+
rcases hcoverE e he v hev with hv | rfl | rfl
|
| 41 |
+
· exact Finset.mem_union_left _ hv
|
| 42 |
+
· simp
|
| 43 |
+
· simp
|
| 44 |
+
· have hp : ({y, z} : Finset V).card ≤ 2 := Finset.card_le_two
|
| 45 |
+
omega
|
| 46 |
+
· exact hexpand
|
| 47 |
+
have hupper : E.card ≤ s - 1 := by
|
| 48 |
+
have := hclique.card_le_cliqueNum
|
| 49 |
+
omega
|
| 50 |
+
have hlower : s - 2 ≤ E.card := by
|
| 51 |
+
have hbound := endpoint_degree_le_card_add_two he (hcoverE _ he)
|
| 52 |
+
change (H.neighborSet (f (Fin.last r))).ncard ≤ E.card + 2 at hbound
|
| 53 |
+
have hlow := hdegree (f (Fin.last r))
|
| 54 |
+
omega
|
| 55 |
+
have hr : 1 ≤ r := by
|
| 56 |
+
have hbound := Finset.card_le_card hEW
|
| 57 |
+
omega
|
| 58 |
+
obtain ⟨t, hfinal⟩ := pathEnds_final_segment hr hf hclique
|
| 59 |
+
let u := f t.castSucc
|
| 60 |
+
let w₀ := f t.succ
|
| 61 |
+
have huU : u ∈ U := by
|
| 62 |
+
apply hWU
|
| 63 |
+
change f t.castSucc ∈ (W : Set V)
|
| 64 |
+
rw [← hf.2.2.2]
|
| 65 |
+
exact ⟨t.castSucc, rfl⟩
|
| 66 |
+
have huE : u ∉ E := by
|
| 67 |
+
intro hu
|
| 68 |
+
have h := (hfinal t.castSucc).mp hu
|
| 69 |
+
simp only [Fin.val_castSucc] at h
|
| 70 |
+
omega
|
| 71 |
+
have hw₀ : w₀ ∈ E := (hfinal t.succ).mpr (by simp)
|
| 72 |
+
have huw₀ : H.Adj u w₀ := hf.2.1 t
|
| 73 |
+
have hpartial : ∀ e ∈ E, e ≠ w₀ → ∀ v, H.Adj e v →
|
| 74 |
+
v ∈ (E.erase e) ∪ {u, y, z} := by
|
| 75 |
+
intro e he hne v hev
|
| 76 |
+
rcases hcoverE e he v hev with hvW | rfl | rfl
|
| 77 |
+
· rcases partial_endpoint_attachment_in_W hf t hfinal hclique he hne hvW hev with hvE | hveq
|
| 78 |
+
· exact Finset.mem_union_left _ (Finset.mem_erase.mpr ⟨hev.ne.symm, hvE⟩)
|
| 79 |
+
· subst v
|
| 80 |
+
exact Finset.mem_union_right _ (Finset.mem_insert_self _ _)
|
| 81 |
+
· simp
|
| 82 |
+
· simp
|
| 83 |
+
have hzero : ¬ H.Adj w₀ y → ¬ H.Adj w₀ z → (H.neighborSet w₀).ncard ≤ E.card := by
|
| 84 |
+
intro hny hnz
|
| 85 |
+
apply endpoint_degree_le hw₀
|
| 86 |
+
intro v hwv
|
| 87 |
+
rcases hcoverE w₀ hw₀ v hwv with hv | rfl | rfl
|
| 88 |
+
· exact hv
|
| 89 |
+
· exact False.elim (hny hwv)
|
| 90 |
+
· exact False.elim (hnz hwv)
|
| 91 |
+
have hsecond := endpoint_second_attachment hs ⟨hlower, hupper⟩ hclique hno
|
| 92 |
+
hyE hzE hw₀ (fun e _ => hdegree e) hpartial hzero
|
| 93 |
+
have hfull : ∀ e ∈ E, ∀ v, H.Adj e v → v ∈ E ∨ v = u ∨ v = y ∨ v = z := by
|
| 94 |
+
intro e he v hev
|
| 95 |
+
rcases hcoverE e he v hev with hvW | hvy | hvz
|
| 96 |
+
· rcases full_endpoint_attachment_in_W hf t hfinal hclique hsecond he hvW hev with hv | hvu
|
| 97 |
+
· exact Or.inl hv
|
| 98 |
+
· exact Or.inr (Or.inl hvu)
|
| 99 |
+
· exact Or.inr (Or.inr (Or.inl hvy))
|
| 100 |
+
· exact Or.inr (Or.inr (Or.inr hvz))
|
| 101 |
+
have hfull' : ∀ e ∈ E, ∀ v, H.Adj e v → v ∈ (E.erase e) ∪ {u, y, z} := by
|
| 102 |
+
intro e he v hev
|
| 103 |
+
rcases hfull e he v hev with hv | rfl | rfl | rfl
|
| 104 |
+
· exact Finset.mem_union_left _ (Finset.mem_erase.mpr ⟨hev.ne.symm, hv⟩)
|
| 105 |
+
· simp
|
| 106 |
+
· simp
|
| 107 |
+
· simp
|
| 108 |
+
have hcommon := endpoint_common_deleted_neighbor hs ⟨hlower, hupper⟩ hclique hno
|
| 109 |
+
huE (fun e _ => hdegree e) hfull'
|
| 110 |
+
obtain ⟨b, hb, hbne, hub⟩ := hsecond
|
| 111 |
+
exact ⟨hclique, hlower, hupper, u, huU, huE,
|
| 112 |
+
⟨w₀, hw₀, b, hb, hbne.symm, huw₀.symm, hub.symm⟩, hfull, hcommon⟩
|
| 113 |
+
|
| 114 |
+
end CycleClique.Construction
|
| 115 |
+
|
| 116 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/EndpointTail.lean
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.LongestPaths
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-! The endpoint clique is a final segment, and its tail can be reordered. -/
|
| 6 |
+
|
| 7 |
+
namespace CycleClique.Construction
|
| 8 |
+
/-- A nonempty successor-closed subset of a finite interval, excluding
|
| 9 |
+
zero, starts immediately after a well-defined boundary index. -/
|
| 10 |
+
theorem successor_closed_final_segment {r : ℕ} (P : Fin (r + 1) → Prop)
|
| 11 |
+
(hzero : ¬ P 0) (hlast : P (Fin.last r))
|
| 12 |
+
(hnext : ∀ i : Fin r, P i.castSucc → P i.succ) :
|
| 13 |
+
∃ t : Fin r, ∀ i : Fin (r + 1), P i ↔ t.val < i.val := by
|
| 14 |
+
classical
|
| 15 |
+
let A : Finset (Fin (r + 1)) := Finset.univ.filter P
|
| 16 |
+
have hA : A.Nonempty := ⟨Fin.last r, by simpa [A] using hlast⟩
|
| 17 |
+
let a := A.min' hA
|
| 18 |
+
have ha : P a := (Finset.mem_filter.mp (A.min'_mem hA)).2
|
| 19 |
+
have hapos : 1 ≤ a.val := by
|
| 20 |
+
by_contra hn
|
| 21 |
+
have heq : a = 0 := by
|
| 22 |
+
apply Fin.ext
|
| 23 |
+
simpa only [Fin.val_zero] using (show a.val = 0 by omega)
|
| 24 |
+
exact hzero (heq ▸ ha)
|
| 25 |
+
have hmin : ∀ i, P i → a.val ≤ i.val := by
|
| 26 |
+
intro i hi
|
| 27 |
+
exact Finset.min'_le A i (by simpa [A] using hi)
|
| 28 |
+
have hup : ∀ j, ∀ hj : j < r + 1, a.val ≤ j → P ⟨j, hj⟩ := by
|
| 29 |
+
intro j
|
| 30 |
+
induction j with
|
| 31 |
+
| zero => intro hj hle; omega
|
| 32 |
+
| succ j ih =>
|
| 33 |
+
intro hj hle
|
| 34 |
+
by_cases heq : a.val = j + 1
|
| 35 |
+
· have heq' : a = ⟨j + 1, hj⟩ := Fin.ext heq
|
| 36 |
+
exact heq' ▸ ha
|
| 37 |
+
· have hjr : j < r := by omega
|
| 38 |
+
have hprev := ih (by omega) (by omega)
|
| 39 |
+
exact hnext ⟨j, hjr⟩ hprev
|
| 40 |
+
refine ⟨⟨a.val - 1, by have := a.isLt; omega⟩, ?_⟩
|
| 41 |
+
intro i
|
| 42 |
+
constructor
|
| 43 |
+
· intro hi
|
| 44 |
+
have := hmin i hi
|
| 45 |
+
dsimp
|
| 46 |
+
omega
|
| 47 |
+
· intro hi
|
| 48 |
+
apply hup i.val i.isLt
|
| 49 |
+
dsimp at hi
|
| 50 |
+
omega
|
| 51 |
+
|
| 52 |
+
theorem pathEnds_final_segment {V : Type*} [Fintype V]
|
| 53 |
+
{G : SimpleGraph V} {x : V} {W : Finset V} {r : ℕ}
|
| 54 |
+
(hr : 1 ≤ r) {f : Fin (r + 1) → V} (hf : IsSpanningPath G x W f)
|
| 55 |
+
(hclique : G.IsClique (pathEnds G x W r : Set V)) :
|
| 56 |
+
∃ t : Fin r, ∀ i : Fin (r + 1), f i ∈ pathEnds G x W r ↔ t.val < i.val := by
|
| 57 |
+
apply successor_closed_final_segment (fun i => f i ∈ pathEnds G x W r)
|
| 58 |
+
· rw [hf.2.2.1]
|
| 59 |
+
exact start_not_pathEnds hr
|
| 60 |
+
· exact mem_pathEnds.mpr ⟨f, hf, rfl⟩
|
| 61 |
+
· intro i hi
|
| 62 |
+
exact pathEnds_successor_closed hf hclique hi
|
| 63 |
+
|
| 64 |
+
/-- Permuting the clique tail while fixing its first vertex preserves
|
| 65 |
+
the path and all of its prefix. -/
|
| 66 |
+
theorem spanningPath_permute_tail {V : Type*} [Fintype V]
|
| 67 |
+
{G : SimpleGraph V} {x : V} {W E : Finset V} {r : ℕ}
|
| 68 |
+
{f : Fin (r + 1) → V} (hf : IsSpanningPath G x W f)
|
| 69 |
+
(t : Fin r) (hfinal : ∀ i : Fin (r + 1), f i ∈ E ↔ t.val < i.val)
|
| 70 |
+
(hclique : G.IsClique (E : Set V)) (σ : Equiv.Perm (Fin (r + 1)))
|
| 71 |
+
(hfix : ∀ i : Fin (r + 1), i.val ≤ t.val + 1 → σ i = i) :
|
| 72 |
+
IsSpanningPath G x W (f ∘ σ) := by
|
| 73 |
+
have htail : ∀ i : Fin (r + 1), t.val < i.val → t.val < (σ i).val := by
|
| 74 |
+
intro i hi
|
| 75 |
+
by_contra hn
|
| 76 |
+
have hs : σ (σ i) = σ i := hfix (σ i) (by omega)
|
| 77 |
+
have heq : i = σ i := σ.injective hs.symm
|
| 78 |
+
have hv := congrArg Fin.val heq
|
| 79 |
+
omega
|
| 80 |
+
refine ⟨hf.1.comp σ.injective, ?_, ?_, ?_⟩
|
| 81 |
+
· intro i
|
| 82 |
+
change G.Adj (f (σ i.castSucc)) (f (σ i.succ))
|
| 83 |
+
by_cases hbefore : i.val ≤ t.val
|
| 84 |
+
· rw [hfix i.castSucc (by change i.val ≤ t.val + 1; omega),
|
| 85 |
+
hfix i.succ (by change i.val + 1 ≤ t.val + 1; omega)]
|
| 86 |
+
exact hf.2.1 i
|
| 87 |
+
· apply hclique ((hfinal _).mpr (htail _ (by simpa using (by omega : t.val < i.val))))
|
| 88 |
+
((hfinal _).mpr (htail _ (by simp; omega)))
|
| 89 |
+
intro heq
|
| 90 |
+
have hidx := σ.injective (hf.1 heq)
|
| 91 |
+
have hv := congrArg Fin.val hidx
|
| 92 |
+
simp only [Fin.val_castSucc, Fin.val_succ] at hv
|
| 93 |
+
omega
|
| 94 |
+
· change f (σ 0) = x
|
| 95 |
+
rw [hfix 0 (by simp)]
|
| 96 |
+
exact hf.2.2.1
|
| 97 |
+
· ext v
|
| 98 |
+
constructor
|
| 99 |
+
· rintro ⟨i, rfl⟩
|
| 100 |
+
rw [← hf.2.2.2]
|
| 101 |
+
exact ⟨σ i, rfl⟩
|
| 102 |
+
· intro hv
|
| 103 |
+
rw [← hf.2.2.2] at hv
|
| 104 |
+
obtain ⟨i, rfl⟩ := hv
|
| 105 |
+
exact ⟨σ.symm i, by simp⟩
|
| 106 |
+
|
| 107 |
+
/-- Any tail vertex other than the first can be made last while the
|
| 108 |
+
prefix and the first tail vertex stay fixed. -/
|
| 109 |
+
theorem spanningPath_swap_tail {V : Type*} [Fintype V]
|
| 110 |
+
{G : SimpleGraph V} {x : V} {W E : Finset V} {r : ℕ}
|
| 111 |
+
{f : Fin (r + 1) → V} (hf : IsSpanningPath G x W f)
|
| 112 |
+
(t : Fin r) (hfinal : ∀ i : Fin (r + 1), f i ∈ E ↔ t.val < i.val)
|
| 113 |
+
(hclique : G.IsClique (E : Set V)) (i : Fin (r + 1))
|
| 114 |
+
(hi : t.val + 1 < i.val) :
|
| 115 |
+
∃ g : Fin (r + 1) → V, IsSpanningPath G x W g ∧
|
| 116 |
+
g (Fin.last r) = f i ∧
|
| 117 |
+
∀ j : Fin (r + 1), j.val ≤ t.val + 1 → g j = f j := by
|
| 118 |
+
classical
|
| 119 |
+
let σ := Equiv.swap i (Fin.last r)
|
| 120 |
+
have hfix : ∀ j : Fin (r + 1), j.val ≤ t.val + 1 → σ j = j := by
|
| 121 |
+
intro j hj
|
| 122 |
+
apply Equiv.swap_apply_of_ne_of_ne
|
| 123 |
+
· intro h
|
| 124 |
+
have := congrArg Fin.val h
|
| 125 |
+
omega
|
| 126 |
+
· intro h
|
| 127 |
+
have := congrArg Fin.val h
|
| 128 |
+
simp only [Fin.val_last] at this
|
| 129 |
+
have := i.isLt
|
| 130 |
+
omega
|
| 131 |
+
exact ⟨f ∘ σ, spanningPath_permute_tail hf t hfinal hclique σ hfix,
|
| 132 |
+
by simp [σ], fun j hj => congrArg f (hfix j hj)⟩
|
| 133 |
+
|
| 134 |
+
/-- Every endpoint except the first vertex of the fixed clique tail
|
| 135 |
+
has no neighbour in the preceding prefix except its attachment vertex. -/
|
| 136 |
+
theorem partial_endpoint_attachment {V : Type*} [Fintype V]
|
| 137 |
+
{G : SimpleGraph V} {x : V} {W : Finset V} {r : ℕ}
|
| 138 |
+
{f : Fin (r + 1) → V} (hf : IsSpanningPath G x W f)
|
| 139 |
+
(t : Fin r)
|
| 140 |
+
(hfinal : ∀ i : Fin (r + 1), f i ∈ pathEnds G x W r ↔ t.val < i.val)
|
| 141 |
+
(hclique : G.IsClique (pathEnds G x W r : Set V))
|
| 142 |
+
(hneighbors : ∀ e ∈ pathEnds G x W r, ∀ v, G.Adj e v → v ∈ W) :
|
| 143 |
+
∀ w ∈ pathEnds G x W r, w ≠ f t.succ →
|
| 144 |
+
∀ v, G.Adj w v → v ∈ pathEnds G x W r ∨ v = f t.castSucc := by
|
| 145 |
+
intro w hw hwfirst v hwv
|
| 146 |
+
have hwW : w ∈ (W : Set V) := pathEnds_subset G x W r hw
|
| 147 |
+
rw [← hf.2.2.2] at hwW
|
| 148 |
+
obtain ⟨i, hiw⟩ := hwW
|
| 149 |
+
have hitail : t.val < i.val := (hfinal i).mp (hiw ▸ hw)
|
| 150 |
+
have hi : t.val + 1 < i.val := by
|
| 151 |
+
have hneq : i ≠ t.succ := fun h => hwfirst (hiw.symm.trans (congrArg f h))
|
| 152 |
+
have hval : i.val ≠ t.val + 1 := fun h => hneq (Fin.ext h)
|
| 153 |
+
omega
|
| 154 |
+
obtain ⟨g, hg, hglast, hgfix⟩ := spanningPath_swap_tail hf t hfinal hclique i hi
|
| 155 |
+
by_cases hv : v ∈ pathEnds G x W r
|
| 156 |
+
· exact Or.inl hv
|
| 157 |
+
· right
|
| 158 |
+
have hvW : v ∈ (W : Set V) := hneighbors w hw v hwv
|
| 159 |
+
rw [← hf.2.2.2] at hvW
|
| 160 |
+
obtain ⟨j, hjv⟩ := hvW
|
| 161 |
+
have hjbefore : j.val ≤ t.val := by
|
| 162 |
+
by_contra hn
|
| 163 |
+
exact hv (hjv ▸ (hfinal j).mpr (by omega))
|
| 164 |
+
by_cases heq : j.val = t.val
|
| 165 |
+
· have hj : j = t.castSucc := Fin.ext heq
|
| 166 |
+
exact hjv.symm.trans (congrArg f hj)
|
| 167 |
+
· let p : Fin r := ⟨j.val, by have := t.isLt; omega⟩
|
| 168 |
+
have hgp : g p.castSucc = v := (hgfix p.castSucc (by dsimp [p]; omega)).trans
|
| 169 |
+
((congrArg f (Fin.ext rfl)).trans hjv)
|
| 170 |
+
have hrot := successor_mem_pathEnds hg p (by rw [hglast, hiw, hgp]; exact hwv)
|
| 171 |
+
rw [hgfix p.succ (by dsimp [p]; omega)] at hrot
|
| 172 |
+
have hbound := (hfinal p.succ).mp hrot
|
| 173 |
+
dsimp [p] at hbound
|
| 174 |
+
omega
|
| 175 |
+
|
| 176 |
+
end CycleClique.Construction
|
| 177 |
+
|
| 178 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/ExteriorCounts.lean
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiveCycleGeometry
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-! Expansion counts after deleting the clique neighbours of an independent set. -/
|
| 6 |
+
|
| 7 |
+
namespace CycleClique.Construction
|
| 8 |
+
theorem exterior_closed_expansion_bound {V : Type*} [Fintype V] [DecidableEq V]
|
| 9 |
+
{G : SimpleGraph V} {Q A I B : Finset V} {k : ℕ}
|
| 10 |
+
(hexpand : k * I.card + 1 ≤ (closedNeighborhood G I).card)
|
| 11 |
+
(hIA : I ⊆ A) (hAQ : Disjoint A Q)
|
| 12 |
+
(hcover : ∀ i ∈ I, ∀ q ∈ Q, G.Adj i q → q ∈ B) :
|
| 13 |
+
k * I.card + 1 ≤ B.card + (exteriorClosedNeighborhood G Q A).card := by
|
| 14 |
+
classical
|
| 15 |
+
have hsub : closedNeighborhood G I ⊆ B ∪ exteriorClosedNeighborhood G Q A := by
|
| 16 |
+
intro v hv
|
| 17 |
+
by_cases hvQ : v ∈ Q
|
| 18 |
+
· apply Finset.mem_union_left
|
| 19 |
+
rcases mem_closedNeighborhood.mp hv with hvI | ⟨i, hi, hiv⟩
|
| 20 |
+
· exact False.elim (Finset.disjoint_left.mp hAQ (hIA hvI) hvQ)
|
| 21 |
+
· exact hcover i hi v hvQ hiv
|
| 22 |
+
· apply Finset.mem_union_right
|
| 23 |
+
apply mem_exteriorClosedNeighborhood.mpr
|
| 24 |
+
refine ⟨?_, hvQ⟩
|
| 25 |
+
rcases mem_closedNeighborhood.mp hv with hvI | ⟨i, hi, hiv⟩
|
| 26 |
+
· exact Or.inl (hIA hvI)
|
| 27 |
+
· exact Or.inr ⟨i, hIA hi, hiv⟩
|
| 28 |
+
exact hexpand.trans ((Finset.card_le_card hsub).trans (Finset.card_union_le _ _))
|
| 29 |
+
|
| 30 |
+
theorem one_clique_neighbor_expansion {V : Type*} [Fintype V] [DecidableEq V]
|
| 31 |
+
{G : SimpleGraph V} {Q A : Finset V} {q : V} {k : ℕ}
|
| 32 |
+
(hA : A.Nonempty) (hAQ : Disjoint A Q)
|
| 33 |
+
(hcover : ∀ a ∈ A, ∀ x ∈ Q, G.Adj a x → x = q)
|
| 34 |
+
(hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty →
|
| 35 |
+
k * I.card + 1 ≤ (closedNeighborhood G I).card) :
|
| 36 |
+
k * (G.induce (A : Set V)).indepNum ≤ (exteriorClosedNeighborhood G Q A).card := by
|
| 37 |
+
classical
|
| 38 |
+
let I := independentOn G A
|
| 39 |
+
have hIcard : I.card = (G.induce (A : Set V)).indepNum := independentOn_card G A
|
| 40 |
+
have hpos : 0 < (G.induce (A : Set V)).indepNum := by
|
| 41 |
+
let : Nonempty A := hA.to_subtype
|
| 42 |
+
exact indepNum_pos_of_nonempty _
|
| 43 |
+
have hIne : I.Nonempty := Finset.card_pos.mp (by omega)
|
| 44 |
+
have h := exterior_closed_expansion_bound (B := {q})
|
| 45 |
+
(hexpand I (independentOn_independent G A) hIne) (independentOn_subset G A) hAQ
|
| 46 |
+
(fun i hi x hx hadj => Finset.mem_singleton.mpr
|
| 47 |
+
(hcover i (independentOn_subset G A hi) x hx hadj))
|
| 48 |
+
rw [Finset.card_singleton, hIcard] at h
|
| 49 |
+
omega
|
| 50 |
+
|
| 51 |
+
theorem exterior_disjoint_sum_bound {V ι : Type*} [Fintype V] [DecidableEq V]
|
| 52 |
+
{G : SimpleGraph V} {Q : Finset V} (F : Finset ι) (A : ι → Finset V)
|
| 53 |
+
(hdis : (F : Set ι).PairwiseDisjoint (fun i => exteriorClosedNeighborhood G Q (A i))) :
|
| 54 |
+
Q.card + ∑ i ∈ F, (exteriorClosedNeighborhood G Q (A i)).card ≤ Fintype.card V := by
|
| 55 |
+
classical
|
| 56 |
+
let C := F.biUnion (fun i => exteriorClosedNeighborhood G Q (A i))
|
| 57 |
+
have hCcard : C.card = ∑ i ∈ F, (exteriorClosedNeighborhood G Q (A i)).card :=
|
| 58 |
+
Finset.card_biUnion hdis
|
| 59 |
+
have hQC : Disjoint Q C := by
|
| 60 |
+
apply Finset.disjoint_left.mpr
|
| 61 |
+
intro x hx hxC
|
| 62 |
+
obtain ⟨i, _, hi⟩ := Finset.mem_biUnion.mp hxC
|
| 63 |
+
exact (mem_exteriorClosedNeighborhood.mp hi).2 hx
|
| 64 |
+
have hbound : (Q ∪ C).card ≤ Fintype.card V := by
|
| 65 |
+
simpa only [Finset.card_univ] using Finset.card_le_card (Finset.subset_univ (Q ∪ C))
|
| 66 |
+
rwa [Finset.card_union_of_disjoint hQC, hCcard] at hbound
|
| 67 |
+
|
| 68 |
+
end CycleClique.Construction
|
| 69 |
+
|
| 70 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FastCertificateMatrix.lean
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.TemplateMatrix
|
| 2 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.RequiredCertificates
|
| 3 |
+
import Mathlib.Data.Nat.Bitwise
|
| 4 |
+
|
| 5 |
+
namespace OAI
|
| 6 |
+
|
| 7 |
+
/-! Natural-number masks provide a compact, checked representation of
|
| 8 |
+
finite forbidden matrices. The supplied masks are validated separately. -/
|
| 9 |
+
|
| 10 |
+
namespace CycleClique.Construction
|
| 11 |
+
/-- Decode the first `w` bits of a natural-number mask. -/
|
| 12 |
+
def decode (w b : ℕ) : Finset ℕ :=
|
| 13 |
+
(Finset.range w).filter (fun d => Nat.testBit b d)
|
| 14 |
+
|
| 15 |
+
@[simp] theorem decode_zero (w : ℕ) : decode w 0 = ∅ := by
|
| 16 |
+
simp [decode]
|
| 17 |
+
|
| 18 |
+
theorem decode_or (w b c : ℕ) : decode w (b ||| c) = decode w b ∪ decode w c := by
|
| 19 |
+
ext d
|
| 20 |
+
simp [decode, Nat.testBit_or, and_or_left]
|
| 21 |
+
|
| 22 |
+
def templateMaskEntry {n : ℕ} (T : TemplateData (Fin n)) (b : ℕ) :
|
| 23 |
+
Fin n → Fin n → ℕ := fun i j =>
|
| 24 |
+
if (i = T.x ∧ j = T.y) ∨ (i = T.y ∧ j = T.x) then b else 0
|
| 25 |
+
|
| 26 |
+
def templateMaskMatrix {n : ℕ} :
|
| 27 |
+
List (TemplateData (Fin n) × ℕ) → Fin n → Fin n → ℕ
|
| 28 |
+
| [] => fun _ _ => 0
|
| 29 |
+
| Tb :: E => fun i j => templateMaskEntry Tb.1 Tb.2 i j ||| templateMaskMatrix E i j
|
| 30 |
+
|
| 31 |
+
theorem templateMaskMatrix_append {n : ℕ}
|
| 32 |
+
(A B : List (TemplateData (Fin n) × ℕ)) :
|
| 33 |
+
templateMaskMatrix (A ++ B) =
|
| 34 |
+
fun i j => templateMaskMatrix A i j ||| templateMaskMatrix B i j := by
|
| 35 |
+
induction A with
|
| 36 |
+
| nil =>
|
| 37 |
+
funext i j
|
| 38 |
+
simp only [List.nil_append, templateMaskMatrix, Nat.zero_or]
|
| 39 |
+
| cons Tb A ih =>
|
| 40 |
+
funext i j
|
| 41 |
+
simp only [List.cons_append, templateMaskMatrix, ih, Nat.or_assoc]
|
| 42 |
+
|
| 43 |
+
theorem decode_templateMaskEntry {n w b : ℕ} {T : TemplateData (Fin n)}
|
| 44 |
+
(hdecode : decode w b = Finset.Icc T.lo T.hi) (i j : Fin n) :
|
| 45 |
+
decode w (templateMaskEntry T b i j) = templateEntryMatrix T i j := by
|
| 46 |
+
unfold templateMaskEntry templateEntryMatrix
|
| 47 |
+
split_ifs
|
| 48 |
+
· exact hdecode
|
| 49 |
+
· exact decode_zero w
|
| 50 |
+
|
| 51 |
+
theorem decode_templateMaskMatrix {n : ℕ} (w : ℕ)
|
| 52 |
+
(E : List (TemplateData (Fin n) × ℕ))
|
| 53 |
+
(hE : ∀ Tb ∈ E, decode w Tb.2 = Finset.Icc Tb.1.lo Tb.1.hi) :
|
| 54 |
+
(fun i j => decode w (templateMaskMatrix E i j)) = templateMatrix (E.map Prod.fst) := by
|
| 55 |
+
induction E with
|
| 56 |
+
| nil =>
|
| 57 |
+
funext i j
|
| 58 |
+
exact decode_zero w
|
| 59 |
+
| cons Tb E ih =>
|
| 60 |
+
have hT := hE Tb (by simp)
|
| 61 |
+
have htail := ih (fun Tc hTc => hE Tc (by simp [hTc]))
|
| 62 |
+
funext i j
|
| 63 |
+
change decode w (templateMaskEntry Tb.1 Tb.2 i j ||| templateMaskMatrix E i j) =
|
| 64 |
+
templateEntryMatrix Tb.1 i j ∪ templateMatrix (E.map Prod.fst) i j
|
| 65 |
+
rw [decode_or, decode_templateMaskEntry hT, congrFun (congrFun htail i) j]
|
| 66 |
+
|
| 67 |
+
def requiredMaskEntry {n : ℕ} (p : RequiredPathData (Fin n)) (b : ℕ) :
|
| 68 |
+
Fin n → Fin n → ℕ := fun i j =>
|
| 69 |
+
if (i = p.x ∧ j = p.y) ∨ (i = p.y ∧ j = p.x) then b else 0
|
| 70 |
+
|
| 71 |
+
def requiredMaskMatrix {n : ℕ} :
|
| 72 |
+
List (RequiredPathData (Fin n) × ℕ) → Fin n → Fin n → ℕ
|
| 73 |
+
| [] => fun _ _ => 0
|
| 74 |
+
| pb :: E => fun i j => requiredMaskEntry pb.1 pb.2 i j ||| requiredMaskMatrix E i j
|
| 75 |
+
|
| 76 |
+
theorem requiredMaskMatrix_append {n : ℕ}
|
| 77 |
+
(A B : List (RequiredPathData (Fin n) × ℕ)) :
|
| 78 |
+
requiredMaskMatrix (A ++ B) =
|
| 79 |
+
fun i j => requiredMaskMatrix A i j ||| requiredMaskMatrix B i j := by
|
| 80 |
+
induction A with
|
| 81 |
+
| nil =>
|
| 82 |
+
funext i j
|
| 83 |
+
simp only [List.nil_append, requiredMaskMatrix, Nat.zero_or]
|
| 84 |
+
| cons pb A ih =>
|
| 85 |
+
funext i j
|
| 86 |
+
simp only [List.cons_append, requiredMaskMatrix, ih, Nat.or_assoc]
|
| 87 |
+
|
| 88 |
+
theorem decode_requiredMaskEntry {n w b : ℕ} (k : ℕ) {p : RequiredPathData (Fin n)}
|
| 89 |
+
(hdecode : decode w b = {p.parameter k}) (i j : Fin n) :
|
| 90 |
+
decode w (requiredMaskEntry p b i j) = requiredEntryMatrix k p i j := by
|
| 91 |
+
unfold requiredMaskEntry requiredEntryMatrix
|
| 92 |
+
split_ifs
|
| 93 |
+
· exact hdecode
|
| 94 |
+
· exact decode_zero w
|
| 95 |
+
|
| 96 |
+
theorem decode_requiredMaskMatrix {n : ℕ} (w k : ℕ)
|
| 97 |
+
(E : List (RequiredPathData (Fin n) × ℕ))
|
| 98 |
+
(hE : ∀ pb ∈ E, decode w pb.2 = {pb.1.parameter k}) :
|
| 99 |
+
(fun i j => decode w (requiredMaskMatrix E i j)) = requiredMatrix k (E.map Prod.fst) := by
|
| 100 |
+
induction E with
|
| 101 |
+
| nil =>
|
| 102 |
+
funext i j
|
| 103 |
+
exact decode_zero w
|
| 104 |
+
| cons pb E ih =>
|
| 105 |
+
have hp := hE pb (by simp)
|
| 106 |
+
have htail := ih (fun pc hpc => hE pc (by simp [hpc]))
|
| 107 |
+
funext i j
|
| 108 |
+
change decode w (requiredMaskEntry pb.1 pb.2 i j ||| requiredMaskMatrix E i j) =
|
| 109 |
+
requiredEntryMatrix k pb.1 i j ∪ requiredMatrix k (E.map Prod.fst) i j
|
| 110 |
+
rw [decode_or, decode_requiredMaskEntry k hp, congrFun (congrFun htail i) j]
|
| 111 |
+
|
| 112 |
+
end CycleClique.Construction
|
| 113 |
+
|
| 114 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FastLayoutGraph.lean
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Mathlib.Combinatorics.SimpleGraph.Basic
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-! A checked adjacency table gives a computable graph presentation whose
|
| 6 |
+
edge tests require only two array lookups. -/
|
| 7 |
+
|
| 8 |
+
namespace CycleClique.Construction
|
| 9 |
+
def adjacencyTableLookup (A : Array (Array Bool)) (i j : ℕ) : Bool :=
|
| 10 |
+
(A.getD i #[]).getD j false
|
| 11 |
+
|
| 12 |
+
/-- Present `H` by a separately checked finite adjacency table. -/
|
| 13 |
+
def adjacencyTableGraph {n : ℕ} (H : SimpleGraph (Fin n))
|
| 14 |
+
(A : Array (Array Bool))
|
| 15 |
+
(hEq : ∀ i j : Fin n, H.Adj i j ↔ adjacencyTableLookup A i.val j.val = true) :
|
| 16 |
+
SimpleGraph (Fin n) where
|
| 17 |
+
Adj i j := adjacencyTableLookup A i.val j.val = true
|
| 18 |
+
symm := ⟨fun i j hij => (hEq j i).mp ((hEq i j).mpr hij).symm⟩
|
| 19 |
+
loopless := ⟨fun i hii => H.irrefl ((hEq i i).mpr hii)⟩
|
| 20 |
+
|
| 21 |
+
instance {n : ℕ} (H : SimpleGraph (Fin n)) (A : Array (Array Bool))
|
| 22 |
+
(hEq : ∀ i j : Fin n, H.Adj i j ↔ adjacencyTableLookup A i.val j.val = true) :
|
| 23 |
+
DecidableRel (adjacencyTableGraph H A hEq).Adj :=
|
| 24 |
+
fun i j => inferInstanceAs (Decidable (adjacencyTableLookup A i.val j.val = true))
|
| 25 |
+
|
| 26 |
+
theorem adjacencyTableGraph_eq {n : ℕ} (H : SimpleGraph (Fin n))
|
| 27 |
+
(A : Array (Array Bool))
|
| 28 |
+
(hEq : ∀ i j : Fin n, H.Adj i j ↔ adjacencyTableLookup A i.val j.val = true) :
|
| 29 |
+
adjacencyTableGraph H A hEq = H := by
|
| 30 |
+
ext i j
|
| 31 |
+
exact (hEq i j).symm
|
| 32 |
+
|
| 33 |
+
end CycleClique.Construction
|
| 34 |
+
|
| 35 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FastMatrixRows.lean
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.FastCertificateMatrix
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-! A matrix row depends only on certificates incident with its index. -/
|
| 6 |
+
|
| 7 |
+
namespace CycleClique.Construction
|
| 8 |
+
def templateIncident {n : ℕ} (i : Fin n) (Tb : TemplateData (Fin n) × ℕ) : Bool :=
|
| 9 |
+
decide (i = Tb.1.x ∨ i = Tb.1.y)
|
| 10 |
+
|
| 11 |
+
theorem templateMaskMatrix_filter_row {n : ℕ}
|
| 12 |
+
(E : List (TemplateData (Fin n) × ℕ)) (i j : Fin n) :
|
| 13 |
+
templateMaskMatrix (E.filter (templateIncident i)) i j = templateMaskMatrix E i j := by
|
| 14 |
+
induction E with
|
| 15 |
+
| nil => rfl
|
| 16 |
+
| cons Tb E ih =>
|
| 17 |
+
by_cases h : i = Tb.1.x ∨ i = Tb.1.y
|
| 18 |
+
· have hh : templateIncident i Tb = true := by simp [templateIncident, h]
|
| 19 |
+
simp only [List.filter_cons, hh, ite_true, templateMaskMatrix, ih]
|
| 20 |
+
· have hh : templateIncident i Tb = false := by simp [templateIncident, h]
|
| 21 |
+
have he : templateMaskEntry Tb.1 Tb.2 i j = 0 := by
|
| 22 |
+
simp only [templateMaskEntry]
|
| 23 |
+
split_ifs with he
|
| 24 |
+
· exact False.elim (h (he.elim (fun hx => Or.inl hx.1) (fun hy => Or.inr hy.1)))
|
| 25 |
+
· rfl
|
| 26 |
+
simp only [List.filter_cons, hh, Bool.false_eq_true, ite_false, templateMaskMatrix, he,
|
| 27 |
+
Nat.zero_or, ih]
|
| 28 |
+
|
| 29 |
+
def requiredIncident {n : ℕ} (i : Fin n) (p : RequiredPathData (Fin n)) : Bool :=
|
| 30 |
+
decide (i = p.x ∨ i = p.y)
|
| 31 |
+
|
| 32 |
+
theorem requiredMatrix_filter_row {n : ℕ} (k : ℕ)
|
| 33 |
+
(E : List (RequiredPathData (Fin n))) (i j : Fin n) :
|
| 34 |
+
requiredMatrix k (E.filter (requiredIncident i)) i j = requiredMatrix k E i j := by
|
| 35 |
+
induction E with
|
| 36 |
+
| nil => rfl
|
| 37 |
+
| cons p E ih =>
|
| 38 |
+
by_cases h : i = p.x ∨ i = p.y
|
| 39 |
+
· have hh : requiredIncident i p = true := by simp [requiredIncident, h]
|
| 40 |
+
simp only [List.filter_cons, hh, ite_true, requiredMatrix, ih]
|
| 41 |
+
· have hh : requiredIncident i p = false := by simp [requiredIncident, h]
|
| 42 |
+
have he : requiredEntryMatrix k p i j = ∅ := by
|
| 43 |
+
simp only [requiredEntryMatrix]
|
| 44 |
+
split_ifs with he
|
| 45 |
+
· exact False.elim (h (he.elim (fun hx => Or.inl hx.1) (fun hy => Or.inr hy.1)))
|
| 46 |
+
· rfl
|
| 47 |
+
simp only [List.filter_cons, hh, Bool.false_eq_true, ite_false, requiredMatrix, he,
|
| 48 |
+
Finset.empty_union, ih]
|
| 49 |
+
|
| 50 |
+
end CycleClique.Construction
|
| 51 |
+
|
| 52 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteAttachments.lean
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.FiniteBad
|
| 2 |
+
|
| 3 |
+
namespace OAI
|
| 4 |
+
|
| 5 |
+
/-! Hypothetical outside parameters zero and one become, respectively, a
|
| 6 |
+
required edge and a fresh common neighbor in a finite labelled state. -/
|
| 7 |
+
|
| 8 |
+
namespace CycleClique.Construction
|
| 9 |
+
variable {n : ℕ}
|
| 10 |
+
|
| 11 |
+
def addedEdgeGraph (H : SimpleGraph (Fin n)) (i j : Fin n) : SimpleGraph (Fin n) where
|
| 12 |
+
Adj a b := a ≠ b ∧ (H.Adj a b ∨ (a = i ∧ b = j) ∨ (a = j ∧ b = i))
|
| 13 |
+
symm := ⟨by
|
| 14 |
+
intro a b h
|
| 15 |
+
refine ⟨h.1.symm, ?_⟩
|
| 16 |
+
rcases h.2 with h | h | h
|
| 17 |
+
· exact Or.inl h.symm
|
| 18 |
+
· exact Or.inr (Or.inr h.symm)
|
| 19 |
+
· exact Or.inr (Or.inl h.symm)⟩
|
| 20 |
+
loopless := ⟨fun _ h => h.1 rfl⟩
|
| 21 |
+
|
| 22 |
+
instance (H : SimpleGraph (Fin n)) [DecidableRel H.Adj] (i j : Fin n) :
|
| 23 |
+
DecidableRel (addedEdgeGraph H i j).Adj := fun _ _ => inferInstanceAs (Decidable (_ ∧ _))
|
| 24 |
+
|
| 25 |
+
def freshGraph (H : SimpleGraph (Fin n)) (i j : Fin n) : SimpleGraph (Fin (n + 1)) where
|
| 26 |
+
Adj := Fin.cases (Fin.cases False (fun b => b = i ∨ b = j))
|
| 27 |
+
(fun a => Fin.cases (a = i ∨ a = j) (fun b => H.Adj a b))
|
| 28 |
+
symm := ⟨by
|
| 29 |
+
intro a b
|
| 30 |
+
refine Fin.cases ?_ (fun a => ?_) a <;> refine Fin.cases ?_ (fun b => ?_) b
|
| 31 |
+
· exact id
|
| 32 |
+
· exact id
|
| 33 |
+
· exact id
|
| 34 |
+
· exact fun h => h.symm⟩
|
| 35 |
+
loopless := ⟨by
|
| 36 |
+
intro a
|
| 37 |
+
refine Fin.cases ?_ (fun a => ?_) a
|
| 38 |
+
· exact id
|
| 39 |
+
· exact H.loopless.irrefl a⟩
|
| 40 |
+
|
| 41 |
+
instance (H : SimpleGraph (Fin n)) [DecidableRel H.Adj] (i j : Fin n) :
|
| 42 |
+
DecidableRel (freshGraph H i j).Adj := by
|
| 43 |
+
intro a b
|
| 44 |
+
refine Fin.cases ?_ (fun a => ?_) a <;> refine Fin.cases ?_ (fun b => ?_) b <;>
|
| 45 |
+
dsimp only [freshGraph, Fin.cases_zero, Fin.cases_succ] <;> infer_instance
|
| 46 |
+
|
| 47 |
+
def freshMatrix (M : ForbiddenMatrix n) : ForbiddenMatrix (n + 1) :=
|
| 48 |
+
Fin.cases (fun _ => ∅) (fun a => Fin.cases ∅ (fun b => M a b))
|
| 49 |
+
|
| 50 |
+
variable {V : Type*} {G : SimpleGraph V} {H : SimpleGraph (Fin n)}
|
| 51 |
+
|
| 52 |
+
def addedEdgeHom (f : H →g G) {i j : Fin n} (hij : G.Adj (f i) (f j)) :
|
| 53 |
+
addedEdgeGraph H i j →g G where
|
| 54 |
+
toFun := f
|
| 55 |
+
map_rel' := by
|
| 56 |
+
intro a b h
|
| 57 |
+
rcases h.2 with h | ⟨rfl, rfl⟩ | ⟨rfl, rfl⟩
|
| 58 |
+
· exact f.map_adj h
|
| 59 |
+
· exact hij
|
| 60 |
+
· exact hij.symm
|
| 61 |
+
|
| 62 |
+
def freshHom (f : H →g G) {i j : Fin n} (z : V)
|
| 63 |
+
(hiz : G.Adj (f i) z) (hjz : G.Adj (f j) z) : freshGraph H i j →g G where
|
| 64 |
+
toFun := Fin.cases z f
|
| 65 |
+
map_rel' := by
|
| 66 |
+
intro a b
|
| 67 |
+
refine Fin.cases ?_ (fun a => ?_) a <;> refine Fin.cases ?_ (fun b => ?_) b
|
| 68 |
+
· exact False.elim
|
| 69 |
+
· intro h; rcases h with rfl | rfl; exact hiz.symm; exact hjz.symm
|
| 70 |
+
· intro h; rcases h with rfl | rfl; exact hiz; exact hjz
|
| 71 |
+
· exact f.map_adj
|
| 72 |
+
|
| 73 |
+
theorem freshHom_injective [DecidableEq V] (f : H →g G) (hf : Function.Injective f)
|
| 74 |
+
{X : Finset V} (hfX : ∀ i, f i ∈ X) {i j : Fin n} {z : V}
|
| 75 |
+
(hz : z ∉ X) (hiz : G.Adj (f i) z) (hjz : G.Adj (f j) z) :
|
| 76 |
+
Function.Injective (freshHom f z hiz hjz) := by
|
| 77 |
+
intro a b
|
| 78 |
+
refine Fin.cases ?_ (fun a => ?_) a <;> refine Fin.cases ?_ (fun b => ?_) b
|
| 79 |
+
· exact fun _ => rfl
|
| 80 |
+
· intro h
|
| 81 |
+
change z = f b at h
|
| 82 |
+
exact False.elim (hz (h.symm ▸ hfX b))
|
| 83 |
+
· intro h
|
| 84 |
+
change f a = z at h
|
| 85 |
+
exact False.elim (hz (h ▸ hfX a))
|
| 86 |
+
· intro h; exact congrArg Fin.succ (hf h)
|
| 87 |
+
|
| 88 |
+
theorem freshHom_mem [DecidableEq V] (f : H →g G) {X : Finset V}
|
| 89 |
+
(hfX : ∀ i, f i ∈ X) {i j : Fin n} {z : V}
|
| 90 |
+
(hiz : G.Adj (f i) z) (hjz : G.Adj (f j) z) :
|
| 91 |
+
∀ a, freshHom f z hiz hjz a ∈ insert z X := by
|
| 92 |
+
intro a
|
| 93 |
+
refine Fin.cases ?_ (fun a => ?_) a
|
| 94 |
+
· exact Finset.mem_insert_self _ _
|
| 95 |
+
· exact Finset.mem_insert_of_mem (hfX a)
|
| 96 |
+
|
| 97 |
+
theorem freshMatrix_sound [DecidableEq V] (f : H →g G) {X : Finset V}
|
| 98 |
+
{M : ForbiddenMatrix n} (hM : M.Sound G X f) {i j : Fin n} {z : V}
|
| 99 |
+
(hiz : G.Adj (f i) z) (hjz : G.Adj (f j) z) :
|
| 100 |
+
(freshMatrix M).Sound G (insert z X) (freshHom f z hiz hjz) := by
|
| 101 |
+
have hbig := hM.enlarge_ground (Finset.subset_insert z X)
|
| 102 |
+
intro a b
|
| 103 |
+
refine Fin.cases ?_ (fun a => ?_) a <;> refine Fin.cases ?_ (fun b => ?_) b
|
| 104 |
+
· intro d hd; exact False.elim (Finset.notMem_empty d hd)
|
| 105 |
+
· intro d hd; exact False.elim (Finset.notMem_empty d hd)
|
| 106 |
+
· intro d hd; exact False.elim (Finset.notMem_empty d hd)
|
| 107 |
+
· exact hbig a b
|
| 108 |
+
|
| 109 |
+
end CycleClique.Construction
|
| 110 |
+
|
| 111 |
+
end OAI
|
lean/OAI/Combinatorics/Ramsey/CycleClique/Construction/FiniteBad.lean
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.PackingCertificate
|
| 2 |
+
import OAI.Combinatorics.Ramsey.CycleClique.Construction.RequiredCertificates
|
| 3 |
+
|
| 4 |
+
namespace OAI
|
| 5 |
+
|
| 6 |
+
/-! The terminal certificate for a finite state is either a required edge
|
| 7 |
+
whose outside parameter zero is forbidden, or an excessive packing. -/
|
| 8 |
+
|
| 9 |
+
namespace CycleClique.Construction
|
| 10 |
+
structure BadData (n : ℕ) where
|
| 11 |
+
edge : Option (Fin n × Fin n)
|
| 12 |
+
packing : Finset (Fin n × ℕ)
|
| 13 |
+
deriving DecidableEq
|
| 14 |
+
|
| 15 |
+
def BadData.Check {n : ℕ} (H : SimpleGraph (Fin n)) (M : ForbiddenMatrix n)
|
| 16 |
+
(k t : ℕ) (b : BadData n) : Prop :=
|
| 17 |
+
match b.edge with
|
| 18 |
+
| some (i, j) => H.Adj i j ∧ 0 ∈ M i j
|
| 19 |
+
| none => PackingCheck M k t b.packing
|
| 20 |
+
|
| 21 |
+
instance {n : ℕ} (H : SimpleGraph (Fin n)) [DecidableRel H.Adj]
|
| 22 |
+
(M : ForbiddenMatrix n) (k t : ℕ) (b : BadData n) : Decidable (b.Check H M k t) := by
|
| 23 |
+
unfold BadData.Check
|
| 24 |
+
split <;> infer_instance
|
| 25 |
+
|
| 26 |
+
variable {V : Type} [Fintype V] {G : SimpleGraph V}
|
| 27 |
+
|
| 28 |
+
theorem BadData.false_of_check (hCE : CEAlphaTwo) {n k t : ℕ}
|
| 29 |
+
(hk : 5 ≤ k) (ht : 1 ≤ t) (hcycle : ¬ HasCycle G (k + 1))
|
| 30 |
+
(hclique : G.cliqueNum ≤ t) (hbound : IndependenceBound G k)
|
| 31 |
+
{H : SimpleGraph (Fin n)} (f : H →g G) (hf : Function.Injective f)
|
| 32 |
+
{X : Finset V} (hfX : ∀ i, f i ∈ X) (hX : X.card = n)
|
| 33 |
+
{M : ForbiddenMatrix n} (hM : M.Sound G X f)
|
| 34 |
+
(hexpand : ∀ I : Finset V, G.IsIndepSet (I : Set V) → I.Nonempty →
|
| 35 |
+
k * I.card + 1 ≤ (closedNeighborhood G I).card)
|
| 36 |
+
(b : BadData n) (hb : b.Check H M k t) : False := by
|
| 37 |
+
cases hbe : b.edge with
|
| 38 |
+
| none =>
|
| 39 |
+
exact packingCheck_false hCE hk ht hcycle hclique hbound hf hfX hX hM hexpand
|
| 40 |
+
b.packing (by simpa only [Check, hbe] using hb)
|
| 41 |
+
| some ij =>
|
| 42 |
+
have hh : H.Adj ij.1 ij.2 ∧ 0 ∈ M ij.1 ij.2 := by simpa only [Check, hbe] using hb
|
| 43 |
+
exact hM.no_required_edge hh.2 (f.map_adj hh.1)
|
| 44 |
+
|
| 45 |
+
end CycleClique.Construction
|
| 46 |
+
|
| 47 |
+
end OAI
|